Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Capturing deadlocks in Sqlserver 2005 and 2008 version

Posted on 2012-03-27
2
Medium Priority
?
385 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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:
Ramesh Babu Vavilla earned 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

688 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