Tuesday, September 4, 2018

Lock request time out period exceeded. (Microsoft SQL Server, Error: 1222)

I see this error when I try to look at the tables or stored procedures at a database, and this suggests that I run this command:

DBCC opentran()

 
 

This command will barf up some details on what processes are in flight. You may then kill the processes to get rid of the lock. The details will look like so:

Transaction information for database 'This_Thing'.
Oldest active transaction:
   SPID (server process ID): 55
   UID (user ID) : -1
   Name : implicit_transaction
   LSN : (2143:5130:1)
   Start time : Sep 4 2018 6:45:01:470AM
   SID : 0x50c6e6298d028c42a281e09cd31d3bf7v
DBCC execution completed. If DBCC printed error messages, contact your system
      administrator.

 
 

You may issue a kill command as suggested here to stop process 55.

No comments:

Post a Comment