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-00040028-00e34df1 61 130 X 116 82 X
TX-00030016-011b29e6 116 82 X 61 130 X
session 130: DID 0001-003D-0004D93A session 82: DID 0001-0074-0000F535
session 82: DID 0001-0074-0000F535 session 130: DID 0001-003D-0004D93A
Rows waited on:
Session 82: obj - rowid = 000129AA - AAATO8AALAAAsshAAG
(dictionary objn - 76202, file - 11, block - 183073, slot - 6)
Session 130: obj - rowid = 00012967 - AAATO1AAIAAAU3rAAI
(dictionary objn - 76135, file - 8, block - 85483, slot - 8)
补充:
这种死锁是由于两个会话等待对方的资源,个分两次调用,就会出现这个问题;
session 1
begin
update lock1 set num=3 where num=3;
end;
/
session 2
begin
update lock2 set num=3 where num=3;
end;
/
session 1
begin
update lock2 set num=3 where num=3;
end;
/
session 2
begin
update lock1 set num=3 where num=3;
end;
/
session 1 error
应用程序在做设计的时候要尽量的避免事务的粒度尽可能小
并且确保交互上锁!
[@more@]来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9879835/viewspace-1030145/ ,如需转载,请注明出处,否则将追究法律责任。