z1zOracle查看锁表与解锁
oracle 查看被锁的表
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
oracle 查看锁表会话
select l.session_id sid,
s.serial#,
l.locked_mode,z
l.oracle_username,
s.user#,
l.os_user_name,
s.machine,
s.terminal,
a.sql_text,
a.action
from v$sqlarea a, v$session s, v$locked_object l
where l.session_id = s.sid
and s.prev_sql_addr = a.address
order by sid, s.serial#;
Oracle 解锁
alter system kill session 'sid,serial'