Friday, May 12, 2023

SQL to get currently running Concurrent Program

 SQL to get currently running Concurrent Program


set pages 200
set lines 200
col Manager_Name for a15;
col User_Name for a20;
col Manager_Name for a10;
col Program for a30;
col OSprocess for a10;
col LocalProcess for a12;
Select /*+ RULE */ substr(Concurrent_Queue_Name,1,12) Manager_Name,
       Request_Id Request, User_Name,
       fpro.OS_PROCESS_ID OSprocess,
      fcr.oracle_process_id LocalProcess,
       substr(Concurrent_Program_Name,1,35) Program, Status_code,
       To_Char(Actual_Start_Date, 'DD-MON-YY HH24:MI') Started
       from apps.Fnd_Concurrent_Queues fcq, apps.Fnd_Concurrent_Requests fcr,
      apps.Fnd_Concurrent_Programs fcp, apps.Fnd_User Fu, apps.Fnd_Concurrent_Processes fpro
       WHERE
       Phase_Code = 'R' And
       Status_Code <> 'W' And
       fcr.Controlling_Manager = Concurrent_Process_Id       And
      (fcq.Concurrent_Queue_Id = fpro.Concurrent_Queue_Id    And
       fcq.Application_Id      = fpro.Queue_Application_Id ) And
      (fcr.Concurrent_Program_Id = fcp.Concurrent_Program_Id And
       fcr.Program_Application_Id = fcp.Application_Id )     And
       fcr.Requested_By = User_Id
       order by Started; 

No comments:

Post a Comment