Monthly Archives: July 2013

ORACLE 锁表的解决方法及查找引起锁表SQL语句方法

2013/07/31 by Jinyang | No Comments | Filed in Oracle

1. ORACLE中查看当前系统中锁表情况 select * from v$locked_object 可以通过查询v$locked_object拿到sid和objectid,然后用sid和v$session链表查询是哪里锁的表,用v$session中的objectid字段和dba_objects的id字段关联,查询详细的锁表情况。 查询SQL如下: select sess.sid, sess.serial#, lo.oracle_username, lo.os_user_name, ao.object_name, lo.locked_mode from v$locked_object lo, dba_objects ao, v$session sess, v$process p where ao.object_id = lo.object_id and lo.session_id = sess.sid; 查询是什么SQL引起了锁表的....
【阅读全文】

返回顶部