Scheduled concurrent requests Lot of times we need to find out the concurrent programs scheduled.

Users can sc hedule the concurrent requests in three ways (To run once at a specified time / To run periodically / To run on specific days of the month or week). The below query will return all the concurrent requests which are scheduled usin g any of the above methods:

SELECT cr.request_id, DECODE (cp.user_concurrent_program_name, 'Report Set', 'Report Set:' cr.description, cp.user_concurrent_program_name ) NAME, argument_text, cr.resubmit_interval, NVL2 (cr.resubmit_interval, 'PERIODICALLY', NVL2 (cr.release_class_id, 'ON SPECIFIC DAYS', 'ONCE') ) schedule_type, DECODE (NVL2 (cr.resubmit_interval, 'PERIODICALLY', NVL2 (cr.release_class_id, 'ON SPECIFIC DAYS', 'ONCE') ), 'PERIODICALLY', 'EVERY ' cr.resubmit_interval ' ' cr.resubmit_interval_unit_code ' FROM ' cr.resubmit_interval_type_code ' OF PREV RUN', 'ONCE', 'AT :' TO_CHAR (cr.requested_start_date, 'DD-MON-RR HH24:MI'), 'EVERY: ' fcr.class_info ) schedule, fu.user_name, requested_start_date FROM apps.fnd_concurrent_programs_tl cp, apps.fnd_concurrent_requests cr, apps.fnd_user fu, apps.fnd_conc_release_classes fcr WHERE cp.application_id = cr.program_application_id AND cp.concurrent_program_id = cr.concurrent_program_id AND cr.requested_by = fu.user_id AND cr.phase_code = 'P' AND cr.requested_start_date > SYSDATE AND cp.LANGUAGE = 'US' AND fcr.release_class_id(+) = cr.release_class_id AND fcr.application_id(+) = cr.release_class_app_id; Note: The "SCHEDULE" column in the above query returns a string of zeros and one s for the requests which are scheduled on specific days of the month or week. Positions 1 through 31: Specific day of the month. Position 32: Last day of the month Positions 33 through 39: Sunday through Saturday Checking the duplicated schedules of the same program with the same arguments The below query can be used to check the duplicated schedule of the same program

