Monday, June 20, 2011

How to capture deadlock on your sql error logs regularly

--Find the trace flag currently running

DBCC TRACESTATUS(-1)
GO
-- Enable Trace ID 1204 for deadlock
DBCC TRACEON (1204)
GO