Friday, May 14, 2010

Getting Deadlock information in SQL Server

How to predict deadlock in SQL Server?

 

To know the process details involved in the deadlock one need to add two trace flag. These flag will enable log writer to write full information of deadlock in SQL server error logs.

 

DBCC TRACEON(1222,-1)

DBCC TRACEON(1205,-1)

 

After this when deadlock happened use xp_readerrorlog to read error log.

 

Or open SQL Server logs.

 

 

 

 

No comments:

Post a Comment