oracle将卡住的SQL终止

1:查询卡住的SQL

select b.sid, b.username, b.serial#, a.spid, b.paddr, c.sql_text, b.machine from v$process a, v$session b, v$sqlarea c where a.addr = b.paddr and b.sql_hash_value = c.hash_value;
set linesize 9999;

查询出相应的(SID& seria1#)
2: 杀掉该SQL

alter system kill session '1214,15731';

3:解决死锁

SELECT sid, serial#, username, osuser FROM v$session w

你可能感兴趣的:(oracle,sql,数据库)