Error 1207

Severity Level 20

Message Text

Locksleep called with bad process id %d

Explanation

SQL Server sometimes puts a process to sleep while it is waiting for another process to free a lock. It does this by calling an internal "locksleep" routine. If SQL Server calls this routine with a process ID that does not exist or is incorrect, a 1207 error occurs. This usually happens after a process has terminated abnormally and has not freed all of its locks.

Action

Run sp_who to see if the process ID from the error message is a valid server process. Then run sp_lock with the process ID to see if the process holds locks. If sp_lock shows a server process ID (spid) that is not in sysprocesses, use shutdown with the nowait option to shut down SQL Server immediately without doing a checkpoint.

If restarting does not clear the error condition, or if the problem occurs regularly, contact your primary support provider. When calling your primary support provider, be prepared to provide a copy of the error log. Also have output from sp_who and sp_lock ready.