/* Application User Activity monitoring */ -- can be used to throubleshoot the timeout issues...
select
disabled_flag,
to_char(first_connect,'MM/DD/YYYY HH:MI:SS') Start_Time,
to_char(sysdate,'HH:MI:SS') Current_Time,
USER_NAME,
session_id,
(SYSDATE-last_connect)*24*60 Mins_Idle,
fnd_profile.value_specific
('ICX_SESSION_TIMEOUT',
a.user_id,
a.responsibility_id,
a.responsibility_application_id,
a.org_id,
NULL
) TimeOut
from
ICX_SESSIONS a, fnd_User b
where
a.user_id=b.user_id
and last_connect > sysdate-1/24;
select
disabled_flag,
to_char(first_connect,'MM/DD/YYYY HH:MI:SS') Start_Time,
to_char(sysdate,'HH:MI:SS') Current_Time,
USER_NAME,
session_id,
(SYSDATE-last_connect)*24*60 Mins_Idle,
fnd_profile.value_specific
('ICX_SESSION_TIMEOUT',
a.user_id,
a.responsibility_id,
a.responsibility_application_id,
a.org_id,
NULL
) TimeOut
from
ICX_SESSIONS a, fnd_User b
where
a.user_id=b.user_id
and last_connect > sysdate-1/24;
------------------------------------------------------------------------------------------------------------
/*Find Attached Responsibility of an Application User*/
SELECT frt.RESPONSIBILITY_NAME, furg.end_date
FROM
fnd_user_resp_groups furg,
FND_RESPONSIBILITY fr,
fnd_responsibility_tl frt,
fnd_user fu
WHERE fu.user_name = '&username'
AND fu.user_id = furg.user_id
AND furg.responsibility_id = fr.RESPONSIBILITY_ID
AND frt.responsibility_id = fr.RESPONSIBILITY_ID
ORDER BY 1
------------------------------------------------------------------------------------------------------------
/*Concurrent Manager Information - Status Check*/
REM
REM FILENAME
REM cmclean.sql
REM DESCRIPTION
REM Clean out the concurrent manager tables
REM NOTES
REM Usage: sqlplus <apps_user/apps_passwd> @cmclean
REM
REM
REM $Id: cmclean.sql,v 1.4 2001/04/07 15:55:07 pferguso Exp $
REM
REM
REM +======================================================================+
set verify off;
set head off;
set timing off
set pagesize 1000
column manager format a20 heading 'Manager short name'
column pid heading 'Process id'
column pscode format a12 heading 'Status code'
column ccode format a12 heading 'Control code'
column request heading 'Request ID'
column pcode format a6 heading 'Phase'
column scode format a6 heading 'Status'
WHENEVER SQLERROR EXIT ROLLBACK;
DOCUMENT
WARNING : Do not run this script without explicit instructions
from Oracle Support
*** Make sure that the managers are shut down ***
*** before running this script ***
*** If the concurrent managers are NOT shut down, ***
*** exit this script now !! ***
#
accept answer prompt 'If you wish to continue type the word ''dual'': '
set feed off
select null from &answer;
set feed on
REM Update process status codes to TERMINATED
prompt
prompt ------------------------------------------------------------------------
prompt -- Updating invalid process status codes in FND_CONCURRENT_PROCESSES
set feedback off
set head on
break on manager
SELECT concurrent_queue_name manager,
concurrent_process_id pid,
process_status_code pscode
FROM fnd_concurrent_queues fcq, fnd_concurrent_processes fcp
WHERE process_status_code not in ('K', 'S')
AND fcq.concurrent_queue_id = fcp.concurrent_queue_id
AND fcq.application_id = fcp.queue_application_id;
set head off
set feedback on
UPDATE fnd_concurrent_processes
SET process_status_code = 'K'
WHERE process_status_code not in ('K', 'S');
REM Set all managers to 0 processes
prompt
prompt ------------------------------------------------------------------------
prompt -- Updating running processes in FND_CONCURRENT_QUEUES
prompt -- Setting running_processes = 0 and max_processes = 0 for all managers
UPDATE fnd_concurrent_queues
SET running_processes = 0, max_processes = 0;
REM Reset control codes
prompt
prompt ------------------------------------------------------------------------
prompt -- Updating invalid control_codes in FND_CONCURRENT_QUEUES
set feedback off
set head on
SELECT concurrent_queue_name manager,
control_code ccode
FROM fnd_concurrent_queues
WHERE control_code not in ('E', 'R', 'X')
AND control_code IS NOT NULL;
set feedback on
set head off
UPDATE fnd_concurrent_queues
SET control_code = NULL
WHERE control_code not in ('E', 'R', 'X')
AND control_code IS NOT NULL;
REM Also null out target_node for all managers
UPDATE fnd_concurrent_queues
SET target_node = null;
REM Set all 'Terminating' requests to Completed/Error
REM Also set Running requests to completed, since the managers are down
prompt
prompt ------------------------------------------------------------------------
prompt -- Updating any Running or Terminating requests to Completed/Error
set feedback off
set head on
SELECT request_id request,
phase_code pcode,
status_code scode
FROM fnd_concurrent_requests
WHERE status_code = 'T' OR phase_code = 'R'
ORDER BY request_id;
set feedback on
set head off
UPDATE fnd_concurrent_requests
SET phase_code = 'C', status_code = 'E'
WHERE status_code ='T' OR phase_code = 'R';
REM Set all Runalone flags to 'N'
REM This has to be done differently for Release 10
prompt
prompt ------------------------------------------------------------------------
prompt -- Updating any Runalone flags to 'N'
prompt
set serveroutput on
set feedback off
declare
c pls_integer := dbms_sql.open_cursor;
upd_rows pls_integer;
vers varchar2(50);
tbl varchar2(50);
col varchar2(50);
statement varchar2(255);
begin
select substr(release_name, 1, 2)
into vers
from fnd_product_groups;
if vers >= 11 then
tbl := 'fnd_conflicts_domain';
col := 'runalone_flag';
else
tbl := 'fnd_concurrent_conflict_sets';
col := 'run_alone_flag';
end if;
statement := 'update ' || tbl || ' set ' || col || '=''N'' where ' || col || ' = ''Y''';
dbms_sql.parse(c, statement, dbms_sql.native);
upd_rows := dbms_sql.execute(c);
dbms_sql.close_cursor(c);
dbms_output.put_line('Updated ' || upd_rows || ' rows of ' || col || ' in ' || tbl || ' to ''N''');
end;
/
prompt
prompt ------------------------------------------------------------------------
prompt Updates complete.
prompt Type commit now to commit these updates, or rollback to cancel.
prompt ------------------------------------------------------------------------
prompt
set feedback on
REM <= Last REM statment -----------------------------------------------------
------------------------------------------------------------------------------------------------------------
/* FIND APPLICATION FILE VERSIONS */
SELECT fi.file_id,
filename,
version
FROM apps.ad_files fi,
apps.ad_file_versions ve
WHERE filename LIKE 'POXRESPO%'
AND ve.file_id = fi.file_id
AND version =
(SELECT MAX(version)
FROM apps.ad_file_versions ven
WHERE ven.file_id = fi.file_id)
/*Find Attached Responsibility of an Application User*/
SELECT frt.RESPONSIBILITY_NAME, furg.end_date
FROM
fnd_user_resp_groups furg,
FND_RESPONSIBILITY fr,
fnd_responsibility_tl frt,
fnd_user fu
WHERE fu.user_name = '&username'
AND fu.user_id = furg.user_id
AND furg.responsibility_id = fr.RESPONSIBILITY_ID
AND frt.responsibility_id = fr.RESPONSIBILITY_ID
ORDER BY 1
------------------------------------------------------------------------------------------------------------
/*Concurrent Manager Information - Status Check*/
SELECT DECODE (
CONCURRENT_QUEUE_NAME,
'FNDICM', 'Internal Manager',
'FNDCRM', 'Conflict Resolution Manager',
'AMSDMIN', 'Marketing Data Mining Manager',
'C_AQCT_SVC', 'C AQCART Service',
'FFTM', 'FastFormula Transaction Manager',
'FNDCPOPP', 'Output Post Processor',
'FNDSCH', 'Scheduler/Prereleaser Manager',
'FNDSM_AQHERP', 'Service Manager: AQHERP',
'FTE_TXN_MANAGER', 'Transportation Manager',
'IEU_SH_CS', 'Session History Cleanup',
'IEU_WL_CS', 'UWQ Worklist Items Release for Crashed session',
'INVMGR', 'Inventory Manager',
'INVTMRPM', 'INV Remote Procedure Manager',
'OAMCOLMGR', 'OAM Metrics Collection Manager',
'PASMGR', 'PA Streamline Manager',
'PODAMGR', 'PO Document Approval Manager',
'RCVOLTM', 'Receiving Transaction Manager',
'STANDARD', 'Standard Manager',
'WFALSNRSVC', 'Workflow Agent Listener Service',
'WFMLRSVC', 'Workflow Mailer Service',
'WFWSSVC', 'Workflow Document Web Services Service',
'WMSTAMGR', 'WMS Task Archiving Manager',
'XDP_APPL_SVC', 'SFM Application Monitoring Service',
'XDP_CTRL_SVC', 'SFM Controller Service',
'XDP_Q_EVENT_SVC', 'SFM Event Manager Queue Service',
'XDP_Q_FA_SVC', 'SFM Fulfillment Actions Queue Service',
'XDP_Q_FE_READY_SVC', 'SFM Fulfillment Element Ready Queue Service',
'XDP_Q_IN_MSG_SVC', 'SFM Inbound Messages Queue Service',
'XDP_Q_ORDER_SVC', 'SFM Order Queue Service',
'XDP_Q_TIMER_SVC', 'SFM Timer Queue Service',
'XDP_Q_WI_SVC', 'SFM Work Item Queue Service',
'XDP_SMIT_SVC', 'SFM SM Interface Test Service')
AS "Concurrent Manager's Name",
max_processes AS "TARGET Processes",
running_processes AS "ACTUAL Processes"
FROM apps.fnd_concurrent_queues
WHERE CONCURRENT_QUEUE_NAME IN
('FNDICM',
'FNDCRM',
'AMSDMIN',
'C_AQCT_SVC',
'FFTM',
'FNDCPOPP',
'FNDSCH',
'FNDSM_AQHERP',
'FTE_TXN_MANAGER',
'IEU_SH_CS',
'IEU_WL_CS',
'INVMGR',
'INVTMRPM',
'OAMCOLMGR',
'PASMGR',
'PODAMGR',
'RCVOLTM',
'STANDARD',
'WFALSNRSVC',
'WFMLRSVC',
'WFWSSVC',
'WMSTAMGR',
'XDP_APPL_SVC',
'XDP_CTRL_SVC',
'XDP_Q_EVENT_SVC',
'XDP_Q_FA_SVC',
'XDP_Q_FE_READY_SVC',
'XDP_Q_IN_MSG_SVC',
'XDP_Q_ORDER_SVC',
'XDP_Q_TIMER_SVC',
'XDP_Q_WI_SVC',
'XDP_SMIT_SVC');
------------------------------------------------------------------------------------------------------------
/*Concurrent Request ordered by elapsed time . Query displays concurrent program short name, program name, request id and start date also*/
SELECT
fcr.request_id request_id,
TRUNC(((fcr.actual_completion_date-fcr.actual_start_date)/(1/24))*60) exec_time,
fcr.actual_start_date start_date,
fcp.concurrent_program_name conc_prog,
fcpt.user_concurrent_program_name user_conc_prog
FROM
fnd_concurrent_programs fcp,
fnd_concurrent_programs_tl fcpt,
fnd_concurrent_requests fcr
WHERE
TRUNC(((fcr.actual_completion_date-fcr.actual_start_date)/(1/24))*60) > NVL('&min',45)
and
fcr.concurrent_program_id = fcp.concurrent_program_id
and
fcr.program_application_id = fcp.application_id
and
fcr.concurrent_program_id = fcpt.concurrent_program_id
and
fcr.program_application_id = fcpt.application_id
and
fcpt.language = USERENV('Lang')
ORDER BY
TRUNC(((fcr.actual_completion_date-fcr.actual_start_date)/(1/24))*60) desc;
------------------------------------------------------------------------------------------------------------
/*Listing profile option values*/
SELECT
fpo.user_profile_option_name
,fpo.profile_option_name
,site.profile_option_value site_val
,r.responsibility_name resp_name
,resp.profile_option_value resp_val
,fu.user_name
,usr.profile_option_value user_val
FROM fnd_profile_options_vl fpo
,fnd_profile_option_values site
,fnd_profile_option_values resp
,fnd_responsibility_vl r
,fnd_profile_option_values usr
,fnd_user fu
WHERE 1=1
AND UPPER( fpo.user_profile_option_name) LIKE 'ICX%' -- Like ICX for example
AND site.profile_option_id(+) = fpo.profile_option_id
AND site.level_id(+) = 10001
AND resp.profile_option_id(+) = fpo.profile_option_id
AND r.responsibility_id (+) = resp.level_value
AND resp.level_id(+) = 10003
AND usr.profile_option_id(+) = fpo.profile_option_id
AND usr.level_id(+) = 10004
AND fu.user_id(+) = usr.level_value
ORDER BY 1
------------------------------------------------------------------------------------------------------------
/*Finding Trace File of a Concurrent Program*/
SELECT '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
from fnd_concurrent_requests req, v$session ses, v$process proc,
v$parameter dest, v$parameter dbnm, fnd_concurrent_programs_vl prog,
fnd_executables execname
where req.request_id = &request
and req.oracle_process_id=proc.spid(+)
and proc.addr = ses.paddr(+)
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;
------------------------------------------------------------------------------------------------------------
/*Finding SID of a Concurrent Request */
select b.sid, oracle_session_id, oracle_process_id, os_process_id
from fnd_concurrent_requests a ,
v$session b
where a.request_id=&request_id and
a.ORACLE_SESSION_ID = b.AUDSID
------------------------------------------------------------------------------------------------------------
/*CMCLEAN.SQL FOR RELEASE 12 */
------------------------------------------------------------------------------------------------------------
/*Listing profile option values*/
SELECT
fpo.user_profile_option_name
,fpo.profile_option_name
,site.profile_option_value site_val
,r.responsibility_name resp_name
,resp.profile_option_value resp_val
,fu.user_name
,usr.profile_option_value user_val
FROM fnd_profile_options_vl fpo
,fnd_profile_option_values site
,fnd_profile_option_values resp
,fnd_responsibility_vl r
,fnd_profile_option_values usr
,fnd_user fu
WHERE 1=1
AND UPPER( fpo.user_profile_option_name) LIKE 'ICX%' -- Like ICX for example
AND site.profile_option_id(+) = fpo.profile_option_id
AND site.level_id(+) = 10001
AND resp.profile_option_id(+) = fpo.profile_option_id
AND r.responsibility_id (+) = resp.level_value
AND resp.level_id(+) = 10003
AND usr.profile_option_id(+) = fpo.profile_option_id
AND usr.level_id(+) = 10004
AND fu.user_id(+) = usr.level_value
ORDER BY 1
------------------------------------------------------------------------------------------------------------
/*Finding Trace File of a Concurrent Program*/
SELECT '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
from fnd_concurrent_requests req, v$session ses, v$process proc,
v$parameter dest, v$parameter dbnm, fnd_concurrent_programs_vl prog,
fnd_executables execname
where req.request_id = &request
and req.oracle_process_id=proc.spid(+)
and proc.addr = ses.paddr(+)
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;
------------------------------------------------------------------------------------------------------------
/*Finding SID of a Concurrent Request */
select b.sid, oracle_session_id, oracle_process_id, os_process_id
from fnd_concurrent_requests a ,
v$session b
where a.request_id=&request_id and
a.ORACLE_SESSION_ID = b.AUDSID
------------------------------------------------------------------------------------------------------------
/*CMCLEAN.SQL FOR RELEASE 12 */
REM
REM FILENAME
REM cmclean.sql
REM DESCRIPTION
REM Clean out the concurrent manager tables
REM NOTES
REM Usage: sqlplus <apps_user/apps_passwd> @cmclean
REM
REM
REM $Id: cmclean.sql,v 1.4 2001/04/07 15:55:07 pferguso Exp $
REM
REM
REM +======================================================================+
set verify off;
set head off;
set timing off
set pagesize 1000
column manager format a20 heading 'Manager short name'
column pid heading 'Process id'
column pscode format a12 heading 'Status code'
column ccode format a12 heading 'Control code'
column request heading 'Request ID'
column pcode format a6 heading 'Phase'
column scode format a6 heading 'Status'
WHENEVER SQLERROR EXIT ROLLBACK;
DOCUMENT
WARNING : Do not run this script without explicit instructions
from Oracle Support
*** Make sure that the managers are shut down ***
*** before running this script ***
*** If the concurrent managers are NOT shut down, ***
*** exit this script now !! ***
#
accept answer prompt 'If you wish to continue type the word ''dual'': '
set feed off
select null from &answer;
set feed on
REM Update process status codes to TERMINATED
prompt
prompt ------------------------------------------------------------------------
prompt -- Updating invalid process status codes in FND_CONCURRENT_PROCESSES
set feedback off
set head on
break on manager
SELECT concurrent_queue_name manager,
concurrent_process_id pid,
process_status_code pscode
FROM fnd_concurrent_queues fcq, fnd_concurrent_processes fcp
WHERE process_status_code not in ('K', 'S')
AND fcq.concurrent_queue_id = fcp.concurrent_queue_id
AND fcq.application_id = fcp.queue_application_id;
set head off
set feedback on
UPDATE fnd_concurrent_processes
SET process_status_code = 'K'
WHERE process_status_code not in ('K', 'S');
REM Set all managers to 0 processes
prompt
prompt ------------------------------------------------------------------------
prompt -- Updating running processes in FND_CONCURRENT_QUEUES
prompt -- Setting running_processes = 0 and max_processes = 0 for all managers
UPDATE fnd_concurrent_queues
SET running_processes = 0, max_processes = 0;
REM Reset control codes
prompt
prompt ------------------------------------------------------------------------
prompt -- Updating invalid control_codes in FND_CONCURRENT_QUEUES
set feedback off
set head on
SELECT concurrent_queue_name manager,
control_code ccode
FROM fnd_concurrent_queues
WHERE control_code not in ('E', 'R', 'X')
AND control_code IS NOT NULL;
set feedback on
set head off
UPDATE fnd_concurrent_queues
SET control_code = NULL
WHERE control_code not in ('E', 'R', 'X')
AND control_code IS NOT NULL;
REM Also null out target_node for all managers
UPDATE fnd_concurrent_queues
SET target_node = null;
REM Set all 'Terminating' requests to Completed/Error
REM Also set Running requests to completed, since the managers are down
prompt
prompt ------------------------------------------------------------------------
prompt -- Updating any Running or Terminating requests to Completed/Error
set feedback off
set head on
SELECT request_id request,
phase_code pcode,
status_code scode
FROM fnd_concurrent_requests
WHERE status_code = 'T' OR phase_code = 'R'
ORDER BY request_id;
set feedback on
set head off
UPDATE fnd_concurrent_requests
SET phase_code = 'C', status_code = 'E'
WHERE status_code ='T' OR phase_code = 'R';
REM Set all Runalone flags to 'N'
REM This has to be done differently for Release 10
prompt
prompt ------------------------------------------------------------------------
prompt -- Updating any Runalone flags to 'N'
prompt
set serveroutput on
set feedback off
declare
c pls_integer := dbms_sql.open_cursor;
upd_rows pls_integer;
vers varchar2(50);
tbl varchar2(50);
col varchar2(50);
statement varchar2(255);
begin
select substr(release_name, 1, 2)
into vers
from fnd_product_groups;
if vers >= 11 then
tbl := 'fnd_conflicts_domain';
col := 'runalone_flag';
else
tbl := 'fnd_concurrent_conflict_sets';
col := 'run_alone_flag';
end if;
statement := 'update ' || tbl || ' set ' || col || '=''N'' where ' || col || ' = ''Y''';
dbms_sql.parse(c, statement, dbms_sql.native);
upd_rows := dbms_sql.execute(c);
dbms_sql.close_cursor(c);
dbms_output.put_line('Updated ' || upd_rows || ' rows of ' || col || ' in ' || tbl || ' to ''N''');
end;
/
prompt
prompt ------------------------------------------------------------------------
prompt Updates complete.
prompt Type commit now to commit these updates, or rollback to cancel.
prompt ------------------------------------------------------------------------
prompt
set feedback on
REM <= Last REM statment -----------------------------------------------------
------------------------------------------------------------------------------------------------------------
/* FIND APPLICATION FILE VERSIONS */
SELECT fi.file_id,
filename,
version
FROM apps.ad_files fi,
apps.ad_file_versions ve
WHERE filename LIKE 'POXRESPO%'
AND ve.file_id = fi.file_id
AND version =
(SELECT MAX(version)
FROM apps.ad_file_versions ven
WHERE ven.file_id = fi.file_id)
------------------------------------------------------------------------------------------------------------
/* FIND PRODUCTS INSTALLED */
select a.oracle_id, a.last_update_date, a.product_version,a.patch_level, decode(a.status, 'I', 'Installed', 'S', 'Shared', 'N', 'Not Installed',a.status) Status, a.industry, b.application_name, c.application_short_name from fnd_product_installations a, fnd_application_tl b, fnd_application c where a.application_id = b.application_id and a.application_id = c.application_id and b.language = 'US' order by c.application_short_name;
--------------------------------------------------------------------------------------------------------------
/* LIST E-BUSINESS SUITE PROFILE OPTIONS FOR ALL VALUES */
select p.profile_option_name SHORT_NAME,
n.user_profile_option_name NAME,
decode(v.level_id,
10001, 'Site',
10002, 'Application',
10003, 'Responsibility',
10004, 'User',
10005, 'Server',
10006, 'Org',
10007, decode(to_char(v.level_value2), '-1', 'Responsibility',
decode(to_char(v.level_value), '-1', 'Server',
'Server+Resp')),
'UnDef') LEVEL_SET,
decode(to_char(v.level_id),
'10001', '',
'10002', app.application_short_name,
'10003', rsp.responsibility_key,
'10004', usr.user_name,
'10005', svr.node_name,
'10006', org.name,
'10007', decode(to_char(v.level_value2), '-1', rsp.responsibility_key,
decode(to_char(v.level_value), '-1',
(select node_name from fnd_nodes
where node_id = v.level_value2),
(select node_name from fnd_nodes
where node_id = v.level_value2)||'-'||rsp.responsibility_key)),
'UnDef') "CONTEXT",
v.profile_option_value VALUE
from fnd_profile_options p,
fnd_profile_option_values v,
fnd_profile_options_tl n,
fnd_user usr,
fnd_application app,
fnd_responsibility rsp,
fnd_nodes svr,
hr_operating_units org
where p.profile_option_id = v.profile_option_id (+)
and p.profile_option_name = n.profile_option_name
and upper(p.profile_option_name) in ( select profile_option_name
from fnd_profile_options_tl
where upper(user_profile_option_name)
like upper('%&user_profile_name%'))
and usr.user_id (+) = v.level_value
and rsp.application_id (+) = v.level_value_application_id
and rsp.responsibility_id (+) = v.level_value
and app.application_id (+) = v.level_value
and svr.node_id (+) = v.level_value
and org.organization_id (+) = v.level_value
order by short_name, user_profile_option_name, level_id, level_set;
--------------------------------------------------------------------------------------------------------------
/* TO CHECK SCHEDULED CONCURRENT REQUESTS */
--------------------------------------------------------------------------------------------------------------
/* LIST E-BUSINESS SUITE PROFILE OPTIONS FOR ALL VALUES */
select p.profile_option_name SHORT_NAME,
n.user_profile_option_name NAME,
decode(v.level_id,
10001, 'Site',
10002, 'Application',
10003, 'Responsibility',
10004, 'User',
10005, 'Server',
10006, 'Org',
10007, decode(to_char(v.level_value2), '-1', 'Responsibility',
decode(to_char(v.level_value), '-1', 'Server',
'Server+Resp')),
'UnDef') LEVEL_SET,
decode(to_char(v.level_id),
'10001', '',
'10002', app.application_short_name,
'10003', rsp.responsibility_key,
'10004', usr.user_name,
'10005', svr.node_name,
'10006', org.name,
'10007', decode(to_char(v.level_value2), '-1', rsp.responsibility_key,
decode(to_char(v.level_value), '-1',
(select node_name from fnd_nodes
where node_id = v.level_value2),
(select node_name from fnd_nodes
where node_id = v.level_value2)||'-'||rsp.responsibility_key)),
'UnDef') "CONTEXT",
v.profile_option_value VALUE
from fnd_profile_options p,
fnd_profile_option_values v,
fnd_profile_options_tl n,
fnd_user usr,
fnd_application app,
fnd_responsibility rsp,
fnd_nodes svr,
hr_operating_units org
where p.profile_option_id = v.profile_option_id (+)
and p.profile_option_name = n.profile_option_name
and upper(p.profile_option_name) in ( select profile_option_name
from fnd_profile_options_tl
where upper(user_profile_option_name)
like upper('%&user_profile_name%'))
and usr.user_id (+) = v.level_value
and rsp.application_id (+) = v.level_value_application_id
and rsp.responsibility_id (+) = v.level_value
and app.application_id (+) = v.level_value
and svr.node_id (+) = v.level_value
and org.organization_id (+) = v.level_value
order by short_name, user_profile_option_name, level_id, level_set;
--------------------------------------------------------------------------------------------------------------
/* TO CHECK SCHEDULED CONCURRENT REQUESTS */
select
fcr.request_id,
fcr.parent_request_id,
fu.user_name requestor,
to_char(fcr.requested_start_date, 'MON-DD-YYYY HH24:MM:SS') START_DATE,
fr.responsibility_key responsibility,
fcp.concurrent_program_name,
fcpt.user_concurrent_program_name,
decode(fcr.status_code,
'A', 'Waiting',
'B', 'Resuming',
'C', 'Normal',
'D', 'Cancelled',
'E', 'Error',
'F', 'Scheduled',
'G', 'Warning',
'H', 'On Hold',
'I', 'Normal',
'M', 'No Manager',
'Q', 'Standby',
'R', 'Normal',
'S', 'Suspended',
'T', 'Terminating',
'U', 'Disabled',
'W', 'Paused',
'X', 'Terminated',
'Z', 'Waiting') status,
decode(fcr.phase_code,
'C', 'Completed',
'I', 'Inactive',
'P', 'Pending',
'R', 'Running') phase,
fcr.completion_text
from
fnd_concurrent_requests fcr,
fnd_concurrent_programs fcp,
fnd_concurrent_programs_tl fcpt,
fnd_user fu,
fnd_responsibility fr
where
fcr.status_code in ('Q', 'I') and
fcr.hold_flag = 'N' and
fcr.requested_start_date > sysdate and
fu.user_id = fcr.requested_by and
fcr.concurrent_program_id = fcp.concurrent_program_id and
fcr.concurrent_program_id = fcpt.concurrent_program_id and
fcr.responsibility_id = fr.responsibility_id
order by
fcr.requested_start_date, fcr.request_id;
--------------------------------------------------------------------------------------------------------------
/* CHECKING APPLICATION USER LOGIN */select fnd_web_sec.validate_login('user','password') from dual;Ex: select fnd_web_sec.validate_login('sysadmin','welcome') from dual;--------------------------------------------------------------------------------------------------------------
/* CHANGE APPLICATION USER PASSWORD USING FNDCPASS*/FNDCPASS apps/APPS_PASSWORD 0 Y system/SYSTEM_PASSWORD USER USER_WHOSE_PASSWORD_WILL_BE_CHANGED NEWPASSWORD Example: FNDCPASS apps/apps 0 Y system/manager USER SYSADMIN sysadmin--------------------------------------------------------------------------------------------------------------
/* CHANGE "APPS" USER PASSWORD USING FNDCPASS in "R11"*/
FNDCPASS apps/apps 0 Y system/SYSTEM_PASSWORD SYSTEM APPLSYS NEWPASSWORD
Note: Changing apps password will also change applsys password. apps and applsys passwords are always the same..
IMPORTANT : After changing apps password using FNDCPASS , following files should be changed to reflect the new apps password as well, because they may contain apps password.
1. $ORACLE_HOME/listener/cfg/wdbsvr.app file
$IAS_ORACLE_HOME\Apache\modplsql\cfg\wdbsvr.app file
2. Workflow Notification Mailer - $FND_TOP/resource/wfmail.cfg
3. The concurrrent manager start script.
4. $OA_HTML/bin/appsweb.cfg
5. $AD_TOP/admin/template/CGIcmd.dat may contain the password if it is being used.
--If you instance is Multi-node and Autoconfig enabled, it may be necessary to invoke Autoconfig to implement the above changes.
--------------------------------------------------------------------------------------------------------------
/* CHANGE "APPS" USER PASSWORD USING FNDCPASS in "R12"*/FNDCPASS apps/APPS_PASSWORD 0 Y system/SYSTEM_PASSWORD SYSTEM APPLSYS NEW_PASSWORD
Note that : For R12.1.2, an enhanced version of FNDCPASS is available. It is named as AFPASSWD.Note: The SYSTEM token is used when changing the APPLSYS password. The ORACLE token is used when changing a SINGLE Applications schema password. The ALLORACLE token is used when changing ALL Applications schema passwords. The USER token is used when changing an Applications USER password.After changing apps password on R12 , run autoconfig (adautocfg.sh) on all nodes.. (db tier and apps tiers)--------------------------------------------------------------------------------------------------------------
SELECT po.profile_option_name "NAME", po.user_profile_option_name, DECODE (TO_CHAR (pov.level_id), '10001', 'SITE', '10002', 'APP', '10003', 'RESP', '10005', 'SERVER', '10006', 'ORG', '10004', 'USER', '10007', 'SERVER+RESP', '???' ) "LEVEL",pov.level_id, pov.profile_option_value "VALUE" FROM apps.fnd_profile_options_vl po, apps.fnd_profile_option_values pov, apps.fnd_user usr, apps.fnd_application app, apps.fnd_responsibility rsp, apps.fnd_nodes svr, apps.hr_operating_units org WHERE 1 = 1 AND pov.application_id = po.application_id AND pov.profile_option_id = po.profile_option_id AND usr.user_id(+) = pov.level_value AND rsp.application_id(+) = pov.level_value_application_id AND rsp.responsibility_id(+) = pov.level_value AND app.application_id(+) = pov.level_value AND svr.node_id(+) = pov.level_value AND org.organization_id(+) = pov.level_value and po.profile_option_name= -->'PROFILE OPTION NAME%'/* CHECK PROFILE OPTION VALUES */--query displays profile option value for a given profile option name in different levels.
--------------------------------------------------------------------------------------------------------------
/*Check Merged patches, if they were applied for the related Languages*/select a.PATCH_DRIVER_ID,DRIVER_FILE_NAME,c.bug_id,d.language from ad_patch_drivers a,AD_COMPRISING_PATCHES b, ad_bugs c,AD_PATCH_DRIVER_LANGS d where c.bug_number = '&no' and c.bug_id = b.bug_id and a.PATCH_DRIVER_ID = b.patch_driver_id and a.patch_driver_id = d.patch_driver_id;
--------------------------------------------------------------------------------------------------------------
/* R12 Dbc File Creation*/java oracle.apps.fnd.security.AdminAppServer apps/apps \ ADD [SECURE_PATH=$FND_TOP/secure] \ DB_HOST=<database host> \ DB_PORT=<database port> \ DB_NAME=<database sid>
--------------------------------------------------------------------------------------------------------------
/* Find Scheduled Concurrent Requests*/
SELECT cr.request_id,DECODE (cp.user_concurrent_program_
name, 'Report Set', 'Report Set:' || cr.description,cp.user_concurrent_program_ name ) NAME, argument_text, cr.resubmit_interval, NVL2 (cr.resubmit_interval, 'PERIODICALLY', NVL2 (cr.release_class_id, 'ON SPECIFIC DAYS', 'ONCE') ) schedule_type, DECODE (NVL2 (cr.resubmit_interval, 'PERIODICALLY', NVL2 (cr.release_class_id, 'ON SPECIFIC DAYS', 'ONCE') ), 'PERIODICALLY', 'EVERY ' || cr.resubmit_interval || ' ' || cr.resubmit_interval_unit_code || ' FROM ' || cr.resubmit_interval_type_code || ' OF PREV RUN', 'ONCE', 'AT :' || TO_CHAR (cr.requested_start_date, 'DD-MON-RR HH24:MI'), 'EVERY: ' || fcr.class_info ) schedule, fu.user_name, requested_start_dateFROM apps.fnd_concurrent_programs_ tl cp, apps.fnd_concurrent_requests cr, apps.fnd_user fu, apps.fnd_conc_release_classes fcr WHERE cp.application_id = cr.program_application_id AND cp.concurrent_program_id = cr.concurrent_program_id AND cr.requested_by = fu.user_id AND cr.phase_code = 'P' AND cr.requested_start_date > SYSDATE AND cp.LANGUAGE = 'US' AND fcr.release_class_id(+) = cr.release_class_id AND fcr.application_id(+) = cr.release_class_app_id;
Nice Doc, Thank you Very Much
ReplyDeleteNo matter what database platform you’re running, dbaDIRECT is your answer for 24×7 monitoring and expert skill, at a lower cost than what’s possible with internal administration. We offer each of our core remote management services for all major database platforms, including Oracle, Sybase, MySQL, SQLServer, and IBM DB2. Our team of DBAs is here ’round the clock for your database needs, capable of servicing any size organization at any time of the day. Period.
ReplyDeleteRemote dba services support 24x7 of below mentioned applications - more… Online Training- Corporate Training- IT Support U Can Reach Us On +917386622889 - +919000444287
http://www.21cssindia.com/support.html
I disagree, I don't think dbaDIRECT is that good, sorry.
DeleteVery Valuable scripts,Thank you.
ReplyDeleteRegards,
Oracle Apps DBA Training.
Very Valuable scripts,Thank you.
ReplyDeleteRegards,
Oracle Apps DBA Training.
very good and helpful scripts
ReplyDeleteI really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Oracle Applications DBA, kindly contact us http://www.maxmunus.com/contact
ReplyDeleteMaxMunus Offer World Class Virtual Instructor led training on Oracle Applications DBA . We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
For Demo Contact us:
Name : Arunkumar U
Email : arun@maxmunus.com
Skype id: training_maxmunus
Contact No.-+91-9738507310
Company Website –http://www.maxmunus.com