473,484 Members | 1,635 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Help with Deadlock

Hi

I have a deadlock situation and I am trying to debug my Trace Log. How do I
find out what is the cause ?

I can see from the trace I have an exclusive lock on a RID, but how can I
find out what/where 'RID: 7:1:431830:13 ' is ?

Regards

Steve
:TraceLog

2003-08-20 15:15:45.28 spid4
Deadlock encountered .... Printing deadlock information
2003-08-20 15:15:45.29 spid4
2003-08-20 15:15:45.29 spid4 Wait-for graph
2003-08-20 15:15:45.29 spid4
2003-08-20 15:15:45.29 spid4 Node:1
2003-08-20 15:15:45.29 spid4 RID: 7:1:431830:13 CleanCnt:1
Mode: X Flags: 0x2
2003-08-20 15:15:45.29 spid4 Grant List 0::
2003-08-20 15:15:45.29 spid4 Owner:0x193e3400 Mode: X Flg:0x0
Ref:0 Life:02000000 SPID:52 ECID:0
2003-08-20 15:15:45.31 spid4 SPID: 52 ECID: 0 Statement Type: UPDATE
Line #: 44
2003-08-20 15:15:45.31 spid4 Input Buf: RPC Event: ams_Load_Stock;1
2003-08-20 15:15:45.31 spid4 Requested By:
2003-08-20 15:15:45.31 spid4 ResType:LockOwner Stype:'OR' Mode: U
SPID:55 ECID:0 Ec:(0x1A0DF5A0) Value:0x193e1800 Cost:(0/E58)
2003-08-20 15:15:45.32 spid4
2003-08-20 15:15:45.32 spid4 Node:2
2003-08-20 15:15:45.32 spid4 RID: 7:1:431830:14 CleanCnt:1
Mode: X Flags: 0x2
2003-08-20 15:15:45.32 spid4 Grant List 1::
2003-08-20 15:15:45.32 spid4 Owner:0x193e3360 Mode: X Flg:0x0
Ref:0 Life:02000000 SPID:55 ECID:0
2003-08-20 15:15:45.32 spid4 SPID: 55 ECID: 0 Statement Type: UPDATE
Line #: 52
2003-08-20 15:15:45.34 spid4 Input Buf: Language Event: DECLARE @RC
int
DECLARE @strResult varchar(8)
DECLARE @strErrorDesc varchar(512)
EXEC @RC = [msmprim].[msm].[ams_Populate_PSM_Stockrequest] @strResult OUTPUT
, @strErrorDesc OUTPUT
DECLARE @PrnLine nvarchar(4000)
PRINT 'Stored Procedure: msmprim.msm
2003-08-20 15:15:45.34 spid4 Requested By:
2003-08-20 15:15:45.34 spid4 ResType:LockOwner Stype:'OR' Mode: U
SPID:52 ECID:0 Ec:(0x198A5558) Value:0x193e2e80 Cost:(0/94)
2003-08-20 15:15:45.35 spid4 Victim Resource Owner:
2003-08-20 15:15:45.35 spid4 ResType:LockOwner Stype:'OR' Mode: U
SPID:52 ECID:0 Ec:(0x198A5558) Value:0x193e2e80 Cost:(0/94)
Jul 20 '05 #1
1 6145
Steve Thorpe (st***********@nospam.hotmail.com) writes:
I have a deadlock situation and I am trying to debug my Trace Log. How
do I find out what is the cause ?

I can see from the trace I have an exclusive lock on a RID, but how can I
find out what/where 'RID: 7:1:431830:13 ' is ?


In Books Online, in the Troubleshooting section, under Servers and Databases
there are a couple of topics devoted to deadlocking. There I find:

RID

Identifies the single row within a table on which a lock is held or
requested.

RID is represented in Trace Flag 1204 as RID:
db_id:file_id:page_no:row_no; for example, RID: 1:1:1253:0.

SELECT db_name(7) now gives you the name of where the deadlock occurred,
but I assumed you already knew which one. But what useful can you make
out from page_no? The undocumented command DBCC PAGE helps you out:

DBCC PAGE(7, 1, 431830, 0)

lists information about the page where the deadlock occurred. Look for
the field m_objid. Take this value and say:

SELECT object_name(@m_objid)

And know you know in which table the deadlock occurred.
--
Erland Sommarskog, SQL Server MVP, so****@algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
9174
by: Andrew Mayo | last post by:
Here's a really weird one for any SQL Server gurus out there... We have observed (SQL Server 2000) scenarios where a stored procedure which (a) begins a transaction (b) inserts some rows into...
1
2345
by: debian mojo | last post by:
Hello faculties, i'm encountering a strange a deadlock problem on my remote server which is used to give application demo to the client. It has happened that on one of the databases a deadlock...
3
7617
by: Nigel Robbins | last post by:
Hi There, I'm getting a deadlock when I have two clients running the following statement. DELETE FROM intermediate.file_os_details WHERE file_uid = ? AND obj_uid There is a compound index on...
1
4218
by: Rohit Raghuwanshi | last post by:
Hello all, we are running a delphi application with DB2 V8.01 which is causing deadlocks when rows are being inserted into a table. Attaching the Event Monitor Log (DEADLOCKS WITH DETAILS) here....
15
9957
by: Zeng | last post by:
Hi, The bigger my C# web-application gets, the more places I need to put in the tedious retrying block of code to make sure operations that can run into database deadlocks are re-run (retried)...
6
1434
by: Shanmugasundaram Doraisamy | last post by:
Dear Group, Is there a way to increase the time of Dead Lock? The default is set to 1000 msec. Regards, Shan. ---------------------------(end of broadcast)--------------------------- TIP 7:...
5
2630
by: Matik | last post by:
Hello, I've very often a deadlock problem. The deadlock is generated always in the same way, by one application calling in DB two sp's (application has two threads). This is an error message...
0
11684
by: cwho.work | last post by:
Hi! We are using apache ibatis with our MySQL 5.0 database (using innodb tables), in our web application running on Tomcat 5. Recently we started getting a number of errors relating to...
0
1939
by: halex | last post by:
Hello, I am having deadlock problem when I have a lot of visitors on my website at the same time. I am using NetTiers templates to generate C# classes for accessing DB layer and problem is in my...
0
7082
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7144
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6813
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7214
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5407
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4845
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3046
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3041
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
235
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.