473,549 Members | 3,099 Online
Bytes | Software Development & Data Engineering Community
+ 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:0x193e340 0 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:LockOwn er Stype:'OR' Mode: U
SPID:55 ECID:0 Ec:(0x1A0DF5A0) Value:0x193e180 0 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:0x193e336 0 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_PS M_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:LockOwn er Stype:'OR' Mode: U
SPID:52 ECID:0 Ec:(0x198A5558) Value:0x193e2e8 0 Cost:(0/94)
2003-08-20 15:15:45.35 spid4 Victim Resource Owner:
2003-08-20 15:15:45.35 spid4 ResType:LockOwn er Stype:'OR' Mode: U
SPID:52 ECID:0 Ec:(0x198A5558) Value:0x193e2e8 0 Cost:(0/94)
Jul 20 '05 #1
1 6150
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:p age_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
9191
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 a table (c) re-queries another table using a subquery which references the inserted table (correlated or not)
1
2351
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 situation is taking place. What is the most detailed way to detect such the cause of such a deadlock to the innermost level of detail, like what...
3
7619
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 file_uid / obj_uid. The isolation level is UR and I have set DB2_RR_TO_RS=YES. Any thoughts why I'm getting the deadlock ?
1
4226
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. From the log it looks like the problem happens when 2 threads insert 1 record each in the same table and then try to aquire a NS (Next Key Share)...
15
9974
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) 3-4 times and give up if after that it's still in deadlock. I'm very sure that many experienced people out there already deal with this issue...
6
1440
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: don't forget to increase your free space map settings
5
2635
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 from trace: 2005-11-29 08:20:29.97 spid4 ResType:LockOwner Stype:'OR' Mode: S SPID:1160 ECID:0 Ec:(0x296F9540) Value:0x3
0
11689
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 java.sql.SQLException: Deadlock found when trying to get lock; Try restarting transaction message from server: "Lock wait timeout exceeded; try restarting...
0
1943
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 custom Store Procedure. I have Article table and ArticleLanguage table. One record from Article (Id, Position, StatusId) table is the same for all...
0
7520
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7718
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7956
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7470
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7809
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6041
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5368
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5088
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1058
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.