首页 > Linux操作系统 > Linux操作系统 > 是否能看出是哪只程式导致死锁的?
是否能看出是哪只程式导致死锁的?
*** 2008-04-02 10:32:06.868
*** SESSION ID:(203.4162) 2008-04-02 10:32:06.852
DEADLOCK DETECTED ( ORA-00060 )
The following deadlock is not an ORACLE error. It is a
deadlock due to user error in the design of an application
or from issuing incorrect ad-hoc SQL. The following
information may aid in determining the deadlock:
Deadlock graph:
---------Blocker(s)-------- ---------Waiter(s)---------
Resource Name process session holds waits process session holds waits
TX-000a0020-00001cb0 97 203 X 138 260 X
TX-00090013-00002610 138 260 X 97 203 X
session 203: DID 0001-0061-0000004F session 260: DID 0001-008A-00000398
session 260: DID 0001-008A-00000398 session 203: DID 0001-0061-0000004F
Rows waited on:
Session 260: obj - rowid = 00007E50 - AAAH5QAAJAAABkCAAS object_id 和rowid
(dictionary objn - 32336, file - 9, block - 6402, slot - 18)
Session 203: obj - rowid = 00007E50 - AAAH5QAAJAAABkCAAT
(dictionary objn - 32336, file - 9, block - 6402, slot - 19)
Information on the OTHER waiting sessions:
Session 260:
pid=138 serial=1271 audsid=127374 user: 46/MES
O/S info: user: prdadm, term: , ospid: 5292058, machine: aiux1
program: oracle@aiux1 (TNS V1-V3)
application name: oracle@aiux1 (TNS V1-V3), hash value=0
Current SQL Statement:
UPDATE "MES"."PRP500M" "A1" SET "SALE_ORDER" = :A0,"SALE_ITEM" = :A1 WHERE "A1"."SC_NO"=:A2 AND "A
1"."SC_ITEM"=:A3
End of information on OTHER waiting sessions.
Current SQL statement for this session:
Delete prp500m where sc_no = 'F080327001'
===================================================
PROCESS STATE
-------------
Process global information:
process: 7000000595d9e08, call: 70000005bc3ea50, xact: 70000005a653560, curses: 7000000596cc060
, usrses: 7000000596cc060
注:
Resource Name Lock name being held / waited for.process V$PROCESS.PID of the Blocking / Waiting sessionsession V$SESSION.SID of the Blocking / Waiting sessionholds Mode the lock is held inwaits Mode the lock is requested in 经查是下面两个session在运行中同时对表prp500m修改产生死锁
Session 203:客户端的机器名:WORKGROUP\BHZX01
程式:PRP024F1.EXE
table: prp500m
SQL语句:
Delete prp500m where sc_no = 'F080327001'
Session 260:客户端的机器名:aiux (192.168.11.4) (sap的主机应该是sap应用程式)
SQL 语句:
UPDATE "MES"."PRP500M" "A1" SET "SALE_ORDER" = :A0,"SALE_ITEM" = :A1 WHERE "A1"."SC_NO"=:A2 AND "A1"."SC_ITEM"=:A3
解决办法:在程式做update 或 delete 的动作后面加上 commit; 及时提交即可避免
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/807718/viewspace-269289/ ,如需转载,请注明出处,否则将追究法律责任。