requested_start_date > SYSDATE AND cp. apps. argument_text.application_id = cr. user_name HAVING COUNT (*) > 1) ORDER BY user_name.user_name NOT LIKE 'PPG%') t2 WHERE t1.user_concurrent_program_name ) NAME. argument_text.concurrent_program_id AND cr.description.user_name NOT LIKE 'PPG%') t1 WHERE EXISTS ( SELECT 1 FROM (SELECT cr.user_concurrent_program_name. NAME Average pending time per request This is a very useful query to check the performance of the concurrent managers.Actual_start_date ) / Tot al requests .user_id AND cr. 'Report Set'. SELECT request_id.user_concurrent_program_name.argument_text AND t1. apps.requested_by = fu.user_name GROUP BY NAME. This can be used to alert the users to cancel these du plicated schedules. apps.fnd_concurrent_requests cr.request_id.application_id = cr.NAME = t2. cp.LANGUAGE = 'US' AND fu.fnd_concurrent_programs_tl cp.concurrent_program_id AND cr. DECODE (cp. 'Report Set:' cr.NAME AND t1. cp.fnd_user fu WHERE cp. argument_text.program_application_id AND cp.fnd_user fu WHERE cp. fu.concurrent_program_id = cr. user_name FROM (SELECT cr.request_id.requested_by = fu.user_name = t2.fnd_concurrent_requests cr. NAME.description.program_application_id AND cp.phase_code = 'P' AND cr.argument_text = t2. DECODE (cp.phase_code = 'P' AND cr. apps.fnd_concurrent_programs_tl cp. Average pending time for a request is calculated like below: ("Highest of Requested_start_date or Date_submitted" .user_id AND cr. fu. argument_text. Note: This query will return even though the request was submitted using a diffe rent responsibility.LANGUAGE = 'US' AND fu.requested_start_date > SYSDATE AND cp. 'Report Set'.user_name FROM apps. 'Report Set:' cr.user_concurrent_program_name ) NAME.user_name FROM apps.concurrent_program_id = cr.with the same arguments.

(SUM ( ( actual_start_date .queue_application_id = fcq.type_application_id(+) = cp. improperly tuned managers (sleep seconds / cache size / number of ma nagers etc) We can schedule this script to gather data regularly for historical analysis as we normally purge the concurrent requests regularly. apps.user_concurrent_program_name = '&USER_CONCURRENT_PROGRAM_NAME' AND NVL (cqc.(CASE WHEN requested_start_date > request_date THEN requested_start_date ELSE request_date END ) ) * 24 * 60 * 60 ) ) / COUNT (*) "Wait_Time_per_Req_in_Secs" FROM apps.LANGUAGE = 'US' AND cp.fnd_concurrent_queues_tl cq WHERE cqc. Checking which manager is going to execute a program The below query identifies the manager which will be executing a given program.concurrent_queue_id = fcq. concurrent_queue_name ORDER BY 2 Note: Depending on the purging schedules some requests might miss if the corresp onding data in fnd_concurrent_processes is purged. 0) = cq.fnd_concurrent_requests cr.phase_code = 'C' AND cr.queue_application_id.type_id(+) = cp.controlling_manager = fcp.concurrent_program_id AND cqc.requested_start_date IS NOT NULL AND cr.fnd_concurrent_queue_content cqc. apps. apps.concurrent_queue_id GROUP BY TO_CHAR (actual_start_date.type_code(+) = 'P' AND cqc.application_id AND cq.LANGUAGE = 'US' To see all the pending / Running requests per each manager wise . SELECT user_concurrent_program_name.include_flag(+) = 'I' AND cp.actual_start_date IS NOT NULL AND cr.fnd_concurrent_queues fcq WHERE cr. concurrent_queue_name. 'DD-MON-YYYY') DAY.fnd_concurrent_processes fcp. This query is based on the specialization rules set for the managers. apps. 0) = cq.concurrent_queue_id.application_id AND fcp.application_id AND cqc.concurrent_process_id AND fcp.fnd_concurrent_programs_tl cp.A Request can be in Pending state for variety of reasons like conflict with othe r requests.concurrent_queue_id AND NVL (cqc. user_concurrent_queue_name FROM apps. 'DD-MON-YYYY'). SELECT TO_CHAR (actual_start_date.

'UNKNOWN' ) incompatible_type FROM apps.to_run_application_id AND a1. Checking the incompatibilities between the programs The below query can be used to find all incompatibilities in an application inst ance. DECODE (running_type. b2.language = 'US' AND a2.phase_code = 'R') AND cwr. user_concurrent_queue_name FROM apps. 'S'. 'Program'.fnd_application_tl b2 WHERE a1. apps. status_code.running_concurrent_program_id AND a2.concurrent_queue_id AND cwr.application_name. b1.user_concurrent_program_name. apps. SELECT a2. a1. 'Program'. 'Request set'.queue_application_id = cq. 'P'.application_id AND cq. DECODE (to_run_type.fnd_concurrent_programs_tl b1.SELECT request_id.fnd_user fu WHERE (cwr.application_id = cps. user_name.language = 'US' AND b2. 'Request set'. 'P'. phase_code.requested_start_date <= SYSDATE AND cwr.to_run_application_id AND b1. apps.concurrent_queue_id = cq.phase_code = 'P' OR cwr.hold_flag != 'Y' AND cwr.user_concurrent_program_name "Incompatible_Prog".fnd_concurrent_programs_tl a1.user_id ORDER BY 5 Note: The same information can be seen in Administer Concurrent Manager form for each manager.running_application_id AND a1.application_name "Incompatible App".fnd_concurrent_worker_requests cwr. apps.running_application_id AND b1.application_id = cps.LANGUAGE = 'US' AND cwr.application_id = cps.language = 'US' AND b1. 'UNKNOWN' ) "Type". apps. 'S'.application_id = cps.concurrent_program_id = cps.fnd_concurrent_program_serial cps.to_run_concurrent_program_id AND b2.requested_by = fu. apps.fnd_application_tl a2.language = 'US' ------------------------------------------------------------------------------Query to find the responsibilities to which the request is been assigned .concurrent_program_id = cps.fnd_concurrent_queues_tl cq.

------------------------------------------------------------------------------SELECT DISTINCT * FROM fnd_responsibility_tl WHERE responsibility_id IN ( SELECT responsibility_id FROM fnd_responsibility_vl WHERE request_group_id IN ( SELECT request_group_id FROM fnd_request_group_units WHERE request_unit_id = (SELECT DISTINCT concurrent_program_id FROM fnd_concurrent_programs_tl WHERE user_concurrent_program_name = :Concurrent_Program_name)) AND end_date IS NULL) AND "LANGUAGE" LIKE 'US' ORDER BY responsibility_name --------------------------------------------------------Query to find the application name --------------------------------------------------------SELECT * FROM fnd_application "application name" WHERE application_id IN (SELECT application_id FROM fnd_request_group_units WHERE request_unit_id=(SELECT DISTINCT concurrent_program_id FROM fnd_concurrent_programs_tl WHERE user_concurrent_program_name=:Concurrent_Program_name)) --------------------------------------------------------Query to find the concurrent program short name --------------------------------------------------------SELECT * FROM fnd_concurrent_programs WHERE concurrent_program_id=(SELECT DISTINCT concurrent_program_id FROM fnd_concurrent_programs_tl WHERE user_concurrent_program_name=:Concurrent_Program_name) --------------------------------------------------------Query to find the execution file name for the request --------------------------------------------------------SELECT * FROM fnd_executables WHERE executable_id=(SELECT executable_id FROM fnd_concurrent_programs WHERE concurrent_program_id=(SELECT DISTINCT concurrent_program_id FROM fnd_concurrent_programs_tl WHERE user_concurrent_program_name=:Concurrent_Program_name)) --------------------------------------------------------Query to find the requests groups --------------------------------------------------------SELECT * FROM fnd_request_groups "requests groups" WHERE request_group_id IN (SELECT request_group_id FROM fnd_request_group_units WHERE request_unit_id=(SELECT DISTINCT concurrent_program_id FROM fnd_concurrent_programs_tl WHERE user_concurrent_program_name=:Concurrent_Program_name)) .

fcp. ----------------------------------------------------------------------------------------------------------------------------------------------------------SELECT 'REQUEST SET' TYPE .user_request_set_name FROM fnd_request_group_units frgus .delete_executable('program short name'.'schema name'). fnd_program.request_set_name LIKE &request_set_name UNION SELECT 'CONC PROG' TYPE .delete_program('program short name'.request_group_name .request_set_id AND frs.fnd_concurrent_programs_vl fcp .request_unit_type = 'S' AND frgus.request_group_id = frg.request_group_id AND frg. The second script will find the responsibility than ca n run a given concurrent program ANDrequest set.request_group_name .fnd_responsibility_vl fr WHERE 1=1 AND fr.fnd_request_sets_vl frs .responsibility_name .--------------------------------------------------------Query for identifying if it is a child process --------------------------------------------------------SELECT * FROM fnd_concurrent_requests WHERE parent_request_id IS NOT NULL AND program_application_id = 20003 AND concurrent_program_id = (SELECT DISTINCT concurrent_program_id FROM fnd_concurrent_programs_tl WHERE user_concurrent_program_name LIKE :Concurrent_Program_name) --------------------------------------------------------Delete the programs from the application --------------------------------------------------------begin fnd_program. ----------------------------------------------------------------------------------------------------------------------------------------------------------The following script will find the responsibility than can run a given concurren t program OR request set.fr.request_unit_id = frs. end.frs.fr.user_request_set_name LIKE &user_request_set_name AND frs. commit.fnd_request_groups frg .request_group_id AND frgus.responsibility_name .fnd_request_groups frg .frg.fnd_responsibility_vl fr WHERE 1=1 .frg.request_group_id = frgus.'schema name').user_concurrent_program_name FROM fnd_request_group_units frgup .

fnd_request_group_units u. fnd_executables e.executable_id and user_concurrent_program_name like '%SEARCH PATTERN%' and fcp. e.concurrent_program_name LIKE &concurrent_program_name -----------------------------------------------------------------------------------------------------------------------------------------------------------Find concurrent programs attached to certain responsibility.request_unit_id = fcp.fcp.request_group_id frgup.user_concurrent_program_name from fnd_responsibility r.concurrent_program_id fcp.rowid erowid.user_concurrent_program_name LIKE &user_concurrent_program_name fcp.request_group_id frg.rowid rrowid.request_group_id = frgup.request_unit_type = 'P' frgup.e. -----------------------------------------------------------------------------------------------------------------------------------------------------------select * from fnd_concurrent_programs_tl where concurrent_program_id in ( select request_unit_id from fnd_request_group_units where request_group_id in ( select request_group_id from fnd_request_groups where request_group_id in ( select request_group_id from fnd_responsibility where responsibility_key = 'YOUR RESPONSIBILITY KEY') )) -----------------------------------------------------------------------------------------------------------------------------------------------------------Find all responsibilities and concurrent program names based on the executable N ame -----------------------------------------------------------------------------------------------------------------------------------------------------------select --r.concurrent_program_id -----------------------------------------------------------------------------------------------------------------------------------------------------------Find all responsibilities having the "search concurrent program" attached to the request group ------------------------------------------------------------------------------------------------------------------------------------------------------------------> select responsibility_key. fnd_concurrent_programs fcp where r.p.rowid frowid.executable_id = e.request_group_id and u.concurrent_program_id = p. fnd_concurrent_programs_tl p. fnd_request_group_units u .request_unit_id = p.rowid prowid.user_concurrent_program_name from fnd_responsibility r.request_group_id = frg.responsibility_key.AND AND AND AND AND AND fr.request_group_id=u.concurrent_program_id and executable_name like '%SEARCH EXECUTABLE PATTERN%' and fcp.executable_name. fnd_concurrent_programs_tl p.

USER_CONCURRENT_PROGRAM_NAME.CONCURRENT_PROGRAM_NAME.request_group_id AND frg. .request_unit_id = frs.request_group_id = frg.request_group_id=u.request_set_name LIKE :request_set_name INTERSECT SELECT fr.request_group_id AND frgus.concurrent_program_id and user_concurrent_program_name like '%SEARCH PATTERN%' ---------------< -----------------------------------------------------------------------------------------------------------------------------------------------------------Find concurrent Program Names based on Responsibility Key Value -----------------------------------------------------------------------------------------------------------------------------------------------------------select * from fnd_concurrent_programs_tl where concurrent_program_id in ( select request_unit_id from fnd_request_group_units where request_group_id in ( select request_group_id from fnd_request_groups where request_group_id in ( select request_group_id from fnd_responsibility where responsibility_key = 'Your Responsibility Key Search Pattern') )) / Note that all the parameters must be entered with a '%' if not used.request_group_id = frgus. A.responsibility_name FROM fnd_request_group_units frgus .request_unit_type = 'P' AND frgup.request_group_id AND frgup.request_unit_id = p.request_group_id and u.fnd_request_sets_vl frs .request_group_id = frg.where r. A.request_group_id = frgup.user_concurrent_program_name LIKE :user_concurrent_program_name AND fcp.executable_Name.user_request_set_name LIKE :user_request_set_name AND frs.request_set_id AND frs. B.fnd_responsibility_vl fr WHERE 1=1 AND fr.fnd_request_groups frg .request_group_id AND frg.responsibility_name FROM fnd_request_group_units frgup .concurrent_program_name LIKE :concurrent_program_name ----------------------------------------------------------------------------------------------------------------------------------------------------------select A. ----------------------------------------------------------------------------------------------------------------------------------------------------------SELECT fr.request_unit_type = 'S' AND frgus.concurrent_program_id AND fcp.request_unit_id = fcp.fnd_request_groups frg .description.fnd_responsibility_vl fr WHERE 1=1 AND fr.fnd_concurrent_programs_vl fcp .

FCP.REQUEST_GROUP_NAME --.APPLICATION_NAME .REQUEST_GROUP_ID = FRGU.EXECUTABLE_ID.CONCURRENT_PROGRAM_NAME .EXECUTION_METHOD_COD E = 'I' AND A.FND_RESPONSIBILITY FNR .USER_CONCURRENT_PROGRAM_NAME IN (select A.EXECUTABLE_ID) AND FNRTL.FND_CONCURRENT_PROGRAMS_TL FCPL .REQUEST_GROUP_ID AND FRG.APPLICATION_ID =FAPP.USER_CONCURRENT_PROGRAM_NAME from FND_CONCURRENT_PROGRAMS_VL A. FND_EXECUTABLES_FORM_V B where upper(A.LANGUAGE = 'US'.FND_APPLICATION_TL FAPP . APPS.REQUEST_GROUP_ID AND FRG.REQUEST_GROUP_ID = FNR.CONCURRENT_PROGRAM_ID = FCPL. FRG.APPLICATION_ID = FNR.FNRTL.USER_CONCURRENT_PROGRAM_NAME .USER_CONCURRENT_PROGRAM_NAME .APPLICATION_ID AND FRG. FCP.FND_CONCURRENT_PROGRAMS FCP .responsibility_id FROM APPS. ----------------------------------------------------------------------------------------------------------------------------------------------------------SELECT DISTINCT FCPL. APPS.LANGUAGE = 'US' AND FAPP. APPS.description from FND_CONCURRENT_PRO GRAMS_VL A.APPLICATION_NAME .FND_CONCURRENT_PROGRAMS FCP .CONCURRENT_PROGRAM_ID AND FCPL.B.CONCURRENT_PROGRAM_NAME .FND_CONCURRENT_PROGRAMS_TL FCPL .APPLICATION_ID AND FCP.FND_RESPONSIBILITY_TL FNRTL WHERE FRG.EXECUTION_FILE_NAME. APPS. APPS. APPS.FND_REQUEST_GROUPS FRG . FAPP. APPS. FNRTL.APPLICATION_ID AND FRG. APPS.REQUEST_GROUP_NAME .APPLICATION_ID = FRGU.B.FND_REQUEST_GROUP_UNITS FRGU . FAPP.RESPONSIBILITY_NAME .EXECUTABLE_ID = B.APPLICATION_ID AND FNR.User_concurrent_program_name) like '%%' and A.FND_REQUEST_GROUP_UNITS FRGU . APPS.USER_EXECUTABLE_NAME. FND_EXECUTABLES_FORM_V B where upper(A. FRG.RESPONSIBILITY_ID = FNRTL.EXECUTION_METHOD_COD E = 'I' AND A.EXECUTABLE_ID = B.FND_RESPONSIBILITY FNR .RESPONSIBILITY_ID AND FRGU.RESPONSIBILITY_NAME FROM APPS. FNRTL.CONCURRENT_PROGRAM_ID AND FRGU. APPS.User_concurrent_program_name) like '%%' and A.REQUEST_UNIT_ID = FCP. APPS.FND_APPLICATION_TL FAPP . -----------------------------------------------------------------------------------------------------------------------------------------------------------final query: SELECT DISTINCT FCPL.FND_REQUEST_GROUPS FRG .UNIT_APPLICATION_ID = FCP.

USER_CONCURRENT_PROGRAM_NAME from FND_CONCURRENT_PROGRAMS_VL A. F ND_EXECUTABLES_FORM_V B where upper(A.APPLICATION_ID AND FCP.LANGUAGE = 'US' AND FAPP.FND_RESPONSIBILITY_TL FNRTL WHERE FRG.APPLICATION_ID =FAPP.LANGUAGE = 'US' order by FNRTL.APPLICATION_ID = FNR.responsibility_name) like upper('%us%Payables%') AND FCPL.USER_CONCURRENT_PROGRAM_NAME IN (select A.EXECUTION_METHOD_CODE = 'I' AND A.REQUEST_GROUP_ID AND FRG. .LANGUAGE = 'US' and FNRTL.User_concurrent_progra m_name) like '%%' and A.APPLICATION_ID AND FRG.EXECUTABLE _ID) AND FNRTL.RESPONSIBILITY_ID AND FRGU.REQUEST_GROUP_ID = FRGU.CONCURRENT_PROGRAM_ID AND FRGU.APPLICATION_ID = FRGU..APPLICATION_ID AND FRG.REQUEST_GROUP_ID AND FRG.EXECUTABLE_ID = B.CONCURRENT_PROGRAM_ID = FCPL.CONCURRENT_PROGRAM_ID AND Upper(FNRTL.responsibility_name.UNIT_APPLICATION_ID = FCP.REQUEST_UNIT_ID = FCP.RESPONSIBILITY_ID = FNRTL. APPS.APPLICATION_ID AND FNR.REQUEST_GROUP_ID = FNR.

Sign up to vote on this title
UsefulNot useful