Appsdbawiki Ebs Scripts
Appsdbawiki Ebs Scripts
Appsdbawiki Ebs Scripts
SELECT fa.application_short_name,
fat.application_name,
DECODE (fpi.status,
'I', 'installed',
'L', 'custom',
'N', 'not installed',
'S', 'installed as shared product')
INSTALLATION_STATUS,
fpi.product_version,
fpi.patch_level
FROM fnd_application fa,
fnd_application_tl fat,
fnd_product_installations fpi
WHERE fa.application_id = fat.application_id
AND fpi.application_id = fat.application_id
AND fat.language = 'US'
ORDER BY 1;
'''Tis a mystery')
"Set for",
val.profile_option_value "Value",
val.last_update_date "Set on",
usr.user_name "Set By",
val.profile_option_id
FROM fnd_profile_options opt,
fnd_profile_option_values val,
fnd_profile_options_tl tl,
fnd_user usr
WHERE opt.profile_option_id = val.profile_option_id
AND opt.profile_option_name = tl.profile_option_name
/*and regexp_like( tl.user_profile_option_name
, '(trace|log|debug|audit|diag|sql)'
, 'i'
)
and not(regexp_like( tl.user_profile_option_name
, '(catalog|file|login|utilities)'
, 'i'
)
)*/
AND usr.user_id = val.last_updated_by
AND usr.user_name NOT IN ('AUTOINSTALL', 'INITIAL SETUP', 'ANONYMOUS')
AND val.last_update_date > SYSDATE - 5
--and tl.user_profile_option_name = 'RCV: Processing Mode'
ORDER BY val.last_update_date DESC;
SELECT r.request_id,
p.user_concurrent_program_name,
r.requested_start_date next_run,
argument_text,
user_name
FROM apps.fnd_concurrent_requests r,
applsys.fnd_conc_release_classes c,
apps.fnd_concurrent_programs_tl p,
apps.fnd_user usr,
( SELECT release_class_id,
SUBSTR (MAX (SYS_CONNECT_BY_PATH (s, ' ')), 2) dates,
a
FROM (SELECT release_class_id,
RANK ()
OVER (PARTITION BY release_class_id ORDER BY s)
a,
s
FROM (SELECT c.class_info,
l,
c.release_class_id,
DECODE (SUBSTR (c.class_info, l, 1),
'1', TO_CHAR (l))
s
FROM ( SELECT LEVEL l
FROM DUAL
CONNECT BY LEVEL <= 31),
apps.fnd_conc_release_classes c
WHERE c.class_type = 'S')
WHERE s IS NOT NULL)
CONNECT BY PRIOR (a || release_class_id) =
(a - 1) || release_class_id
GROUP BY release_class_id, a) dates
WHERE r.phase_code = 'P'
AND c.application_id = r.release_class_app_id
AND c.release_class_id = r.release_class_id
AND NVL (c.date2, SYSDATE + 1) > SYSDATE
AND c.class_type IS NOT NULL
AND p.concurrent_program_id = r.concurrent_program_id
AND p.application_id = r.program_application_id
AND p.language = 'US'
AND dates.release_class_id(+) = r.release_class_id
AND usr.user_id = requested_by
AND r.requested_start_date BETWEEN TO_DATE ('2012-05-09 09:50:00',
'YYYY-MM-DD hh24:mi:ss')
AND TO_DATE ('2012-05-09 10:00:00',
'YYYY-MM-DD hh24:mi:ss')
ORDER BY requested_by, next_run;
/* Temp TB Usage */
/* User Details */
/* Find the users who are assigned with particular program / function */
SELECT --fcq.USER_CONCURRENT_QUEUE_NAME,
fsc.COMPONENT_NAME,
DECODE (fcp.OS_PROCESS_ID, NULL, 'Not Running', fcp.OS_PROCESS_ID)
"Proc ID",
fcq.MAX_PROCESSES "Target Process",
fcq.RUNNING_PROCESSES "Actual Process",
v.PARAMETER_VALUE "# of Threads",
fcq.ENABLED_FLAG "Enabled",
fsc.COMPONENT_ID,
fsc.CORRELATION_ID,
fsc.STARTUP_MODE,
fsc.COMPONENT_STATUS
FROM APPS.FND_CONCURRENT_QUEUES_VL fcq,
APPS.FND_CP_SERVICES fcs,
APPS.FND_CONCURRENT_PROCESSES fcp,
fnd_svc_components fsc,
FND_SVC_COMP_PARAM_VALS_V v
WHERE v.COMPONENT_ID = fsc.COMPONENT_ID
AND fcq.MANAGER_TYPE = fcs.SERVICE_ID
AND fcs.SERVICE_HANDLE = 'FNDCPGSC'
AND fsc.concurrent_queue_id = fcq.concurrent_queue_id(+)
AND fcq.concurrent_queue_id = fcp.concurrent_queue_id(+)
AND fcq.application_id = fcp.queue_application_id(+)
AND fcp.process_status_code(+) = 'A'
AND v.PARAMETER_NAME = 'PROCESSOR_IN_THREAD_COUNT'
ORDER BY fcp.OS_PROCESS_ID, fsc.STARTUP_MODE;
/* XML Version */
SELECT lob_type,
application_short_name,
lob_code,
LANGUAGE,
territory,
file_name,
xdo_file_type
FROM xdo_lobs
WHERE lob_code LIKE 'XXTK_AR_COMM_REPORT%';
COMMIT;
UPDATE apps.xdo_templates_b
SET created_by = 0
WHERE template_code = 'XXTK_AR_COMM_REPORT';
s
FROM (SELECT LEVEL l
FROM DUAL
CONNECT BY LEVEL <= 31),
apps.fnd_conc_release_classes c
WHERE c.class_type = 'S')
WHERE s IS NOT NULL)
CONNECT BY PRIOR (a || release_class_id) =
(a - 1) || release_class_id
GROUP BY release_class_id, a) dates
WHERE -- r.phase_code in ('P','I')
CONCAT (r.phase_code, r.status_code) NOT IN ('CC', 'CI', 'CR')
--and concat(r.phase_code,r.status_code,r.hold_flag) not in ('PCN','PIN','PRN')
--and
--r.status_code not in 'C'
--and r.hold_flag
--and r.hold_flag = 'Y'
AND c.application_id = r.release_class_app_id
AND c.release_class_id = r.release_class_id
AND NVL (c.date2, SYSDATE + 1) > SYSDATE
AND c.class_type IS NOT NULL
AND p.concurrent_program_id = r.concurrent_program_id
AND p.application_id = r.program_application_id
AND p.language = 'US'
AND dates.release_class_id(+) = r.release_class_id
AND usr.user_id = requested_by
AND user_name = '<User_Name>'
--order by requested_by, next_run;
ORDER BY 3;
SELECT v$process.spid,
u_dump.VALUE
|| '/'
|| db_name.VALUE
|| '_ora_'
|| v$process.spid
|| NVL2 (v$process.traceid, '_' || v$process.traceid, NULL)
|| '.trc'
"Trace File"
FROM v$parameter u_dump
CROSS JOIN v$parameter db_name
CROSS JOIN v$process
JOIN v$session
ON v$process.addr = v$session.paddr
WHERE u_dump.name = 'user_dump_dest' AND db_name.name = 'db_name';
ctl.user_concurrent_program_name Concurrent_Program_Name,
request_id "Request Id",
a.argument_text
--a. concurrent_program_id,
--count (a.concurrent_program_id)
FROM 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,
APPLSYS.fnd_user f
WHERE a.controlling_manager = b.concurrent_process_id
AND a.concurrent_program_id = c.concurrent_program_id
AND a.program_application_id = c.application_id
AND b.queue_application_id = q.application_id
AND b.concurrent_queue_id = q.concurrent_queue_id
AND ctl.concurrent_program_id = c.concurrent_program_id
AND ctl.language = 'US'
AND actual_completion_date BETWEEN TO_DATE (
'2012-05-08 10:00:00',
'YYYY-MM-DD hh24:mi:ss')
AND TO_DATE (
'2012-05-09 10:59:00',
'YYYY-MM-DD hh24:mi:ss')
AND actual_start_date IS NOT NULL
AND actual_completion_date IS NOT NULL
AND a.requested_by = f.user_id
AND ctl.user_concurrent_program_name LIKE '%TKM%GT%' --order by
actual_start_date desc;
)
GROUP BY TRUNC (start_date), Concurrent_Program_Name;
/* Incompatability Details */
SELECT a2.application_name,
a1.user_concurrent_program_name,
DECODE (running_type,
'P', 'Program',
'S', 'Request set',
'UNKNOWN')
"Type",
--b2.application_name "Incompatible App",
b1.user_concurrent_program_name "Incompatible_Prog",
DECODE (to_run_type, 'P', 'Program', 'S', 'Request set', 'UNKNOWN')
incompatible_type
FROM apps.fnd_concurrent_program_serial cps,
apps.fnd_concurrent_programs_tl a1,
apps.fnd_concurrent_programs_tl b1,
apps.fnd_application_tl a2,
apps.fnd_application_tl b2
WHERE a1.application_id = cps.running_application_id
AND a1.concurrent_program_id = cps.running_concurrent_program_id
AND a2.application_id = cps.running_application_id
DECLARE
v_session_id INTEGER := userenv('sessionid');
v_user_name VARCHAR2(30) := UPPER('TESTXYZ1');
BEGIN
--Note, can be executed only when you have apps password.
-- Call the procedure to Create FND User
fnd_user_pkg.createuser (
x_user_name => v_user_name,
x_owner => '',
x_unencrypted_password => 'Welcome@123',
x_session_number => v_session_id,
x_start_date => SYSDATE - 10,
x_end_date => SYSDATE + 100,
x_last_logon_date => SYSDATE - 10,
x_description => 'TEST SCRIPT',
x_password_date => SYSDATE - 10,
x_password_accesses_left => 10000,
x_password_lifespan_accesses => 10000,
x_password_lifespan_days => 10000 --,x_employee_id => 30
/*Change this id by running below SQL*/
/*
SELECT person_id
,full_name
FROM per_all_people_f
WHERE upper(full_name) LIKE '%' || upper('<ampersand>full_name') || '%'
GROUP BY person_id
,full_name
*/
,
x_email_address => '[email protected]',
x_fax => '',
x_customer_id => '',
x_supplier_id => '');
fnd_user_pkg.addresp (username => v_user_name,
resp_app => 'SYSADMIN',
resp_key => 'SYSTEM_ADMINISTRATOR',
security_group => 'STANDARD',
description => 'Auto Assignment',
start_date => SYSDATE - 10,
end_date => SYSDATE + 1000);
COMMIT;
END;
/
/* Request Characteristics */
SELECT
NUMBER_OF_COPIES,NLS_LANGUAGE,NLS_TERRITORY,PRINTER,PRINT_STYLE,COMPLETION_T
EXT,OUTPUT_FILE_TYPE,NLS_CODESET,OUTFILE_NODE_NAME,OUTFILE_NAME
FROM FND_CONCURRENT_REQUESTS
WHERE REQUEST_ID = '<Request_ID>';
SELECT PRINTER_STYLE_NAME,
SRW_DRIVER,
WIDTH,
LENGTH,
ORIENTATION
FROM FND_PRINTER_STYLES
WHERE PRINTER_STYLE_NAME = (SELECT PRINT_STYLE
FROM FND_CONCURRENT_REQUESTS
WHERE request_id =' <Request_ID>');
SELECT *
FROM FND_ENV_CONTEXT
WHERE CONCURRENT_PROCESS_ID =
(SELECT CONCURRENT_PROCESS_ID
FROM FND_CONCURRENT_PROCESSES A, FND_CONCURRENT_REQUESTS B
WHERE B.CONTROLLING_MANAGER = A.CONCURRENT_PROCESS_ID
AND B.REQUEST_ID = 52730874)
AND (VARIABLE_NAME IN
('XENVIRONMENT',
'IX_PRINTING',
'ORACLE_HOME',
'LD_LIBRARY_PATH',
'NLS_LANG',
'REPORTS60_NO_DUMMY_PRINTER',
'TK6_PRINT_STATUS',
'TK6_PRINTER',
'TK_PRINTER',
'PRINTER',
'DISPLAY',
'TK_LOCALE',
'PASTA',
'APPLLCSP',
'ORACLE_PRINTER',
'TK_PRINT_STATUS')
OR (VARIABLE_NAME LIKE '%REPORT%' OR VARIABLE_NAME LIKE 'IX_%'));