*oracle中查看表是否被锁 *
SELECT /*+ rule*/ a.sid, b.owner, object_name, object_type FROM v$lock a, all_objects b WHERE TYPE = 'TM' and a.id1 = b.object_id;
查到的都是被锁的表
这样可以把它杀掉
替换&sid参数
SELECT sid,serial# FROM v$session WHERE sid = &sid;
根据上条语句查出的serial#替换下面两个参数。
alter system kill session ‘sid,serial#’;