Wednesday, January 1, 2025

Query to get Concurrent Manager Status in R12

SELECT q.concurrent_queue_id
      ,q.concurrent_queue_name
  ,q.user_concurrent_queue_name
  ,q.target_node
  ,q.max_processes
  ,q.running_processes
  ,running.run running
  ,pending.pend
  ,DECODE(q.control_code, 'D', 'Deactivating'
, 'E', 'Deactivated'
, 'N', 'Node unavai'
, 'A', 'Activating'
, 'X', 'Terminated'
, 'T', 'Terminating'
, 'V', 'Verifying'
, 'O', 'Suspending'
, 'P', 'Suspended'
, 'Q', 'Resuming'
, 'R', 'Restarting') status
  FROM (SELECT concurrent_queue_name
              ,COUNT(phase_code) run
          FROM fnd_concurrent_worker_requests
         WHERE phase_code = 'R'
           AND hold_flag != 'Y'
           AND requested_start_date <= SYSDATE GROUP BY concurrent_queue_name
) running
   ,(SELECT concurrent_queue_name
           ,COUNT(phase_code) pend 
   FROM fnd_concurrent_worker_requests 
  WHERE phase_code = 'P' 
    AND hold_flag != 'Y' 
AND requested_start_date <= SYSDATE GROUP BY concurrent_queue_name
    ) pending
   ,apps.fnd_concurrent_queues_vl q
 WHERE q.concurrent_queue_name = running.concurrent_queue_name(+) 
   AND q.concurrent_queue_name = pending.concurrent_queue_name(+) 
   AND q.enabled_flag = 'Y' 
ORDER BY DECODE(q.application_id, 0, DECODE(q.concurrent_queue_id, 1, 1,4, 2))
     ,SIGN(q.max_processes) DESC
,q.concurrent_queue_name
,q.application_id

No comments:

Post a Comment

Query to get Parent and Child Accounts in Oracle APPS R12

SELECT ffv1.flex_value parent_account       ,ffvt1.description parent_account_desc   ,ffv2.flex_value child_account   ,ffvt2.description...