2011-09-19 45 views
2

首先,我必須說,我有一些SQL Server的基本知識,並與我想弄清楚如何解決死鎖。幫助解釋跟蹤,以找到一個SQL服務器的死鎖

我跑DBCC TRACEON(1204,-1),執行的罪魁禍首代碼,最後執行的xp_readerrorlog存儲過程這給了我下面的輸出:

Deadlock encountered .... Printing deadlock information 
Wait-for graph 
NULL 
Node:1 
OBJECT: 9:1093578934:0   CleanCnt:2 Mode:IX Flags: 0x1 
Grant List 2: 
Grant List 3: 
    Owner:0x000000008165A780 Mode: IX  Flg:0x40 Ref:2 Life:02000000 SPID:57 ECID:0 XactLockInfo: 0x0000000082F00EC0 
    SPID: 57 ECID: 0 Statement Type: EXECUTE Line #: 1 
    Input Buf: RPC Event: Proc [Database Id = 9 Object Id = 1877581727] 
Requested by: 
    ResType:LockOwner Stype:'OR'Xdes:0x0000000082E02E80 Mode: S SPID:56 BatchID:0 ECID:0 TaskProxy:(0x00000000826EE538) Value:0x81a6f9c0 Cost:(0/1492) 
NULL 
Node:2 
APPLICATION: 9:0:[Proligent Analytics]:(6ff56412) CleanCnt:2 Mode:X Flags: 0x5 
Grant List 2: 
    Owner:0x000000008165DE40 Mode: X  Flg:0x40 Ref:1 Life:00000000 SPID:56 ECID:0 XactLockInfo: 0x0000000082E02EC0 
    SPID: 56 ECID: 0 Statement Type: OPEN CURSOR Line #: 27 
    Input Buf: RPC Event: Proc [Database Id = 9 Object Id = 1966630049] 
Requested by: 
    ResType:LockOwner Stype:'OR'Xdes:0x0000000082F00E80 Mode: X SPID:57 BatchID:0 ECID:0 TaskProxy:(0x00000000827B8538) Value:0x83e29d40 Cost:(0/250576) 
NULL 
Victim Resource Owner: 
ResType:LockOwner Stype:'OR'Xdes:0x0000000082E02E80 Mode: S SPID:56 BatchID:0 ECID:0 TaskProxy:(0x00000000826EE538) Value:0x81a6f9c0 Cost:(0/1492) 

我的問題是,我不知道如何用這個來找出發生了什麼事。我讀過,你可以得到被鎖定的存儲過程,但我不知道如何。

請多多指點,我們將不勝感激。

感謝

+3

'select db_name(9),object_name(1093578934,9),object_name(1966630049,9),object_name(1877581727,9)'應該給你一些對象。 –

+0

謝謝Martin,這正是我所需要的。爲什麼你沒有發佈這個作爲獲得rep點的答案? –

+0

@MartinSmith爲什麼不把你的評論發佈爲答案? – jambriz

回答

2

正如@馬丁·史密斯說,在他的評論:選擇DB_NAME(9),OBJECT_NAME(1093578934,9),OBJECT_NAME(1966630049,9),OBJECT_NAME(1877581727,9)應該給你一些對象。