Solved

Capturing deadlocks in Sqlserver 2005 and 2008 version

Posted on 2012-03-27
2
382 Views
Last Modified: 2012-03-27
Hi

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

Thx
Naren
0
Comment
Question by:knaren1975
2 Comments
 
LVL 2

Expert Comment

by:waldorf71
ID: 37770378
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
 
LVL 10

Accepted Solution

by:
sqlservr earned 500 total points
ID: 37770681
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is basically a blog post I wrote recently. I've found that SARGability is poorly understood, and since many people don't read blogs, I figured I'd post it here as an article. SARGable is an adjective in SQL that means that an item can be fou…
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question