有时需要根据操作系统编号查找正在执行的sql语句:
select
sess.username,
sql1.SQL_TEXT
from v$session sess,
v$sqltext sql1,
v$process pro
where
sess.SQL_ADDRESS=sql1.ADDRESS
and
pro.ADDR=sess.PADDR and pro.SPID='&spid'
order by sql1.PIECE;
http://www.oracle-wiki.net/startsql
此网址中有很多好玩的sql
转载于:https://www.cnblogs.com/Clark-cloud-database/p/7818255.html