• harry9katz (2/4/2009)


    U can find the deadlock on line by running the script:

    select * from master..sysprocesses where blocked>0 and spid<>blocked

    order by waittime desc

    and find the spid

    then use :

    dbcc inputbuffer (spid no)

    That isn't quite the same thing - that finds a blocked process. Put simply, a deadlock is when process 1 is locking resource A and wants resource B, and process 2 is locking B and wants A - obviously, if you leave them to it, they'll wait forever, so SQL Server has the lock monitor thread to detect this and pick one of the two processes to summarily execute, leaving the information in the log if you have the trace flag enabled.