解决ORA-04021:timeout occurred while waiting to lock object

ORCLE9I,编译某存储过程ORA-04021timeoutoccurred while waiting to lock object stringstringstringstringstringCause: While waiting to lock a library object, atimeoutis 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' 17表示 sid 36383 表示serial#ORA-00031:session marked for kill,说明已经是被kill一次过的了,session的status为killed再查操作系统对应的SPIDselect spid from v$process p,v$session s wheres.paddr=p.addrand sid=17 查到是17297$ kill -9 17297重新编译,成功了

你可能感兴趣的:(object,session,kill,System,存储,library)