Monday 23 June 2014

Information to get the current session SQL statement execution details


Very often we need to know which SQL statement is running within a running concurrent program.Below SQL script can give you details of the same.

select vsq.sql_text
from  fnd_concurrent_requests fcr
       , V$PROCESS vp
       , V$SESSION vs
       , V$SQL vsq   
where fcr.request_id = :request_id
and  fcr.oracle_process_id=vp.spid
and  vs.sql_address = vsq.address    
and  vs.paddr=vp.ADDR ;

> You can also query the V$SQL table with Concurrent Program short name and can get all the SQLs   running.

Select vsq.sql_text
   from V$SQL vsq
 where  module = :Conc_prog_Short_name ;

> If you are using TOAD, you can also check the running Concurrent Program details in Schema browser.

1 comment:

  1. virtualnuggets offering oracle dba online training,corporate training services.

    Temporary tablespace practicals:--

    Views:--

    Desc dba_temp_files;
    Desc v$tempfile;
    Desc dba_tablespace_groups;
    select * from dba_tablespace_groups;
    Select file_name, file_id, status from dba_temp_files;
    Select name, file#, creation_time from v$tempfile;

    ReplyDelete