Friday, July 29, 2011

Wt all Jobs Running.................when Performance is tooooo Bad

To knw what all Jobs running @ particular time interval where you r experiencing major performance issue:

PROMPT Enter the start_time and end_time when prompted
PROMPT Date format example for start_time 1-JUL-2011 10:00:00
PROMPT Date format example for end_time 1-JUL-2011 11:00:00
PROMPT The example above will find all requests that launched between 10 am and 11 am on 16-DEC-2008

select /*+ ORDERED USE_NL(x fcr fcp fcptl)*/
fcr.request_id "Request ID",
fcr.requested_by "User",
substr(DECODE (FCR.DESCRIPTION, NULL,
FCPTL.USER_CONCURRENT_PROGRAM_NAME,
FCR.DESCRIPTION||' ('||FCPTL.USER_CONCURRENT_PROGRAM_NAME||')'),1,80)"Program Name",
fcr.phase_code "Phase",
fcr.status_code "Status",
to_char(fcr.request_date,'DD-MON-YYYY HH24:MI:SS') "Submitted",
(fcr.actual_start_date - fcr.request_date)*1440 "Delay",
to_char(fcr.actual_start_date,'DD-MON-YYYY HH24:MI:SS') "Start Time",
to_char(fcr.actual_completion_date, 'DD-MON-YYYY HH24:MI:SS') "End Time",
(fcr.actual_completion_date - fcr.actual_start_date)*1440 "Elapsed Time",
oracle_process_id "Trace File ID" ,
fcr.argument_text "Parameters"
from fnd_concurrent_requests fcr,
fnd_concurrent_programs fcp,
fnd_concurrent_programs_tl fcptl
where fcr.concurrent_program_id = fcp.concurrent_program_id
and fcr.program_application_id = fcp.application_id
and fcp.application_id = fcptl.application_id
and fcp.concurrent_program_id = fcptl.concurrent_program_id
and fcptl.language = 'US'
and fcr.actual_start_date
between
to_date('&start_time','DD-MON-YYYY HH24:MI:SS') --ENTER FROM DATE/TIME like 16-DEC-2008 10:00:00
and
to_date('&end_time','DD-MON-YYYY HH24:MI:SS') -- ENTER TO DATE/TIME like 16-DEC-2008 11:00:00
-- AND FCP.APPLICATION_ID in (724,723) -- isolates ASCP (MSC, MSO) programs -- use 722 for MSD, 704 for MRP
-- AND fcr.requested_by = &user_id
order by 8;


UR's Key Run ;-) 

No comments:

Post a Comment