关于ORA-04021解决办法(timeout occurred while waiting to lock object)

某个应用正在锁定该表或者包
表为
select b.SID,b.SERIAL#,c.SQL_TEXT
from v$locked_object a, v$session b, v$sqlarea c
where a.SESSION_ID = b.SID
and b.SQL_ADDRESS = c.ADDRESS
and c.sql_text like '%table_name%'
包为
select B.SID,b.USERNAME,b.MACHINE FROM V$ACCESS A, V$SESSION B WHERE A.SID=B.SID and a.OBJECT = '%PACKAGE_name%' and a.TYPE = 'PACKAGE'
找出这个session
然后 kill
alter system kill session 'sid,serial#'
上一篇:npm install 几种不同后缀安装模式的区别


下一篇:MFC消息映射与命令传递