Dba_oracle ERP Concurrent program run status query and monitoring (case)

Source: Internet
Author: User

2014-08-09 Created by Baoxinjian

Looking on what to check long running concurrent request in Oracle Apps 11i or R12? Here's the overview of the SQL query script to detect the session information of all program. First you need to get the listing of running concurrent request in Oracle Apps 11i or R12. You can use the SQL query script as below to obtain the list of running request.

[SQL]View Plaincopyprint?
  1. SELECT a.request_id
  2. , a.oracle_process_id "SPID"
  3. , Frt.responsibility_name
  4. , C.concurrent_program_name | | ': ' | | | ctl.user_concurrent_program_name
  5. , a.description
  6. , A.argument_text
  7. , B.node_name
  8. , b.db_instance
  9. , A.logfile_name
  10. , A.logfile_node_name
  11. , A.outfile_name
  12. , Q.concurrent_queue_name
  13. , A.phase_code,a.status_code, A.completion_text
  14. , Actual_start_date
  15. , Actual_completion_date
  16. , Fu.user_name
  17. , (NVL (actual_completion_date,sysdate)-actual_start_date) *1440 mins
  18. , (SELECT avg (NVL (a2.actual_completion_date-a2.actual_start_date,0)) *1440 avg_run_time
  19. From Applsys.fnd_concurrent_requests A2,
  20. Applsys.fnd_concurrent_programs C2
  21. WHERE c2.concurrent_program_id = c.concurrent_program_id
  22. and a2.concurrent_program_id = c2.concurrent_program_id
  23. and a2.program_application_id = c2.application_id
  24. and A2.phase_code | | ' = ' C ') avg_mins
  25. , round ((actual_completion_date-requested_start_date), 2) * duration_in_hours
  26. From applsys.fnd_concurrent_requests a,applsys.fnd_concurrent_processes b
  27. , Applsys.fnd_concurrent_queues Q
  28. , Applsys.fnd_concurrent_programs C
  29. , Applsys.fnd_concurrent_programs_tl ctl
  30. , Apps.fnd_user Fu
  31. , Apps. FND_RESPONSIBILITY_TL frt
  32. WHERE A.controlling_manager = b.concurrent_process_id
  33. and a.concurrent_program_id = c.concurrent_program_id
  34. and a.program_application_id = c.application_id
  35. and A.phase_code = ' R '
  36. and A.status_code = ' R '
  37. and b.queue_application_id = q.application_id
  38. and b.concurrent_queue_id = q.concurrent_queue_id
  39. and ctl.concurrent_program_id = c.concurrent_program_id
  40. and a.requested_by = fu.user_id
  41. and a.responsibility_id = frt.responsibility_id
  42. ORDER by a.actual_start_date DESC
Select a.request_id,a.oracle_process_id "SPID", Frt.responsibility_name,c.concurrent_program_name | | ': ' | | Ctl.user_concurrent_program_name,a.description,a.argument_text,b.node_name,b.db_instance,a.logfile_name, A.logfile_node_name,a.outfile_name,q.concurrent_queue_name,a.phase_code,a.status_code, A.completion_text, actual _start_date, Actual_completion_date, Fu.user_name, (NVL (actual_completion_date,sysdate)-actual_start_date) *1440 mins, (SELECT avg (NVL (a2.actual_completion_date-a2.actual_start_date,0)) *1440 Avg_run_timefrom Applsys.fnd_ Concurrent_requests a2,applsys.fnd_concurrent_programs c2where c2.concurrent_program_id = C.CONCURRENT_PROGRAM_ Idand a2.concurrent_program_id = C2.concurrent_program_idand a2.program_application_id = C2.application_idAND A2.phase_code | | ' = ' C ') Avg_mins,round ((actual_completion_date-requested_start_date), 2) * Duration_in_hoursfrom APPLSYS.fnd_ Concurrent_requests a,applsys.fnd_concurrent_processes b,applsys.fnd_concurrent_queues Q,APPLSYS.fnd_concuRrent_programs c,applsys.fnd_concurrent_programs_tl ctl,apps.fnd_user Fu,apps. Fnd_responsibility_tl frtwhere A.controlling_manager = B.concurrent_process_idand a.concurrent_program_id = C.concurrent_program_idand a.program_application_id = C.application_idand A.phase_code = ' r ' and A.status_code = ' R ' and b . queue_application_id = Q.application_idand b.concurrent_queue_id = Q.concurrent_queue_idand CTL.CONCURRENT_PROGRAM_ id = C.concurrent_program_idand A.requested_by = Fu.user_idand a.responsibility_id = Frt.responsibility_idorder by A.actual_start_date DESC

You can see the request ID and other relevant information from the result.

Based on the SPID associated to all running request, query the v$session or V$session_longops table to see what's the RE Quest ID doing in the backend.

[SQL]View Plaincopyprint?
  1. SELECT B.sid, b.serial#, A.spid, B.program, B.osuser, B.machine,
  2. B.type, b.event, B.action, B.p1text, B.p2text, B.p3text, B.state, C.sql_text,b.logon_time
  3. From V$process A, v$session B, V$sqltext c
  4. WHERE a.addr=b.paddr
  5. and B.sql_hash_value = C.hash_value
  6. and b.status = ' ACTIVE '
  7. and a.spid = ' 11696 '
  8. ORDER by A.spid, C.piece
SELECT B.sid, b.serial#, A.spid, B.program, B.osuser, B.machine,b.type, B.event, B.action, B.p1text, B.p2text, B.p3text, b . State, C.sql_text,b.logon_timefrom v$process A, v$session B, v$sqltext cwhere a.addr=b.paddrand b.sql_hash_value = C.has H_valueand b.status = ' ACTIVE ' and a.spid = ' 11696 ' ORDER by A.spid, c.piece

Replace v$session with Gv$session if the database are running on RAC environment. Enable or set trace if you wish to know more details on the session.

Thanks and regards

Dba_oracle ERP Concurrent program run status query and monitoring (case)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.