编译的存储过程的时候,程序死住,等待一会出现ora-04021错误解决办法:
1.可能被锁住
查看v$lockedselect b.sid,b.serial#,b.machine,b.terminal,b.PRogram,b.process,b.status from v$lock a , v$session b
where a.SID = b.SID
得到死锁session的SID,SERIAL#参看这个是否为你自己用户下的,然后kill掉session
2.可能被挂起
查看v$session_waitselect b.serial#,a.* from v$session_wait a,v$session bwhere a.sid = b.sid得到等待的session的sid和serial#3.查看dba_ddl_locksselect session_id sid, owner, name, type,
mode_held held, mode_requested request
from dba_ddl_locks
where name = '&your_package_name'
新闻热点
疑难解答