June 17, 2002 at 1:39 pm
Hi,
When looking at a deadlock log, you can find entries like "Statement Type: UPDATE Line #: 13". What is line 13 refering to: a line in my stored procedure or compiled code?
Any tips or hints on this topic?
Tx in advance,
June 17, 2002 at 5:20 pm
It is referring to Line 13 of some piece of code. Which traces did you turn on? Personally I would use DBCC TRACEON (-1,1204,1205,3605) to get a better output with some query info (See
http://www.swynk.com/friends/achigrik/TraceFlags2000.asp for some great detail).
Andyway when you do this your output will look more like this.
2000-10-31 08:45:29.03 spid2 *** Deadlock Detected ***
2000-10-31 08:45:29.03 spid2 ==> Process 14 chosen as deadlock victim
2000-10-31 08:45:29.03 spid2 == Deadlock Detected at: 2000-10-31
08:45:29.03
2000-10-31 08:45:29.03 spid2 == Session participant information:
2000-10-31 08:45:29.03 spid2 SPID: 10 ECID: 0 Statement Type: UPDATE
Line #: 11
2000-10-31 08:45:29.03 spid2 Input Buf: s p _ e x e c u t e s q l
cà à U P D A T E " L O N C M S O P E N 1 " . . " T B M _ M A T T E R "
S E T " L A S T _ M O D I F I E D " = @ P 1 , " M A T T E R _ U N O " = @
P 2 , " R A T E _ L E V E L " = @ P 3 , " R A T E _ L E V E L _ D A T E " =
@ P 4 , " P R E V _ R A T E _ L E V E L " = @ P 5 , " T I M E _ I N C " = @
P 6 , " U S E _ U N I T S " = @ P 7 , " A L L O W
????m????????°??8??54???????????????????????????????????????????????????????
???????????????????????????????????
2000-10-31 08:45:29.07 spid2 SPID: 14 ECID: 0 Statement Type: UPDATE
Line #: 4
2000-10-31 08:45:29.09 spid2 Input Buf: E x e c u P o p u l a t e _ C
L I E N T _ M A T _ N A M E
2000-10-31 08:45:29.09 spid2
2000-10-31 08:45:29.09 spid2 == Deadlock Lock participant information:
2000-10-31 08:45:29.09 spid2 == Lock: PAG: 7:1:387760
2000-10-31 08:45:29.09 spid2 Database: LONCMSOPEN1
2000-10-31 08:45:29.09 spid2 Table: HBM_MATTER
2000-10-31 08:45:29.09 spid2 - Held by: SPID 10 ECID 0 Mode "IX"
2000-10-31 08:45:29.09 spid2 - Requested by: SPID 14 ECID 9 Mode "S"
2000-10-31 08:45:29.09 spid2 == Lock: PAG: 7:1:116641
2000-10-31 08:45:29.09 spid2 Database: LONCMSOPEN1
2000-10-31 08:45:29.09 spid2 Table: HBM_MATTER
as you can see you will get the input buffer right after the type and line information when you can use to see the statments involved. This will give you a better idea of where to look.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply