How to Check If Oracle Transport Agent (OTA) and ECX Agents Are Running

APPLIES TO:
Oracle XML Gateway - Version 11.5 to 12.2.7 [Release 11.5 to 12.2]
Information in this document applies to any platform.

GOAL:
Provide a SQL Script to Determine if OTA and ECX (OTA/OXTA) agents are running

SOLUTION:
Run the following SQL as APPS:

SELECT #1
=========
DECLARE
ota_running NUMBER := null;
agent_running NUMBER := null;

BEGIN

SELECT COUNT(*) INTO ota_running
FROM gv$session
WHERE action LIKE '%OXTA%';

SELECT COUNT(fcp.OS_PROCESS_ID) INTO agent_running
FROM fnd_concurrent_queues_vl fcq, fnd_cp_services fcs, fnd_concurrent_processes fcp, fnd_svc_components fsc
WHERE fcq.manager_type = fcs.service_id
AND fcs.service_handle = 'FNDCPGSC'
AND fsc.concurrent_queue_id = fcq.concurrent_queue_id(+)
AND fcq.concurrent_queue_id = fcp.concurrent_queue_id(+)
AND fcq.application_id = fcp.queue_application_id(+)
AND fcp.process_status_code(+) = 'A'
AND fsc.component_name like 'ECX%';

DBMS_OUTPUT.PUT_LINE('-----------------------------------------------------------------------------');

IF ota_running> 0 THEN
DBMS_OUTPUT.PUT_LINE('OTA is Running');
ELSE
DBMS_OUTPUT.PUT_LINE('OTA is NOT Running');
END IF;

DBMS_OUTPUT.PUT_LINE('-----------------------------------------------------------------------------');

IF agent_running = 0 THEN
DBMS_OUTPUT.PUT_LINE('XML Gateway Agents are NOT Running:');
ELSE

DBMS_OUTPUT.PUT_LINE('There are ' || AGENT_RUNNING || ' XML Gateway agents running');

END IF;

DBMS_OUTPUT.PUT_LINE('-----------------------------------------------------------------------------');

END;

SELECT #2: 
=========
Additional SQL to see "what" is running: 
SELECT fcq.USER_CONCURRENT_QUEUE_NAME Container_Name, DECODE(fcp.OS_PROCESS_ID,NULL,'Not Running',fcp.OS_PROCESS_ID) PROCID,
fcq.MAX_PROCESSES TARGET,
fcq.RUNNING_PROCESSES ACTUAL,
fcq.ENABLED_FLAG ENABLED,
fsc.COMPONENT_NAME,
fsc.STARTUP_MODE,
fsc.COMPONENT_STATUS
from APPS.FND_CONCURRENT_QUEUES_VL fcq, APPS.FND_CP_SERVICES fcs, APPS.FND_CONCURRENT_PROCESSES
fcp, fnd_svc_components fsc
WHERE fcq.MANAGER_TYPE = fcs.SERVICE_ID
AND fcs.SERVICE_HANDLE = 'FNDCPGSC'
AND fsc.concurrent_queue_id = fcq.concurrent_queue_id(+)
AND fcq.concurrent_queue_id = fcp.concurrent_queue_id(+)
AND fcq.application_id = fcp.queue_application_id(+)
AND fcp.process_status_code(+) = 'A'
ORDER BY fcp.OS_PROCESS_ID, fsc.STARTUP_MODE;
Recent Posts