Thursday, April 4, 2013

Print the Log file names of the managers that can run a given request


SELECT    'The '
       || Concurrent_Queue_Name
       || ' concurrent manager ran your request from',
          TO_CHAR (Actual_Start_date, '     MON-DD-YY HH:MI:SS AM')
       || ' - to - '
       || TO_CHAR (Actual_COMPLETION_date, 'MON-DD-YY HH:MI:SS AM'),
          'The '
       || Concurrent_Queue_Name
       || ' concurrent manager log file is '
       || P.Logfile_Name,
       'Request log file is ' || R.Logfile_Name
  FROM Fnd_Concurrent_Queues Q,
       Fnd_Concurrent_requests R,
       Fnd_Concurrent_Processes P
 WHERE (P.Concurrent_Queue_ID = Q.Concurrent_Queue_ID
        AND Queue_Application_ID = Q.Application_ID)
       AND R.Controlling_Manager = P.Concurrent_Process_ID
       AND R.Phase_Code = 'C'
       AND Request_ID = &Request_ID