oracle表解锁
第一步
查询被锁表(object_name),锁表对象(session_id)
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;
第二步
查询哪些表被锁住了
SELECT s.sid, s.serial#, s.username, s.schemaname, s.osuser, s.process, s.machine,
s.terminal, s.logon_time, l.type
FROM v$session s, v$lock l
WHERE s.sid = l.sid
AND s.username IS NOT NULL
ORDER BY sid;
第三步
进行解锁
alter system kill session 'sid,serial#';(其中sid=l.session_id)
例如:alter system kill session '1702,82';