SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


deadlock


deadlock

Author
Message
charipg
charipg
SSCarpal Tunnel
SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)SSCarpal Tunnel (4K reputation)

Group: General Forum Members
Points: 4014 Visits: 1193
how to findout the deadlock happend?
how to resolve it?
Sergey Vavinskiy
Sergey Vavinskiy
SSCommitted
SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)

Group: General Forum Members
Points: 1963 Visits: 392
Here are a couple a good strategies:

http://weblogs.sqlteam.com/mladenp/archive/2008/05/21/SQL-Server-2005-Immediate-Deadlock-notifications.aspx

http://www.mssqltips.com/tip.asp?tip=1036
Henrico Bekker
Henrico Bekker
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12422 Visits: 5242


You can choose, do you want to know the process, or just catch it to investigte?

1. Traceon can cath your deadock info so you can investigate and maybe correct some bad coding.
2. get te SPID of the blocking process, and use it in DBCC INPUTBUFFER(spidid in here)

example:
DBCC INUTBUFFER(234)

Result will show the query running/was running..

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (163K reputation)SSC Guru (163K reputation)SSC Guru (163K reputation)SSC Guru (163K reputation)SSC Guru (163K reputation)SSC Guru (163K reputation)SSC Guru (163K reputation)SSC Guru (163K reputation)

Group: General Forum Members
Points: 163836 Visits: 33200
It's a very good idea to turn on TRACEFLAG 1222. It can be difficult to interpret, but at least you're assured of capturing the information as each deadlock occurs. Otherwise, in order to capture the information, you'll need to run a trace 24/7. This can be a bit of a pain to maintain.

To set the traceflag on:
DBCC TRACEON (1222,-1);



----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search