Wednesday, August 11, 2010

Error 1222: Lock Request Time Out Exceeded

Today I came across this error. We were trying to shrink a database. the shrink execute for almost 4 hours and then it exited with error message:

Shrink failed for database "DBNAME"
Lock request timeout Period Exceeded.

So here is what you are supposed to do:
1. Execute the SP_Who2 to see if there is any user logged in who is executing a query which leads to deadlock.
2. Execute SO_LOCK to see all locks that are applied on the database.
3. From the result set of SP_LOCK figure out if there is any dbid = 2 and ObjID in 1,2,3.
4. If yes then Kill that spid by using Kill method.

No comments:

Post a Comment