SQL Query to get details of a concurrent process in EBS R12.1.3

 To get forms process id first.

SQL> SET LINES 222

SQL> col MODULE for a40

SQL> col ACTION for a40


select sid,serial#,process,module,action from v$session where process=(SELECT p.os_process_id FROM FND_CONCURRENT_REQUESTS r, FND_CONCURRENT_PROCESSES p 

where r.controlling_manager = p.concurrent_process_id and request_id=211503612)




To get more details of process id and command kill that session:-

select s.ECID ,s.inst_id, s.SID,s.SERIAL#,p.spid,s.status,s.machine, s.ACTION, s.MODULE, s.TERMINAL,s.sql_id,s.last_call_et,s.event, s.client_info,s.PLSQL_SUBPROGRAM_ID,s.PROGRAM,s.client_identifier

, ( SELECT max( substr( sql_text , 1, 40 )) FROM gv$sql sq WHERE sq.sql_id = s.sql_id ) AS sql_text

, ( SELECT object_name FROM dba_procedures WHERE object_id = plsql_entry_object_id AND subprogram_id = 0) AS plsql_entry_object

, ( SELECT procedure_name FROM dba_procedures WHERE object_id = plsql_entry_object_id AND subprogram_id = plsql_entry_subprogram_id) AS plsql_entry_subprogram

, ( SELECT object_name FROM dba_procedures WHERE object_id = plsql_object_id AND subprogram_id = 0) AS plsql_entry_object

, ( SELECT procedure_name FROM dba_procedures WHERE object_id = plsql_object_id AND subprogram_id = PLSQL_SUBPROGRAM_ID) AS plsql_entry_subprogram

, 'alter system kill session ' || '''' || s.SID || ',' || s.serial# ||',@'|| s.inst_id||''''|| ' immediate;' kill_session

from gv$session s ,gv$process p

where

s.process='32488'  --forms OS process ID

--s.program like '%frm%'

and p.addr=s.paddr

and p.inst_id = s.inst_id

;

 


2 comments:

  1. Business advisory firms in India can help us detect and solve problems, but they can also protect us against various threats, which every business must prevent, and give us innovative ideas to improve the stability and profitability of our businesses.


    https://genexdbs.com/

    ReplyDelete