Tuesday, September 17, 2013

Sql text for a give SID

--------------------------
-sql text for a given SID
-File Name: sql_text.sql
-Usage : @sql_text
--------------------------

select s.sql_text
FROM v$process p,v$session a,v$sqltext s,v$sqlarea sa
where 
    a.sid = &SID
and s.address = a.prev_sql_addr
AND p.addr = a.paddr
AND s.address=sa.address
AND a.username is not null
order by a.username, a.osuser, a.sid, s.piece
/

No comments:

Post a Comment

NLS boot file not found or invalid opmnctl ping – EBS 12.2 ADCFGCLONE FAIL

Error: adcfgclone.pl failed while performing clone of EBS 12.2 instance. This occurred while ohsT2PApply is in progress. INST_TOP/adm...