We walk in the dark places no others will enterWe stand on the bridge and no one may pass
/* to start deadlock detection and recording without stop/start of the instance */dbcc traceon(1204, 3605, -1) /*-- sql-log-info-- 2006-06-28 14:16:28.00 spid4 KEY: 20:2121058592:3 (5b027ea21b78) CleanCnt:1 Mode: X Flags: 0x0---- key: 20:2121058592:3 -- database 20, object id 2121058592, indid 3 -- select db_name(20) -- = DOrderManagementDeclare @DeadlockKey varchar(128)Set @DeadlockKey = '20:2121058592:3' Declare @DbIdNr intDeclare @TbIdNr intDeclare @IxIndIdNr intSelect @DbIdNr = substring(@DeadlockKey,1,convert(int,charindex(':',@DeadlockKey,1)-1)), @TbIdNr = substring(@DeadlockKey,charindex(':',@DeadlockKey,1)+1, charindex(':',@DeadlockKey,charindex(':',@DeadlockKey,1)+1) - charindex(':',@DeadlockKey,1) - 1 ), @IxIndIdNr = substring(@DeadlockKey, charindex(':',@DeadlockKey,charindex(':',@DeadlockKey,1)+1) + 1, 25 )If db_id() = @DbIdNr begin select db_name(@DbIdNr) as Deadlock_Database_Name , object_name(@TbIdNr) as Deadlock_Object_Name , [name] as Deadlock_Index_Name , indid from sysindexes where id = @TbIdNr and indid = @IxIndIdNr order by indid end else begin Select 'USE ' + db_name(@DbIdNr) as Deadlock_Database_Name end*/