通过pid查看sql
SELECT S.SQL_ID,S.SQL_TEXT,E.SID,E.SERIAL#,E.USERNAME
FROM v$sql S,v$session E
WHERE S.SQL_ID = E.SQL_ID and S.SQL_ID =
(SELECT SEN.SQL_ID
FROM v$session SEN
WHERE SEN.PADDR =
(SELECT PRO.ADDR
FROM v$process PRO
WHERE PRO.SPID = 30027));
SELECT S.SQL_ID,S.SQL_TEXT,E.SID,E.SERIAL#,E.USERNAME
FROM v$sql S,v$session E
WHERE S.SQL_ID = E.SQL_ID and S.SQL_ID =
(SELECT SEN.SQL_ID
FROM v$session SEN
WHERE SEN.PADDR =
(SELECT PRO.ADDR
FROM v$process PRO
WHERE PRO.SPID = 30027));
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30345407/viewspace-2121462/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/30345407/viewspace-2121462/