注:需要DBA权限
1、执行以下语句可查询被锁的表
select b.owner,b.object_name,a.session_id,a.locked_mode
from v$locked_object a,dba_objects b
where b.object_id = a.object_id;
如图
2、执行以下语句可查询被锁的session和serial
select b.username,b.sid,b.serial#,logon_time
from v$locked_object a,v$session b
where a.session_id = b.sid order by b.logon_time;
如图
3、删除锁住的session和serial
--参照步骤二查询出来的结果 替换掉我的33,35
alter system kill session '33,35';
到这里就解锁成功了