/* 通過操作系統(tǒng)pid查詢正在執(zhí)行SQL指令*/
SELECT * FROM v$sql SQLINFO where SQLINFO.SQL_ID =
(SELECT SEN.SQL_ID FROM v$session SEN WHERE SEN.PADDR =
(SELECT PRO.ADDR FROM v$process PRO WHERE PRO.SPID = 25832));
/* 查找等待隊列比較大的SQL*/
SELECT * FROM v$sql SQLINFO WHERE SQLINFO.SQL_ID =
(SELECT LONGWAIT.SQL_ID FROM v$session_longops LONGWAIT WHERE LONGWAIT.TIME_REMAINING>0);
網(wǎng)站名稱:通過操作系統(tǒng)PID查詢執(zhí)行的SQL
新聞來源:
http://weahome.cn/article/pgpiis.html