标签:
编译某存储过程 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.
查找是否有用户类型的锁,即
TM DML排队
TX 事务处理排队
UL 用户提供
select * from v$lock where type in (‘TM‘,‘TX‘,‘UL‘)
结果果然查到有一个sid为17,类型为TX的锁,可以断定就是这个锁导致上面的错误
再查相应的sid和serial#
select * from v$session where sid=17
杀掉它
alter system kill session ‘17,36383‘
查到是17297
$ kill -9 17297
重新编译,成功了
ORA-04021:timeout occurred while waiting to lock object
标签:
原文地址:http://www.cnblogs.com/xiyuanbaiyun/p/4290002.html