Showing posts with label AOL. Show all posts
Showing posts with label AOL. Show all posts

Thursday, 21 February 2013

How to get Request Id for the program run

Below SQL gives the Concurrent Request information,  parameter is concurrent program name.

select fcr.request_id request_id,
fcp.user_concurrent_program_name,substr(resp.responsibility_name ,1,50) responsibility_name,
to_char(fcr.ACTUAL_START_DATE, 'DD-MON-YYYY HH24:MI:SS') Start_date,
to_char(fcr.ACTUAL_COMPLETION_DATE, 'DD-MON-YYYY HH24:MI:SS') completion_date,
round(((fcr.ACTUAL_COMPLETION_DATE-fcr.ACTUAL_START_DATE)*24*60),2) Time_taken,
substr(users.description,1,30) user_description,
substr(fcp.user_concurrent_program_name,1,55) program_name,
fcr.phase_code,fcr.status_code,users.user_name,fcr.argument_text
from apps.fnd_concurrent_requests fcr,
apps.fnd_concurrent_programs_tl fcp,
apps.fnd_user users,
apps.fnd_responsibility_tl resp
where 1 = 1
and fcr.responsibility_id = resp.responsibility_id
and fcr.requested_by = users.user_id
and fcp.concurrent_program_id = fcr.concurrent_program_id
and fcr.request_date > (sysdate - 200)
and fcp.user_concurrent_program_name like &User_Conc_prog_name
order by fcr.request_date desc ;

How to get object definition from database

Below statement gets the database object definition from database.

select dbms_metadata.get_ddl('OBJECT_TYPE','OBJECT_NAME','SCHEMA') from dual;

Object_type,Object_name and Schema should be in Caps.