开发说测试环境在删除表的时候,报了如下错误:
SQL> drop table tke purge;drop table tke purge *ERROR at line 1:ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
查看一下锁住对象的会话id:
SQL> select session_id from v$locked_object;SESSION_ID---------- 6
根据会话id继续查看:
SQL> SELECT sid, serial# FROM v$session where sid = 6; SID SERIAL# ---------- ---------- 6 99
因为是测试环境,直接kill了会话:
sql> alter system kill session '6,96';
当然也可以在具体查看一下产生锁得会话信息等,比如:
SQL> select object_name ,s.sid,s.serial#,p.spid 2 from v$locked_object l , dba_objects o , v$session s , v$process p 3 where l.object_id=o.object_id and l.session_id=s.sid and s.paddr=p.addr;OBJECT_NAME SID SERIAL# SPID---------------------------- ---------- ---------- ---------TKE 6 96 30761