锁表查询和解锁
--查询
SELECT object_name, machine, s.sid, s.serial#
FROM gv$locked_object l, dba_objects o, gv$session s
WHERE l.object_id = o.object_id
AND l.session_id = s.sid;
--将上面查询出来的sid ,serial 替换下面解锁SID,SERIAL
--解锁
alter system kill session 'SID, SERIAL#';
--执行上面解锁语句即可解锁表