死锁描述:
ORA-04021 timeout occurred while waiting to lock object
stringstringstringstringstring
Cause: While waiting to lock a library object, a timeout is
occurred.
Action: Retry the operation later.
用如下sql脚本查找造成死锁的session
(To find out who is blocking you, run the query in another session
while you're compiling.
Kill the offending session, and your complilation should go
through.):
SELECT sid, DECODE( block, 0, 'NO', 'YES' ) BLOCKER,
DECODE( request, 0, 'NO', 'YES' ) WAITER, id1, id2, lmode /* 6 is
exclusive lock. For others, refer to SV10 */
FROM v$lock
WHERE request > 0 OR block > 0
ORDER BY block DESC
/
用如下sql脚本查找该session锁定的对象(To find out what objects is being
hold):
SELECT b.object_name,
decode( a.locked_mode,
0, 'None', /* Mon Lock equivalent */
1, 'Null', /* N */
2, 'Row-S (SS)', /* L */
3,