1、查看是否有锁表的sql 代码如下: select ‘blocker(‘||lb.sid||’:’||sb.username||’)-sql:’|| qb.sql_text blockers, ‘waiter (‘||lw.sid||’:’||sw.username||’)-sql:’|| qw.sql_text waiters from v$lock lb, v$lock lw, v$session sb, v$session sw, v$sql qb, v$sql qw where lb.sid=sb.sid and lw.sid=sw.sid and sb.prev_sql_addr