Sunteți pe pagina 1din 2

1 .

Query to find all the Conc Program with Value set


-----------------------------------------------------
SELECT fcpl1.user_concurrent_program_name
,fdfcuv.end_user_column_name
,ffvs.flex_value_set_name
,ffvt.application_table_name,
ffvt.value_column_name
,ffvt.additional_where_clause
FROM apps.fnd_concurrent_programs fcp1
,apps.fnd_descr_flex_col_usage_vl fdfcuv
,apps.fnd_flex_value_sets ffvs
,apps.fnd_flex_validation_tables ffvt
, apps.fnd_concurrent_programs_tl fcpl1
WHERE 1 = 1
AND fcp1.concurrent_program_id IN (SELECT DISTINCT fcp.concurrent_program_id
FROM apps.fnd_concurrent_programs fcp
, apps.fnd_concurrent_programs_tl fcpl
,apps.fnd_concurrent_requests fcr
WHERE 1 = 1
AND fcp.concurrent_program_id = fcpl.concurrent_program_id
AND fcpl.language = 'US'
AND fcr.concurrent_program_id = fcpl.concurrent_program_id
AND trunc(fcr.request_date) BETWEEN '01-JUN-17' AND '30-JUN-17'
AND fcp.concurrent_program_name LIKE '%XXINDUS%'
AND fcp.concurrent_program_name NOT LIKE '%XXINDUSC0%')
AND fdfcuv.descriptive_flexfield_name = '$SRS$.' ||
fcp1.concurrent_program_name
AND ffvs.flex_value_set_id = fdfcuv.flex_value_set_id
AND ffvt.flex_value_set_id = ffvs.flex_value_set_id
AND fcp1.concurrent_program_id = fcpl1.concurrent_program_id
ORDER BY fcpl1.user_concurrent_program_name ;

select * from apps.fnd_flex_validation_tables;

SELECT c.rows_processed , c.sql_id,c.sql_text "SQL Text",


'Request id: '||request_id ,
'Trace id: '||oracle_Process_id,
'Trace Flag: '||req.enable_trace,
'Trace Name:
'||dest.value||'/'||lower(dbnm.value)||'_ora_'||oracle_process_id||'.trc',
'Prog. Name: '||prog.user_concurrent_program_name,
'File Name: '||execname.execution_file_name|| execname.subroutine_name ,
'Status : '||decode(phase_code,'R','Running')
||'-'||decode(status_code,'R','Normal'),
'SID Serial: '||ses.sid||','|| ses.serial#,
'Module : '||ses.module
,ses.username "Oracle User", proc.spid "Unix PID", ses.SID "Oracle Sid",
ses.serial# "Oracle Serial", ses.osuser "OS User", ses.machine "Computer",
ses.program "Program",
TO_CHAR (logon_time, 'HH24:MI:SS,yyyy/mm/dd') "Login Time",
ses.action "Session Action", --c.action "SQL Action",
lockwait "LockWait",
status "Status", optimizer_cost "Optimizer_cost"
from apps.fnd_concurrent_requests req,v$session ses, v$process proc,
v$parameter dest, v$parameter dbnm,
apps.fnd_concurrent_programs_vl prog,
apps.fnd_executables execname ,gv$sql c
where req.request_id = 57577199 --38445328 --1190673
and req.oracle_process_id=proc.spid(+)
and proc.addr = ses.paddr(+)
AND ses.sql_address = c.address(+)
AND ses.sql_hash_value = c.hash_value(+)
and dest.name='user_dump_dest'
and dbnm.name='db_name'
and req.concurrent_program_id = prog.concurrent_program_id
and req.program_application_id = prog.application_id
and prog.application_id = execname.application_id
and prog.executable_id=execname.executable_id;

S-ar putea să vă placă și