Search
Home
Articles
Backup
Books
Certification
FAQ
Products
Replication
Scripts
Seminars
Training
TSQL

MSDN Fourms
Philippine SSUG
Fort Worth SSUG
Oklahoma City SSDG

Resume

MHS Enterprises
BlowFrog Software
FilAm Software
AcrylicAcetate.com
Bargain Humidors
Western Humidor

I have a query that seems to lock other users out of the system. Especially with tempdb. What is going on?

In situations like this the usual problem is with locks. Check with sp_lock or sp_lock2 what the offending query is doing.

One common occurrence that people fell foul of was introduced in SQL 6.5 when MS decided to let table creation be allowed in transactions by making it an ATOMIC transaction. A by product of this is that when a SELECT INTO is done it locks out system tables in the database concerned and prevents other users from accessing them. With a long-running select into this can cause real problems.

MS recognised this and as long as you have service pack 1 applied you can set traceflag -T5302 to remove this behaviour. Check out Q153441 for more info.

Michael R. Hotek

All content on this site, except where noted, represents an original work of Michael R. Hotek and is protected by applicable copyright laws. The SQL Server FAQ is the sole work of Neil Pike. No page, portion of a page, or download may be used for commercial purposes in whole or in part without the express, written permission of the applicable author.