INF: Q+E and MS Query Can Cause Long-Term Page Lock

Last reviewed: April 15, 1997
Article ID: Q114329

The information in this article applies to:

  - Microsoft SQL Server version 4.2 for OS/2
  - Microsoft SQL Server version 4.2

SUMMARY

The query tools Microsoft Query and Q+E (which ship or have shipped with Microsoft Excel) can cause a long-term shared page lock on SQL Server when browsing data. Under some conditions, this can block updates to the table. This is because data modification queries can require an exclusive page or table lock, which can be blocked by the outstanding shared page lock from Q+E or Microsoft Query.

MORE INFORMATION

You can identify whether this has happened by running the SQL Server query sp_lock. Identify which SPID number corresponds to the client computer running Q+E or MS Query, and then note whether a sh_page lock exists.

With MS Query, you may want to use the >| button to go to the last row in the table, at which point MS Query will release the page lock. The data will then be locally available for browsing in MS Query. Similarly with Q+E, you may want to drag the scroll bar to the last record, which will cause all records to be fetched at which point the page lock will be released.

For more information on application design and concurrency control see Appendix E, "Maximizing Database Consistency and Concurrency" in the SQL Server for Windows NT Programmer's Reference for C.


Additional query words: Windows NT
Keywords : kb3rdparty SSrvWinNT
Version : 4.2 | 4.2
Platform : OS/2 WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 15, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.