编译存储过程中出现的问题,ORA-04021: 等待对象锁超时
解决方案:
--查找session_id
select * from dba_ddl_locks where name=upper(存储过程名称);
比如:查到对应session_id=1029
select sid,serial# from v$session where sid=session_id;
结果:
SID SERIAL#
1029 41113
alter system kill session 'sid,serial#';
alter system kill session '1029,41113';