/* 通过操作系统pid查询正在执行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);
分享题目:通过操作系统PID查询执行的SQL
网址分享:
http://chengdu.cdxwcx.cn/article/pgpiis.html