background_dump_dest string /oracle/diag/rdbms/oadb/oadb/trace
SQL> select * from t100;
ID
----------
100
SQL> select * from t200;
ID
----------
200
SESSION 1715:
SQL> update t100 set id=1 where id=100;
已更新 1 行。
另起一个SESSION:
SESSION 1155:
SQL> update t200 set id=2 where id=200;
已更新 1 行。
SESSION 1715:
继续执行:
update t200 set id=2 where id=200;
此时hang
SESSION 1155:
SQL> update t100 set id=1 where id=100;
此时之前HANG的1715 报
SQL> update t200 set id=2 where id=200;
update t200 set id=2 where id=200
*
第 1 行出现错误:
ORA-00060: 等待资源时检测到死锁
查看trc:
Deadlock graph:
---------Blocker(s)-------- ---------Waiter(s)---------
Resource Name process session holds waits process session holds waits
TX-00080018-0000068c 19 1715 X 22 1155 X
TX-0007000d-000005bb 22
Oracle 两张表死锁
最新推荐文章于 2021-04-12 15:44:40 发布