Solved

Capturing deadlocks in Sqlserver 2005 and 2008 version

Posted on 2012-03-27
2
379 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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

Suggested Solutions

After restoring a Microsoft SQL Server database (.bak) from backup or attaching .mdf file, you may run into "Error '15023' User or role already exists in the current database" when you use the "User Mapping" SQL Management Studio functionality to al…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now