ORACLE-013:oracle中kill死結進程,oracle-013oracle

來源:互聯網
上載者:User

ORACLE-013:oracle中kill死結進程,oracle-013oracle

oracle中對於訪問頻率很高的包,預存程序或者函數,會引起死結。對於用到了死結的對象的指令碼都會無法運行,造成卡死,或者報異常:開啟的串連太多。

這時需要使用dba許可權賬戶去kill掉死結的對象。

使用

 alter system kill session 死結對象的ID;

執行如下sql,尋找出死結的ID,並將alter語句拼接好:

select Distinct 'alter system kill session '||chr(39)||b.sid||','||b.serial#||chr(39)||';'As  kill對象sql語句,b.username,b.logon_timefrom v$locked_object a,v$session bwhere a.session_id=b.sidorder by b.logon_time;
然後將拼接的語句拿出來執行即可。


相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.