作者:一林泽鹏_444 | 来源:互联网 | 2023-09-24 20:07
首先查找要处理的SESSION对应的CONNECTION_ID,利用如下SQL:
SELECT C.CONNECTION_ID, PS.STATEMENT_STRING
FROM M_CONNECTIONS C JOIN M_PREPARED_STATEMENTS PS
ON C.CONNECTION_ID = PS.CONNECTION_ID AND C.CURRENT_STATEMENT_ID = PS.STATEMENT_ID
WHERE C.CONNECTION_STATUS = 'RUNNING'
AND C.CONNECTION_TYPE = 'Remote'
利用下面的SQL,杀死死锁的进程
---根据CONNECTION_ID 选择
ALTER SYSTEM DISCONNECT SESSION ‘‘
例如:
ALTER SYSTEM DISCONNECT SESSION '300736'
ALTER SYSTEM CANCEL SESSION '300735'
ALTER SYSTEM CANCEL WORK IN SESSION '300736'