Long running query

Long running query

 

  

Hi All
I am looking for a query on my production DB which is doing a FTS on
a table

select sql_text,username from v$session_longops sl, v$sqltext s
where s.address=sl.sql_address and
sl.sid=165 ;

no rows returned

where as I have these much in v$session_longops

SID TARGET ELAPSED_SECONDS USERNAME SQL_ADDR
> ---------- --------------- --------------- ---------- --------
> 165 CUSTADM.AC_IDS 10 EKITZOPE D83F9958
> 165 CUSTADM.AC_IDS 11 EKITZOPE AEBF2EA0
> 165 CUSTADM.AC_IDS 12 EKITZOPE DBF6A838
> 165 CUSTADM.AC_IDS 10 EKITZOPE AEA14F60
> 165 CUSTADM.AC_IDS 9 EKITZOPE B46CB31C
> 165 CUSTADM.AC_IDS 9 EKITZOPE B9E393F8
> 165 CUSTADM.AC_IDS 12 EKITZOPE D1B087AC
> 165 CUSTADM.AC_IDS 13 EKITZOPE BFF1C504

But the sql_address I am getting in the v$session_longops are not
returning any text (these are not currently running) , I assume that
views v$sql,v$sqlarea,v$sql_text all contains the information about the
sql which ran in past , right ?


so where can I find query text for these sql_address as these are not
currently running and I tried searching in all three views .

thanks

Parveen

Oracle LazyDBA home page