日期:2014-05-17  浏览次数:20940 次

ORA-00060 X锁和S锁死锁问题
更新记录时根据流水号更新,t0,t1,t2,t3上建有视图。
怎么会发生这样的死锁,大家帮忙分析下,谢谢。

死锁发生时的日志文件如下。

DEADLOCK DETECTED ( ORA-00060 )
[Transaction Deadlock]
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-00070016-0000bdbe        59     136     X             67     123           S
TX-0006001c-0000b87a        67     123     X             59     136           S
session 136: DID 0001-003B-00000052 session 123: DID 0001-0043-00000012
session 123: DID 0001-0043-00000012 session 136: DID 0001-003B-00000052
Rows waited on:
Session 123: obj - rowid = 00009FDF - AAAJ/fAAEAAEPrIAAA
  (dictionary objn - 40927, file - 4, block - 1112776, slot - 0)
Session 136: obj - rowid = 00009FE8 - AAAJ/oAAEAAEYL7AAA
  (dictionary objn - 40936, file - 4, block - 1147643, slot - 0)
Information on the OTHER waiting sessions:
Session 123:
  sid: 123 ser: 53765 audsid: 11800007 user: 32/tq
    flags: (0x41) USR/- flags_idl: (0x1) BSY/-/-/-/-/-
    flags2: (0x8)
  pid: 67 O/S info: user: tq, term: pts/tl, ospid: 4650
    image: oracle@SD12pp12 (TNS V1-V3)
  O/S info: user: tq, term: pts/tl, ospid: 4644, machine: SD12pp12
            program: batch@SD12pp12 (TNS V1-V3)
  application name: batch@SD12pp12 (TNS V1-V3), hash value=2269185292
  Current SQL Statement:
  update t0  set f_mana=(f_mana+:b0),f_madd=:b0,f_no=(f_no+:b2),f_iadd=:b2,f_cost=:b4,f_cadd=:b5,f_reward=:b6,f_fadd=:b7,d_last=:b8 where c_cno=:b9
End of information on OTHER waiting sessions.
Current SQL statement for this session:
update t3  set f_mana=(f_mana+:b0),f_madd=:b0,f_no=(f_no+:b2),f_iadd=:b2,f_cost=:b4,f_cadd=:b5,f_reward=:b6,f_fadd=:b7,d_last=:b8 where c_cno=:b9
===================================================
-