SQL Deadlock

  • Running SQL 2K on Win 2K Server:  Recieved the following SQL error in log report:

    -- [Microsoft][ODBC SQL Server Driver][SQL Server]Transaction (Process ID 66) was deadlocked on lock resources with another process and has been chosen as the deadlock victim.   Rerun the transaction.

    SQL actually stopped functioning after this event and the server had to be re-booted to re-establish communications to peripheral servers.

    Does anyone have an idea what may have happened?

     

     

  • Process A was waiting on a lock to be released by Proces B

    Process B was waiting on a lock to be released by Process A

    -> infinite loop

    SQL Server then picks a victim and rolls back the transaction of the victim (can be lengthy and heavy on I/O)

  • You can turn on the following trace flag

    DBCC TRACEON(3605)

    DBCC TRACEON(1204)

    Next if dead lock happens again, the deatil inforamtion about involved resources will be logged in error log.

     

  • When a deadlock happens, usually there is no need to reboot the server. Since in this case the server became inactive, you might want to check all the logs(application log, system log and sql error log) to see if you find any other error.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply