• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 387
  • Last Modified:

Capturing deadlocks in Sqlserver 2005 and 2008 version

Hi

is there any way  to capture deadlocks in sqlserver 2005/2008 without using sql server profiler?

Thx
Naren
0
knaren1975
Asked:
knaren1975
1 Solution
 
waldorf71Commented:
Yes. This article shows how to log for both errors and procedure usage:

http://www.mssqltips.com/sqlservertip/2003/simple-process-to-track-and-log-sql-server-stored-procedure-use/

Or you could roll your own based on this approach to just trap and log the deadlocks.
0
 
Ramesh Babu VavillaCommented:
just enable
dbcc traceon (3905)
dbcc traceon(1205)

this writes the query which caused deadlock
, you can read the query by using
xp_readerrorlog
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now