> 文章列表 > ORA-04021:等待锁定对象时发生超时

ORA-04021:等待锁定对象时发生超时

ORA-04021:等待锁定对象时发生超时

现场人员反馈问题,drop表报错,如下图

 是个rac环境,处理过程

1、2个节点上查看锁表,没任何输出

SYS@orcl2> select name from v$db_object_cache where owner='USR_DATAI'
and type in('PROCEDURE','FUNCTION')
and locks > 0 and pins > 0;

2、直接kill当前的连接-得出当前的连接,直接kill

SYS@orcl2> select 'alter system kill session '||''''||sid||','||serial#||''''||' immediate;' from v$session where username='USR_DATAI';

3、再次drop table,成功删除

SYS@orcl2> drop table USR_DATAI.I$_T_JZG;

Table dropped.