Quantcast
Channel: Doyensys Allappsdba Blog..
Viewing all articles
Browse latest Browse all 1640

How to find out the active sql details

$
0
0
break on sid skip 1 on serial# on username on executions on status
column sid format 9999
column username format a12
column sql_text form a64

select a.sid,a.serial#,a.username,c.executions,status, b.sql_text
from v$session a
    ,v$sqltext b
    ,v$sqlarea c
where a.username is not null
and status='ACTIVE'
--and sid in (174)
and   a.sql_address = b.address(+)
and   a.sql_address = c.address(+)
order by status,1,2,b.piece;


Viewing all articles
Browse latest Browse all 1640

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>