标签:name ext rac 被锁 username || pre objects text
--查询行锁语句
select sql_text from v$sql a,v$session b where a.sql_id=b.sql_id and b.event=‘enq: TX - row lock contention‘;
--找到被锁定的表
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;
--解锁
select s.sid,s.machine,o.object_name,l.oracle_username,l.locked_mode, ‘ALTER SYSTEM KILL SESSION ‘‘‘||s.sid||‘, ‘||s.serial#||‘‘‘;‘ Command from v$locked_object l,v$session s,all_objects o where l.session_id=s.sid and l.object_id=o.object_id;
标签:name ext rac 被锁 username || pre objects text
原文地址:https://www.cnblogs.com/Dev0ps/p/9089947.html