Refresh Procedure
Refresh Environments
1) Generic Non-ERP
2) Delphix
3) Generic ERP
4) Specific ERP : CG1, BV, QTC, CFN, CTS, CSF, ECP, G2C
5) Specific Environments : OTM, SPM
6) Webex database refresh : http://wikicentral.cisco.com/display/ITSERVICES/R12+-+ERP+Clone
Pre-Refresh Backup & Infra Preparation Steps
Follow the Pre Refresh Wiki page Pre-Refresh Backup & Preparation Steps for the steps that need to be followed before starting the refresh.
Pre-Copy Steps On Target
Shut down target application services and database. Please use stop_oracle to bring down the services.
Pre-Copy Steps On Source
Source is DR
1) Add Special Instructions in DBA Duty Tool.
2) Blackout : EMNPRD/EMPRD : Do indefinite blackout of the source env in the format : <DBNAME> is down for <Target DB> refresh
contact#<CEC ID>.
3) Comment the archive & DG monitoring crons on all the RAC nodes of DR : ##ERMO_Q1FY15_STG_Refresh#13thOct2014 contact#<CEC
ID>##.
4) Touch the below flags on the node where mrp is running :
A.touch /usr/tools/oracle/recovery/norecover/CG1PRD
B.touch /usr/tools/oracle/recovery/norecover/CG1PRD_down_for_copy_contact_sdittaka
C.touch /usr/tools/oracle/recovery/norecover/CG1PRD.nopage.24h
Fourth Flag & SAP Template
D.touch /usr/tools/oracle/Standard/script/flags/CG1PRD1.do_not_run_smart_archive_purge.24h -> touch the flag in PROD and DR all nodes. It's
instance specific
E.Edit the SAP(smart archive purge) template in PROD Instance1 as below.
if the PROD DB is having the single DR then the DEST_ID should be 2
if the PROD DB is having both MVDC setup and DR then the DEST_ID should be 3 as we are using the normal DR for copy.
vi /usr/tools/oracle/Standard/script/flags/dr_schedule_maint_template_CG1PRD1
#DEST_ID DB_UNIQUE_NAME IGNORE_DEST(Y/N) SCHEDULED_MAINTENANCE (Y/N)
2 CG1PRD_STANDBY Y Y
Please make sure you update the DR maintenance template before bringing down the DR database and remove the entries once the DR
database is released.
F.check BCT is enabled in DR or not, make a note of snapshot controlfile location
select file, status, bytes from v$block_change_tracking; -> to check BCT enabled or not.
rman target /
show all; -> to check snapshot control file location.
5) Cancel the managed recovery & bounce the DR Database :
$sqlplus / as sysdba
SQL>recover managed standby database cancel;
$cd /oracle/admin/<SID>/refresh
$sqlplus / as sysdba
SQL>shut immediate; -- on all RAC nodes of DR
SQL>startup nomount; -- only 1st node of DR
SQL>alter database mount standby database;
6) Recover the DR till the timestamp. check the PROD and DR timezones(i.e. PDT/GMT/CDT/EST),based on that use the correct timestamp for
recovery.
SQL>alter session set nls_date_format='YYYY-MM-DD HH24:MI';
SQL>recover standby database until time '2014-04-29 22:00:00' using backup controlfile parallel 20; -- give AUTO
Or
SQL>recover standby database until change 13998116329956 using backup controlfile 20; -- give AUTO (The session should complete with
Media Recovery Complete)
7) Open the database in read only mode to check for consistency and take the copy validation details for copy verification on target.
SQL>alter database open read only; -- DR must open in read only mode. Then only we can confirm that the database is in consistent state for the
copy.
SQL>set lines 200
SQL>set pages 1000
SQL>col name for a60
SQL>set echo on
SQL>spool <SID>_copy_validation_info.log
SQL>select count(1) from v$recover_file;
SQL>select instance_name,status from v$instance;
SQL>select distinct status from v$datafile;
SQL>select name,status from v$datafile where (name like '%MISS%' or status not in ('ONLINE', 'SYSTEM'));
SQL>select count(1) from v$backup where status != 'NOT ACTIVE';
SQL>select distinct to_char(checkpoint_time,'DD-MON-YYYY,HH24:MM:SS'),count(*) from v$datafile_header group by checkpoint_time; --should
return the timestamp to which you have recovered the DR earlier
SQL>col checkpoint_change# format 9999999999999999
SQL>select distinct checkpoint_change# from v$datafile;
SQL>alter database backup controlfile to trace as '/oracle/export/CFNPRD_DR_sdittaka.ctl';
SQL>select distinct fhsta from x$kcvfh;
SQL>select name from v$datafile;
SQL>select count(1) from v$datafile;
SQL>select count(1) from v$controlfile;
SQL>select count(1) from v$logfile;
SQL>select count(1) from v$tempfile;
SQL>shut immediate; -- run this if the copy is being done by SA, else keep it in mount
SQL>spool off;
8) If the DR runs on ASM and the copy is done by SA, dismount the Disk Groups on all the RAC nodes of DR :
$setdb --> ASM
$sqlplus / as sysasm
SQL>select name, state from v$asm_diskgroup;
SQL>alter diskgroup DG_CG1PRD_AR dismount; -- dismount all CG1PRD diskgroups except the GRID related diskgroup
SQL>exit;
Source is Non-DR
1) Blackout : EMNPRD/EMPRD : Do indefinite blackout of the source env in the format : <DBNAME> is down for <Target DB> refresh
contact#<CEC ID>.
2) Comment all the crons on all the DB & FE/CM nodes of source : ##ERMO_Q1FY15_STG_Refresh#13thOct2014 contact#<CEC ID>##.
3) Shutdown the database and application services on source (Don't bring down PROD) using stop_oracle.
EX :./stop_oracle -s TS1G2C1 -u TS1G2C2,TS1G2C3,TS1G2C4 -n lnxdb-pts-vm-209,lnxdb-pts-vm-210,lnxdb-pts-vm-211 -m immediate -p
cecid
4) Gather copy validation info :
$cd /oracle/admin/<SID>/refresh
$sqlplus / as sysdba
SQL>startup nomount; -- only 1st node
SQL>alter database mount;
SQL>alter session set nls_date_format='YYYY-MM-DD HH24:MI';
SQL>set lines 200
SQL>set pages 1000
SQL>col name for a60
SQL>set echo on
SQL>spool <SID>_copy_validation_info.log
SQL>select count(1) from v$recover_file;
SQL>select instance_name,status from v$instance;
SQL>select distinct status from v$datafile;
SQL>select name,status from v$datafile where (name like '%MISS%' or status not in ('ONLINE', 'SYSTEM'));
SQL>select count(1) from v$backup where status != 'NOT ACTIVE';
SQL>select distinct to_char(CHECKPOINT_TIME,'DD-MON-YYYY HH24:MI:SS') Header_Time,to_number(SYSDATE-CHECKPOINT_TIME)*24
"DR Lag (Hrs)" from v$datafile_header;
SQL>col checkpoint_change# format 9999999999999999
SQL>select distinct checkpoint_change# from v$datafile;
SQL>alter database backup controlfile to trace as '/oracle/export/TS2CFN_sdittaka.ctl';
SQL>select distinct fhsta from x$kcvfh;
SQL>select name from v$datafile;
SQL>select count(1) from v$datafile;
SQL>select count(1) from v$controlfile;
SQL>select count(1) from v$logfile;
SQL>select count(1) from v$tempfile;
SQL>shut immediate; -- run this if the copy is being done by SA, else keep it in mount
SQL>spool off;
5) If the source DB runs on ASM and the copy is done by SA, dismount the Disk Groups on all the RAC nodes of source :
$setdb --> ASM
$sqlplus / as sysasm
SQL>select name, state from v$asm_diskgroup;
SQL>alter diskgroup DG_TS2CG1_AR dismount; -- dismount all TS2CG1 diskgroups except the GRID related diskgroup
SQL>exit;
Copy
FE Code Tree Copy
Get the SA copy the FE code tree from source to target. Copy validation ?
once SA confirmed FE copy is completed, do the copy validation as below.
A)source and target apps_st and tech_st size/date should be same
c3-a1-oa2-istg-45 CLFSTG /apps/clfstg > cd apps/apps_st
c3-a1-oa2-istg-45 CLFSTG /apps/clfstg/apps/apps_st > du -sh .
27G .
c3-a1-oa2-istg-45 CLFSTG /apps/clfstg/apps/apps_st > cd ../tech_st/
c3-a1-oa2-istg-45 CLFSTG /apps/clfstg/apps/tech_st > du -sh .
3.2G .
B). check the fe copy log for errors, .snapshot folder related errors are ignorable. if find any new errors and size/date are not matching, then ask
SA team to reinitiate the copy.
Once the copy is validated restore the files (if taken earlier) that were backed up under $AD_TOP/admin/template/custom directory.
Flexclone
1) If the copy is done from source to a snap server, copy the control file from source and perform the validations mentioned in the below section
"Copy Validation on Target".
2) If the copy is done from source to target directly then perform the steps mentioned in the below section "Copy Validation on Target".
ART
Perform the steps mentioned in the below section "Copy Validation on Target".
Snap Mirror
Perform the steps mentioned in the below section "Copy Validation on Target".
RMAN
There are many cases for RMAN copy and each will have a separate script. Check with your lead once you prepare the script for review.
Delphix
Refer Delphix Operational Guide for procedure to provision/refresh a delphix vdb. Once vdb is provisioned go to Step 6 in the below "Copy
Validation on Target" section.
Copy Validation on Target
1) Validate the ownership/permission (oracle : dba with 755) of all datafiles. Number of data files on target and source should match.
2) Prepare a Standalone (non-rac) init file on target.
Make sure the below parameters are added in your Target standalone pfile (initTS2G2C.ora) before creating the control file.
_no_recovery_through_resetlogs=TRUE
aq_tm_processes=0;
job_queue_processes=0;
cluster_database=false
3) Prepare control file creation script ccf.sql using the control file trace files of source and target by taking only the data files section from source
and redo log section from target. Some times data files on source might be placed in non-standard locations like redo/archive, check the control
file trace on source before you create the control file.
4) Make a note of the below while preparing the control file :
Change the REUSE to SET to target Database name.
Change NORESETLOGS to RESETLOGS
Change ARCHIVELOG to NOARCHIVELOG (if the target is not archive log enabled earlier else leave it)
The LOGFILE section of the control file trace of target will have the logs which are members of all the groups of all RAC nodes.
Exclude those which belong to the threads other than thread 1.
5) In case of ART, ccf.sql file need to created by the DBA from the map file provided by the SA.
6) Create control file on target
$setdb -- Non-RAC Option of Target DB
$sqlplus / as sysdba
SQL>startup nomount;
SQL>@ccf.sql
Database Mounted.
7) Run the below sqls on target once the db is in mount.
$sqlplus / as sysdba
SQL>alter session set nls_date_format='YYYY-MM-DD HH24:MI';
SQL>set lines 200
SQL>set pages 1000
SQL>col name for a60
SQL>set echo on
SQL>spool <SID>_copy_validation_check.log
SQL>select count(1) from v$recover_file; -- should be 0.
SQL>select count(*) from v$recovery_log;-- should be 0
SQL>select count(*) from v$recovery_file_status; -- should be 0
SQL>select count(*) from v$recovery_status; -- should be 0
SQL>select instance_name,status from v$instance;
SQL>select distinct status from v$datafile; -- should be RECOVER and SYSTEM when in mount, ONLINE SYSTEM when open
SQL>select name,status from v$datafile where (name like '%MISS%' or status not in ('ONLINE', 'SYSTEM')); -- should be 0
SQL>select count(1) from v$backup where status != 'NOT ACTIVE'; -- should be 0
SQL>select distinct to_char(CHECKPOINT_TIME,'DD-MON-YYYY HH24:MI:SS') Header_Time,to_number(SYSDATE-CHECKPOINT_TIME)*24
"DR Lag (Hrs)" from v$datafile_header; -- one value (should match with the checkpoint_change# of source)
SQL>col checkpoint_change# format 9999999999999999
SQL>select distinct checkpoint_change# from v$datafile; -- one value (should match with the checkpoint_change# of source)
SQL>select distinct to_char(checkpoint_time,'DD-MON-YYYY,HH24:MM:SS'),count(*) from v$datafile_header group by checkpoint_time; -- count
should give the number of data files
SQL> select FILE#,ERROR,ONLINE_STATUS from v$recover_file; -- ERROR should be null for all the rows
SQL>select distinct fhsta from x$kcvfh; -- should be 0, 8192 when in mount and 4, 8196 when open
SQL>select distinct fhscn from x$kcvfh; -- should be 1 value
SQL>select count(1) from v$datafile; -- should be same as source
SQL>select count(1) from v$controlfile;
SQL>select count(1) from v$logfile;
SQL>select count(1) from v$tempfile;
SQL>spool off;
8) If the output of the above sqls are as expected, do open resetlogs as shown below :
$sqlplus / as sysdba
SQL> alter database open resetlogs;
Database Opened.
Note : If open resetlogs fail with "ORA-38856: cannot mark instance UNNAMED_INSTANCE_2 (redo thread 2) as enabled" error then add
"_no_recovery_through_resetlogs=TRUE" parameter to the init file and bounce the database and retry the open resetlogs. Refer Refresh Issues
for explanation on this.
9) Once the database is opened successfully run the below steps :
$sqlplus / as sysdba
SQL> truncate table sys.link$ -- if the source of DB links is not the source for data. This is extremely important step if the source of data is PROD.
SQL> alter system set aq_tm_processes=0; -- Also modify the init file accordingly
SQL> alter system set job_queue_processes=0; -- Also modify the init file accordingly
SQL> alter database flush shared pool;
SQL> shut immediate;
SQL> exit;
10) Remove the parameter "_no_recovery_through_resetlogs=TRUE" from the init file if it was added earlier.
11) Bring up the database as standalone DB again.
$sqlplus / as sysdba
SQL>startup;
12) Keep monitoring the alert log from now on till the database is released for any corruption errors.
Release Source
Source is DR
1) Recover the DR till the lag reaches standard delay (240 mins). Make sure "Media Recovery" messages are showing up in the alert log.
2) if the recovery is started with no delay option, once it reaches the 200 lag, cancel the mrp and start the recovery with 240 delay. check the alert
log to find whether the recovery is started with no delay or 240 delay.
3) if we started the DG Mechanic to bring the lag to 240 mins, bct wil be disabled by the script. so we need to enable the bct before releasing the
DR.
4) Uncomment the previously commented crons.
5) Remove flags in PROD and DR and also remove the entries from SAP(smart archive purge) template in PROD instance1,
6) Take the new snap of DR DSource in delphix engine and remove the EM blackout.
Source is Non-DR
1) Bring up the instances, listeners and the application services using start_oracle script and do a high level sanity of the entire environment (Alert
log, Connectivity from other databases, Check FE & CM services and submit a concurrent request,check all concurrent managers and WF is up
in case of ERP, sys & system connectivity etc).
2) Uncomment the previously commented crons.
3) Remove the blackout.
Add TEMP Tablespace
A.Check the temp file details in the control file trace of target and create temp tablespaces and add temp files to it accordingly.
B.check the distinct temp tablespaces in source. if we have more than one temp tablespace in source, check how many temp files are added for
each temp tablespace.
EX :Run the below cmds in source and target and make sure to add same number of tempfiles to the temp tablespaces in target same as source.
SQL> select distinct tablespace_name from dba_tablespaces where tablespace_name like '%TEMP%';
TABLESPACE_NAME
------------------------------
TEMP
TEMP_1
TEMP_3
TEMP_2
TEMP_4
select count (*) from dba_temp_files where TABLESPACE_NAME='TEMP';
select count (*) from dba_temp_files where TABLESPACE_NAME='TEMP_1';
select count (*) from dba_temp_files where TABLESPACE_NAME='TEMP_2';
select count (*) from dba_temp_files where TABLESPACE_NAME='TEMP_3';
select count (*) from dba_temp_files where TABLESPACE_NAME='TEMP_4';
ALTER TABLESPACE TEMP ADD TEMPFILE '/oracle/oradata/CLFDEV/fs01//temp_31.dbf' SIZE 4000M;
ALTER TABLESPACE TEMP1 ADD TEMPFILE '/oracle/oradata/CLFDEV/fs01//temp_32.dbf' SIZE 4000M;
Post Copy Tasks
1) Reset the sys and system passwords to standard format. If the database is TS2SET then sys and system passwords should be TS2s4sSET.
Once done update the password file under .refresh folder.
EX: alter user sys identified by TS2s4sSET;
EX: alter user system identified by TS2s4sSET;
2) Run the output of the below sql on the database to disable password verification profiles
$sqlplus / as sysdba
SQL>set pages 300
SQL>set lines 400
SQL>select 'alter profile '||PROFILE||' limit PASSWORD_VERIFY_FUNCTION null;' from dba_profiles where
resource_name='PASSWORD_VERIFY_FUNCTION';
If it is a SOX database, in addition to the above sqls also run the below to disable SOX_PROFILE
$sqlplus / as sysdba
SQL>alter profile SOX_PROFILE limit PASSWORD_VERIFY_FUNCTION null;
3) Flush Perfstat records -- Only for 10g databases
a)Use the below Standard script to flush the perfstat records.
/usr/tools/oracle/Standard/script/flush_perfstat.sh LT1CMR N email_id > /usr/tmp/LT1CMR_flush_perfstat.log
b)Verify the log file generated out of above script.
c)Make sure the records are purged.
Connect to sqlplus "/ as sysdba" on LT1CMR and run
SQL>@$ORACLE_HOME/rdbms/admin/spreport
The output should not show any snapshot ids, which means
the perf tables are truncated.
Hit enter and exit out.
d)If the script is not working, purge the data manually using following steps :
$cd $ORACLE_HOME/rdbms/admin
$sqlplus / as sysbda
SQL>select password from dba_users where username='PERFSTAT';
SQL>alter user perfstat identified by perfstat;
SQL>conn perfstat/perfstat
SQL>@sptrunc.sql
4) Make sure /usr/tools/oracle/Standard/script/oracleDB.par file has an entry for the target instance on all the RAC nodes and the corresponding
mailer alias/duty pager.
5) Cisco DB Link Governance Setup
$cd /usr/tools/oracle/dblink-gov
$sqlplus / as sysdba
SQL>@dblink_admin_create_user.sql -- This will create a schema and a number of objects under it.
SQL>set linesize 100
SQL>column object_name format a50
SQL>column object_type format a20
SQL>column status format a10
SQL>select object_name,object_type,status,created from dba_objects where owner='CISCO_DBLINKADM'; -- Ensure all the objects are in valid
state.
SQL> CREATE DATABASE link selflink_system connect to system identified by &sys_password using '&DB'; -- Enter sys password & Database
name when prompted.
SQL> select name from v$database@selflink_system;
SQL> drop database link selflink_system;
6) Restore aq, job_queue parameter values to the original ones -- Make changes to pfile as well.
Restore DB Links/Backup Tables
1) Disable DB Link check trigger
$sqlplus / as sysdba
SQL> select owner,trigger_name,status from dba_triggers where trigger_name='DB_LINK_CHECK';
SQL>alter trigger CISCO_DBLINKADM.DB_LINK_CHECK disable;
2) Grants on sys.link$
$sqlplus / as sysdba
SQL>grant select on SYS.LINK$ to OPS$ORACLE;
SQL>grant select on SYS.LINK$ to SYSTEM;
3) Break dbms jobs
Execute the output of the below query :
select 'exec sys.dbms_ijob.broken('||job||',true)' from dba_jobs where broken='N';
4) Grant DBA role to ops$oracle -- if this database is not a SOX database
SQL>grant dba to ops$oracle;
5) Restore common target tables
$sqlplus / as sysdba
SQL>drop table ops$oracle.xx_link$;
SQL>drop table ops$oracle.xx_dba_ts_quotas;
SQL>drop table ops$oracle.xx_dba_role_privs;
SQL>drop table ops$oracle.xx_dba_tab_privs;
SQL>drop table ops$oracle.xx_dba_sys_privs;
SQL>drop table ops$oracle.xx_dba_col_privs;
SQL>drop table ops$oracle.xx_dba_users;
SQL>drop table ops$oracle.xx_user$
SQL>drop table ops$oracle.xx_dba_db_links;
SQL>drop table ops$oracle.xx_dba_directories;
$imp userid=/ file=/oracle/admin/<SID>/refresh/<SID>_pre_refresh.dmp log=<SID>_post_refresh.log
tables=xx_link$,xx_user$,xx_dba_role_privs,xx_dba_sys_privs,xx_dba_tab_privs,xx_dba_col_privs,xx_dba_users,xx_dba_db_links,xx_dba_directories,xx_dba_
Make sure import log doesn't show any errors.
6) Remove duplicate database links manually from ops$oracle.xx_link$ and ops$oracle.xx_dba_db_links if any.
7) Restore missing users :
Check missing tablespaces existed before refresh using below query and create them with one data file each.
SELECT 'Missing TABLESPACE_NAME='||TABLESPACE_NAME from (SELECT default_tablespace TABLESPACE_NAME FROM
ops$oracle.xx_dba_users WHERE username not in (SELECT username FROM dba_users) MINUS select TABLESPACE_NAME FROM
dba_tablespaces);
Check missing schemas existed before refresh and create them using the steps below :
set pages 0
set feedback off
spool run_cr_mis_users.sql
-- delete user CISCO_DBLINKADM from bkup table
delete from ops$oracle.xx_dba_users where username='CISCO_DBLINKADM'
/
-- Create user...
select 'create user "'||username||'" identified by values '''||xu.password||''''||chr(10)||
' default tablespace '||default_tablespace||chr(10)||
' temporary tablespace '||temporary_tablespace||chr(10)||' profile '||
profile||';'
from ops$oracle.xx_dba_users xdu,ops$oracle.xx_user$ xu
WHERE xdu.user_id = xu.user#
AND xdu.username = xu.name
AND username in ( select username from ops$oracle.xx_dba_users minus select username from dba_users )
/
-- Grant Roles...
select 'grant '||granted_role||' to "'||grantee||'"'||
decode(ADMIN_OPTION, 'YES', ' WITH ADMIN OPTION')||';'
from ops$oracle.xx_dba_role_privs
where grantee in ( select username from ops$oracle.xx_dba_users minus select username from dba_users )
/
-- Grant System Privs...
select 'grant '||privilege||' to "'||grantee||'"'||
decode(ADMIN_OPTION, 'YES', ' WITH ADMIN OPTION')||';'
from ops$oracle.xx_dba_sys_privs
where grantee in ( select username from ops$oracle.xx_dba_users minus select username from dba_users )
/
8) Gen DB Links & Update statement to make sure the DB links are pointing to correct set of databases.
Run the below update statement if the source for DB Links is a different instance than target. Ex : Target is TS1CG1 but source for DB Links is
TS2CG1. Only the environments participating in the refresh set should be included in the list of the below update statement. Check with your lead
after you prepare the statement.
$sqlplus / as sysdba
SQL>update ops$oracle.xx_link$ set host=upper(replace(host,'TS2','TS1')) where upper(host) in
('TS2BVP','TS2CG1','TS2CMR','TS2COE','TS2COR','TS2CTS','TS2DMP','TS2ECP','TS2ESM','TS2ODS','TS2OTM','TS2OTMR','TS2PMC','TS2PSD','TS2QTC',
SQL>select count(*) from ops$oracle.xx_link$ where upper(host) in
('TS2BVP','TS2CG1','TS2CMR','TS2COE','TS2COR','TS2CTS','TS2DMP','TS2ECP','TS2ESM','TS2ODS','TS2OTM','TS2OTMR','TS2PMC','TS2PSD','TS2QTC',
The above select statement should return 0.
SQL>update ops$oracle.xx_link$ set host=upper(host);
SQL>commit;
====================================================
If DB Version is 10g
SQL>insert into sys.link$ select * from ops$oracle.xx_link$;
SQL> commit;
====================================================
If DB Version is 11g
Download the file gen_dblinks.sql attached to this page onto the target database host under /tmp/sdittaka.
$cd /tmp/sdittaka
$sqlplus / as sysdba
SQL>@gen_dblinks.sql -- This will read the data from various ops$oracle owned tables and generate numerous scripts in the current location
Below is the order to run the generated sqls
SQL>conn / as sysdba
SQL>@run_alter_userspass_links.sql
SQL>@run_user_unlock_links.sql
SQL>@run_grant_privs_links.sql
SQL>@run_user_links.sql
SQL>@run_public_links.sql
SQL>
SQL>conn system/****
SQL>@run_system_links.sql
SQL>
SQL>conn / as sysdba
SQL>@run_sys_links.sql
SQL>
SQL>conn apps/*****
SQL>@run_apps_links.sql
SQL>
SQL>conn applsys/******
SQL>@run_applsys_links.sql
SQL>
SQL>conn / as sysdba
SQL>@run_revoke_privs_links.sql
SQL>
SQL>@run_user_lock_or_expire_links.sql
Check the logs generated by the above sqls and make sure there are no errors. If any errors are thrown fix them.
====================================================
9) Compare the rows in dba_db_links & sys.link$ -- Count should be same.
10) Restore schema passwords
$sqlplus /
SQL>create table ops$oracle.pre_pass_change_dba_users as select * from dba_users;
SQL>create table ops$oracle.pre_pass_change_sys_user$ as select * from sys.user$;
SQL>set lines 200
SQL>set pages 2000
SQL>spool alter_user_pwd.sql
SQL>select 'alter user '||d.username||' identified by values '''||s.password|| ''';' from xx_dba_users d,xx_user$ s where d.username=s.name and
d.username not in ('APPS','SYS','SYSTEM','APPLSYS','APPLSYSPUB','OPS$ORACLE');
SQL>@alter_user_pwd.sql
SQL>spool off;
11) Import FND target data
$sqlplus /
SQL>drop table ops$oracle.xx_fnd_user;
SQL>drop table ops$oracle.xx_fnd_profile_options;
SQL>drop table ops$oracle.xx_fnd_profile_option_values;
SQL>drop table ops$oracle.xx_fnd_oracle_userid;
SQL>drop table ops$oracle.xx_fnd_concurrent_queues;
SQL>drop table ops$oracle.xx_fnd_concurrent_queues_tl;
SQL>drop table ops$oracle.xx_fnd_nodes;
SQL>drop table OPS$ORACLE.XX_FND_USER_RESP_GROUPS;
SQL>drop table OPS$ORACLE.XX_FND_RESPONSIBILITY_TL;
SQL>drop table OPS$ORACLE.XX_FND_USER_RESP_GROUPS_ALL;
SQL>drop table OPS$ORACLE.XX_WF_USER_ROLE_ASSIGNMENTS;
SQL>drop table OPS$ORACLE.XX_WF_LOCAL_USER_ROLES;
SQL>drop table ops$oracle.xx_apps_servers;
SQL> exit;
$imp userid=/ file=/oracle/admin/<SID>/refresh/<SID>_pre_refresh_apps_tables.dmp log=<SID>_post_refresh_apps_tables.log
tables=xx_fnd_user,xx_fnd_profile_options,xx_fnd_profile_option_values,xx_fnd_oracle_userid,xx_fnd_concurrent_queues,xx_fnd_concurrent_queues_tl,xx_fnd
Make sure there are no errors reported in the import log.
12) Run the library update script against the database :
$sqlplus "/ as sysdba" @adupdlib.sql sl -- incase of HPUX
$sqlplus "/ as sysdba" @adupdlib.sql so -- incase of Linux
Post Database Tasks
1. set PASSWORD_VERIFY_FUNCTION to null
set lines 500 pages 0
select * from dba_profiles where RESOURCE_NAME like 'PASSWORD_VERIFY_FUNCTION';
select 'alter profile '||PROFILE||' limit PASSWORD_VERIFY_FUNCTION null;' from dba_profiles where
resource_name='PASSWORD_VERIFY_FUNCTION';
alter profile default limit PASSWORD_VERIFY_FUNCTION null;
alter profile SOX_PROFILE limit PASSWORD_VERIFY_FUNCTION null;
alter profile EMAN_DB_MONITOR limit PASSWORD_VERIFY_FUNCTION null;
alter profile DBPROF limit PASSWORD_VERIFY_FUNCTION null;
run the above cmds to make profile null.
2. set PASSWORD_REUSE_MAX to unlimited
SQL>select 'alter profile '||PROFILE||' limit PASSWORD_REUSE_MAX unlimited;' from dba_profiles where
RESOURCE_NAME='PASSWORD_REUSE_MAX';
'ALTERPROFILE'||PROFILE||'LIMITPASSWORD_REUSE_MAXUNLIMITED;'
------------------------------------------------------------------------------------------------------------------------
alter profile DEFAULT limit PASSWORD_REUSE_MAX unlimited;
alter profile AD_PATCH_MONITOR_PROFILE limit PASSWORD_REUSE_MAX unlimited;
alter profile EM_OAM_MONITOR_PROFILE limit PASSWORD_REUSE_MAX unlimited;
alter profile EMAN_DB_MONITOR limit PASSWORD_REUSE_MAX unlimited;
alter profile SOX_PROFILE limit PASSWORD_REUSE_MAX unlimited;
run the above cmds to make PASSWORD_REUSE_MAX to null.
3. set the global_name
select * from global_name;
ALTER DATABASE RENAME GLOBAL_NAME to LT1G2C;
4. check oracleDB.par for LT1G2C
cd /usr/tools/oracle/Standard/script
cat oracleDB.par
5. check flags in oratab entry
cat /etc/oratab
6. restore aq_tm_processes and job_queue_processes
SQL> show parameter aq
aq_tm_processes integer 0
SQL> show parameter job_queue
job_queue_processes integer 0
SQL> alter system set aq_tm_processes=5 scope=both;
SQL> alter system set job_queue_processes=32 scope=both;
SQL> show parameter aq
aq_tm_processes integer 5
SQL> show parameter job_queue
job_queue_processes integer 32
7. set _external_scn_rejection_delta_threshold_minutes to null
SQL> alter system set "_external_scn_rejection_delta_threshold_minutes" = 0 scope=both;
SQL> show parameter scn
8. setup Cisco DBlinks governance
SQL>@/usr/tools/oracle/dblink-gov/dblink_admin_create_user.sql
tnsping RDACPRD
9. verify if any INVALID objects in ciscoDblinkAdm
select count(*) from dba_objects where status='INVALID' and owner='CISCODBLINKADM';
10. drop database link selflink_system if exists
SQL> drop database link selflink_system;
SQL>@/usr/tools/oracle/dblink-gov/dblink_validation.sql
11. check DBLINK Governance
SQL> set linesize 100
column object_name format a50
column object_type format a20
column status format a10
select object_name,object_type,status,created from dba_objects where owner='CISCO_DBLINKADM';
OBJECT_NAME OBJECT_TYPE STATUS CREATED
------------------------- --------- ------ ------------------------------------------------------
DB_LINK_CHECK TRIGGER VALID 06-MAR-2011
REPLACE_SPACES_SINGLE_SPACE FUNCTION VALID 30-MAY-2009
CHECK_DBLINK_CREATION PROCEDURE VALID 30-MAY-2009
DBLINKADM2SOXRO.CISCO.COM DATABASE LINK VALID 28-NOV-2012
12. after complete, reset the _external_scn_rejection_delta_threshold_minutes parameter
SQL> alter system set "_external_scn_rejection_delta_threshold_minutes" = 2880 scope=both;
SQL> alter system set "_external_scn_logging_threshold_seconds" = 3600 scope=both;
13. enabling SOX_PROFILE if applicable
select 'alter profile '||PROFILE||' limit PASSWORD_VERIFY_FUNCTION password_dontchange_function;' from dba_profiles where
resource_name='PASSWORD_VERIFY_FUNCTION';
for sox_profile set it as below.
alter profile SOX_PROFILE limit PASSWORD_VERIFY_FUNCTION password_dontchange_function;
14. compile Invalid Objects
select count(*) from dba_objects where status='INVALID';
run utl_recomp.recomp_parallel(8);
select count(*) from dba_objects where status='INVALID';
15. dropping ops$oracle.xpr_dba_objects_post, ignore if it does not exist
drop table ops$oracle.xpr_dba_objects_post;
16. backing up dba_objects to ops$oracle.xpr_dba_objects_post
create table ops$oracle.xpr_dba_objects_post as select * from dba_objects
17. compare if rows in DBA_DB_LINKS and SYS.LINK$ are equal
select count(*) from dba_db_links;
select count(*) from sys.link$;
18. run the below script for granting the privs to PERF11i in NON ERP databases.
vi /oracle/export/Perf11i_privileges_for_11g_SOX_Databases.sql
GRANT CREATE VIEW TO PERF11I;
GRANT CREATE TABLE TO PERF11I;
GRANT ALTER SESSION TO PERF11I;
GRANT CREATE SESSION TO PERF11I;
GRANT CREATE SYNONYM TO PERF11I;
GRANT CREATE SEQUENCE TO PERF11I;
GRANT CREATE DATABASE LINK TO PERF11I;
GRANT CREATE PROCEDURE TO PERF11I;
GRANT CREATE TRIGGER TO PERF11I;
GRANT CREATE TYPE TO PERF11I;
GRANT CREATE MATERIALIZED VIEW TO PERF11I;
GRANT EXECUTE ON SYS.DBMS_LOCK TO PERF11I;
GRANT EXECUTE ON SYS.DBMS_SYSTEM TO PERF11I;
GRANT SELECT_CATALOG_ROLE TO PERF11I;
GRANT SELECT ANY DICTIONARY TO PERF11I;
GRANT SELECT ANY TABLE TO PERF11I;
GRANT SELECT ON DBA_SEGMENTS TO PERF11I;
GRANT SELECT ON DBA_FREE_SPACE TO PERF11I;
GRANT SELECT ON SYS.GV_$SESSION TO PERF11I;
GRANT SELECT ON SYS.V_$SESSION TO PERF11I;
GRANT SELECT ON SYS.V_$SESSION_WAIT TO PERF11I;
GRANT SELECT ON SYS.V_$SQLAREA TO PERF11I;
GRANT SELECT ON SYS.V_$SQLTEXT TO PERF11I;
GRANT SELECT ON SYS.V_$SYSSTAT TO PERF11I;
GRANT SELECT ON SYS.V_$TRANSACTION TO PERF11I;
GRANT SELECT ON SYS.V_$ROLLNAME TO PERF11I;
GRANT SELECT ON SYS.V_$SORT_USAGE TO PERF11I;
GRANT SELECT ON SYS.V_$ROLLSTAT TO PERF11I;
GRANT SELECT ON SYS.V_$SQL TO PERF11I;
GRANT SELECT ON SYS.V_$SYSTEM_EVENT TO PERF11I;
GRANT SELECT ON SYS.V_$LATCH TO PERF11I;
GRANT SELECT ON SYS.V_$INSTANCE TO PERF11I;
GRANT SELECT ON SYS.V_$SQL_PLAN TO PERF11I;
GRANT SELECT ON SYS.V_$SQLTEXT_WITH_NEWLINES TO PERF11I;
GRANT EXECUTE ON DBMS_WORKLOAD_REPOSITORY TO PERF11I;
GRANT EXECUTE ON DBMS_MONITOR TO PERF11I;
GRANT EXECUTE ON DBMS_ADVISOR TO PERF11I;
GRANT EXECUTE ON DBMS_SQLTUNE TO PERF11I;
GRANT ADMINISTER ANY SQL TUNING SET TO PERF11I;
GRANT ADVISOR TO PERF11I;
GRANT ALTER ANY SQL PROFILE TO PERF11I;
GRANT CREATE ANY SQL PROFILE TO PERF11I;
GRANT DROP ANY SQL PROFILE TO PERF11I;
GRANT ADMINISTER SQL MANAGEMENT OBJECT TO PERF11I;
GRANT SELECT ON V_$SESS_TIME_MODEL TO PERF11I;
GRANT SELECT ON V_$SYS_TIME_MODEL TO PERF11I;
GRANT SELECT ON V_$MUTEX_SLEEP TO PERF11I;
GRANT SELECT ON V_$MUTEX_SLEEP_HISTORY TO PERF11I;
GRANT SELECT ON V_$SQLSTATS TO PERF11I;
GRANT SELECT ON V_$PROCESS_MEMORY TO PERF11I;
GRANT SELECT ON V_$ENQUEUE_STATISTICS TO PERF11I;
GRANT SELECT ON V_$JAVA_POOL_ADVICE TO PERF11I;
GRANT SELECT ON V_$SGA_TARGET_ADVICE TO PERF11I;
GRANT SELECT ON V_$FILE_HISTOGRAM TO PERF11I;
GRANT SELECT ON V_$EVENT_HISTOGRAM TO PERF11I;
GRANT SELECT ON V_$OSSTAT TO PERF11I;
GRANT SELECT ON V_$INSTANCE_CACHE_TRANSFER TO PERF11I;
GRANT SELECT ON V_$CURRENT_BLOCK_SERVER TO PERF11I;
GRANT SELECT ON V_$SEGSTAT TO PERF11I;
GRANT SELECT ON V_$SEGSTAT_NAME TO PERF11I;
GRANT SELECT ON V_$SEGMENT_STATISTICS TO PERF11I;
GRANT SELECT ON V_$UNDOSTAT TO PERF11I;
GRANT SELECT ON V_$CR_BLOCK_SERVER TO PERF11I;
GRANT SELECT ON V_$PGASTAT TO PERF11I;
GRANT SELECT ON V_$PGA_TARGET_ADVICE TO PERF11I;
GRANT SELECT ON V_$SQL_WORKAREA_HISTOGRAM TO PERF11I;
GRANT SELECT ON V_$SHARED_POOL_ADVICE TO PERF11I;
GRANT SELECT ON V_$DB_CACHE_ADVICE TO PERF11I;
GRANT SELECT ON V_$RESOURCE_LIMIT TO PERF11I;
GRANT SELECT ON V_$EVENT_NAME TO PERF11I;
GRANT SELECT ON V_$SESSION_EVENT TO PERF11I;
GRANT SELECT ON V_$WAITSTAT TO PERF11I;
GRANT SELECT ON V_$SGASTAT TO PERF11I;
GRANT SELECT ON V_$SQLTEXT TO PERF11I;
GRANT SELECT ON V_$SQLAREA TO PERF11I;
GRANT SELECT ON V_$DATABASE TO PERF11I;
GRANT SELECT ON V_$LIBRARYCACHE TO PERF11I;
GRANT SELECT ON V_$ROWCACHE TO PERF11I;
GRANT SELECT ON V_$SYSTEM_PARAMETER TO PERF11I;
GRANT SELECT ON V_$PARAMETER TO PERF11I;
GRANT SELECT ON V_$SGA TO PERF11I;
GRANT SELECT ON V_$SESSTAT TO PERF11I;
GRANT SELECT ON V_$LATCH_MISSES TO PERF11I;
GRANT SELECT ON V_$LATCH_PARENT TO PERF11I;
GRANT SELECT ON V_$LATCH_CHILDREN TO PERF11I;
GRANT SELECT ON V_$PROCESS TO PERF11I;
GRANT SELECT ON V_$THREAD TO PERF11I;
GRANT SELECT ON V_$INSTANCE_RECOVERY TO PERF11I;
GRANT SELECT ON V_$BUFFER_POOL_STATISTICS TO PERF11I;
GRANT SELECT ON V_$BUFFER_POOL TO PERF11I;
GRANT SELECT ON V_$DLM_MISC TO PERF11I;
GRANT SELECT ON SYS.X_$KSPPCV2 TO PERF11I;
GRANT SELECT ON SYS.X_$KSPPI TO PERF11I;
SQL>@/oracle/export/Q1FY16_LT1G2C/Perf11i_privileges_for_11g_SOX_Databases.sql
19. make sure listeners is up in all nodes.
20. LDAP connectivity->make sure in sqlnet.ora we have LDAP entry first.
cd /var/opt/oracle
cat sqlnet.ora
EX : NAMES.DIRECTORY_PATH=(LDAP, TNSNAMES, ONAMES, HOSTNAME)
RAC Conversion
1) Shutdown the Non-RAC/Standalone database.
2) Startup the database as a RAC instance. If you have a separate initfile for RAC instance bring up the instance using that else uncomment the
previously commented RAC related parameters in the Non-RAC parameter file and bring up the instance. Once the database is open add logs to
other threads and enable other threads and bring them up.
3) Get the commands to add redo log groups for other instances in the cluster from the control file trace of target which you should have taken
before refresh.
4) Once the groups are added for all the instances enable the threads as shown below :
$sqlplus / as sysdba
SQL> alter database enable thread 2;
SQL> alter database enable thread 3;
SQL> alter database enable thread n;
5) Bring up all the other RAC instances with appropriate init parameter files.
6) Bring down all the instances using stop_oracle and bring up using start_oracle. If any issues with the stop/start scripts fix them.
7) Make sure all the listener are up & running. In some ERP databases we will have separate listeners for CM services.
Instance Specific Tasks
TASKS PERFORMED:
A) for BV and QTC
1)disable OpenWorkFlowNotifications,
connect as APPS
set pages 0
spool close_open_notification.sql
select 'exec wf_notification.cancel('||notification_id||');' from applsys.wf_notifications
where mail_status = 'MAIL' and status = 'OPEN';
spool off
@close_open_notification.sql
commit;
2)doDropAndReCreateDBLinks
sqlplus system/ts3s4sbvp
drop index CCA.XXCCA_GENERIC_LINES_N1;
drop index OE.OE_PRICE_ADJUSTMENT_N1; -> index does not exists.so not able to drop and recreate the index.
drop index CCA.XXCCA_ERROR_DETAILS_N1;
CREATE INDEX "CCA"."XXCCA_GENERIC_LINES_N1" ON "CCA"."XXCCA_GENERIC_LINES" ("ENTITY_NAME")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "CCAX"
PARALLEL;
CREATE INDEX "CCA"."XXCCA_ERROR_DETAILS_N1" ON "CCA"."XXCCA_ERROR_DETAILS" ("ERROR_CODE")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "CCAX"
PARALLEL;
B) For SJ -> we are not refreshing any SJ instances.
1)truncateInterfaceTables,
2)updateWorkFlowInformation,
3)sendConfirmationEmailForWFMailerTest
Apps Database post steps -- Only for ERP
1) Backup and Truncate fnd related tables
$ sqlplus applsys/**** -- applsys password of source
SQL> drop table ops$oracle.fnd_run_requests_back;
SQL>create table ops$oracle.fnd_run_requests_back as select * from applsys.fnd_run_requests;
SQL>truncate table applsys.fnd_run_requests;
SQL> drop table ops$oracle.fnd_concurrent_requests_back;
SQL> create table ops$oracle.fnd_concurrent_requests_back as select * from applsys.fnd_concurrent_requests;
SQL>truncate table applsys.fnd_concurrent_requests;
SQL>drop table ops$oracle.fnd_concurrent_processes_back;
SQL>create table ops$oracle.fnd_concurrent_processes_back as select * from applsys.fnd_concurrent_processes;
SQL>truncate table applsys.fnd_concurrent_processes;
2) Disable Alerts ?
3) Update iem_mstemail_accounts table ?
4) Clean the FND_NODES
$sqlplus apps/*** -- Connect with apps password of source
SQL>select name from v$database; -- make sure you are connected to the cloning/refresh database.
SQL>EXEC FND_CONC_CLONE.SETUP_CLEAN;
SQL> commit;
5) Set parallel on WF tables
$sqlplus apps/*** -- Connect with apps password of source
SQL>alter table applsys.WF_ITEM_ATTRIBUTE_VALUES parallel 60; -- Parallelism can be increased based on the target host/database
configuration
SQL>alter table applsys.WF_NOTIFICATION_ATTRIBUTES parallel 60;
SQL>alter table applsys.FND_LOBS parallel 60;
Shutdown Target Instance -- Only for ERP
Run stop_oracle to bring down the target database. Make sure listeners are down on all nodes. Fix stop_oracle script if it didn't bring down all the
nodes (DB & Apps) and listeners as expected.
cd /usr/tools/oracle/Standard/script
./stop_oracle -s TS1G2C1 -u TS1G2C2,TS1G2C3,TS1G2C4 -n lnxdb-pts-vm-209,lnxdb-pts-vm-210,lnxdb-pts-vm-211 -m immediate -p cecid
Run Adcfgclone On All DB Nodes -- Only for ERP
1) Check if DB Link [EDW_APPS_TO_WH.CISCO.COM] exists. DB Link [EDW_APPS_TO_WH.CISCO.COM] does not exist, so wont drop.
2) Check if DB Link [APPS_TO_APPS.CISCO.COM] exists. DB Link [APPS_TO_APPS.CISCO.COM] does not exist, so wont drop.
3) Take backup of the initfile in $ORACLE_HOME/dbs folder as adcfgclone will overwrite the init file.
4) Run adcfgclone :
export KSH_VERSION="PD KSH";
/oracle/product/11.2.0.3/TS2CG1/appsutil/clone/bin/adcfgclone.pl dbTechStack
/oracle/product/11.2.0.3/TS2CG1/appsutil/TS2CG11_lnxdbcj-pts-224.xml
5) Make sure adcfgclone ran successfully and it shows no errors in the log. Restore the init file that you have taken backup at 3rd step and
replace it with the one that adcfgclone has created.
Startup Target Instance -- Only for ERP
Run start_oracle to start the target database. Make sure listeners are up on all nodes. Fix start_oracle script if it didn't bring up all the nodes (DB
& Apps) and listeners as expected.
cd /usr/tools/oracle/Standard/script
./start_oracle -s TS1G2C1 -p cecid parallel lnxdb-pts-vm-209,lnxdb-pts-vm-210,lnxdb-pts-vm-211 TS1G2C2,TS1G2C3,TS1G2C4
Run Autoconfig on all Database Nodes -- Only for ERP
Run Autoconfig on all the DB nodes and make sure the logs are clean without any errors.
1).Restore the xml file from the backup if its not there in target /oracle/product/11.2.0.3/LT1G2C/appsutil/. if the xml file already exists, we can
ignore this step.
EX: cp /oracle/admin/LT1G2C1/clone/LT1G2C1_lnxdb-plt-055.xml /oracle/product/11.2.0.3/LT1G2C/appsutil/
2).Disable the DBLINK trigger
select owner,trigger_name,status from dba_triggers where trigger_name='DB_LINK_CHECK';
ALTER TRIGGER CISCO_DBLINKADM.DB_LINK_CHECK disable;
3). Run Autoconfig:
EX: /oracle/product/11.2.0.3/LT1G2C/appsutil/bin/adconfig.pl contextfile=/oracle/product/11.2.0.3/LT1G2C/appsutil/LT1G2C1_lnxdb-plt-055.xml
appspass=Kn19hth00d
Apps Database post steps after running Autoconfig -- Only for ERP
1. check custom$CONTEXT_NAME.env has TZ param set
Run adgentns on all Db nodes -- Only for ERP
Run the adgentns in all db nodes as mentioned below.
EX: /oracle/product/11.2.0.3/LT1G2C/appsutil/bin/adgentns.pl contextfile=/oracle/product/11.2.0.3/LT1G2C/appsutil/LT1G2C1_lnxdb-plt-055.xml
appspass=Kn19hth00d
Prepare Apps Target Env -- Only for ERP
1) Clean up log/out directories on all Apps nodes
/apps/ts2cg1/Standard/clonepackage/clickClone/script/create_logout_links.sh -- on all Apps nodes
cd /apps/orarpt/TS2CG1/log
rm -rf *
cd /apps/orarpt/TS2CG1/out
rm -rf *
cd /apps/local/TS2CG1/inst/apps/TS2CG1_c3-a1-oa2-ipts-38/logs
rm -rf *
cd /apps/ts2cg1/apps/apps_st/appl/admin/TS2CG1
rm -rf *
Apps Pre-Instance Specific Task -- Only for ERP
????
XXCUSTOM env setup -- Only for ERP
perl -i.bak -pe 's!lc_sid=.*!lc_sid=ts2cg1!' /apps/ts2cg1/apps/apps_st/appl/XXCUSTOM.env
Found custom env file, replacing source sid with target
Run adcfgclone on Apps Primary Node -- Only for ERP
1.Disable the DBLINK trigger in database.
select owner,trigger_name,status from dba_triggers where trigger_name='DB_LINK_CHECK';
ALTER TRIGGER CISCO_DBLINKADM.DB_LINK_CHECK disable;
2.check JRE_LIB_DIR path in env_sysman.mk file under $ORACLE_HOME/sysman/lib in primary fe node. if it has source db entry then change it
to target db.
/apps/lt1g2c > cd $ORACLE_HOME/sysman/lib
/apps/lt1g2c/apps/tech_st/10.1.2/sysman/lib > vi env_sysman.mk
JRE_LIB_DIR=/apps/lt1g2c/apps/tech_st/10.1.2/jdk/jre/lib/i386
3.move oraInventory directory to some other name and create an empty directory
/apps/lt1g2c > cat /etc/oraInst.loc
inventory_loc=/apps/lt1g2c/oraInventory
inst_group=dba
cd /apps/lt1g2c/
ls -lrt
mv oraInventory oraInventory_25-Aug-2015_BKP
mkdir oraInventory
4. check the below softlink exists as below or not, if not create it with the help of SA.
ls -ld /usr/lib/libXtst.so.6
/usr/lib/libXtst.so.6->/usr/X11R6/lib/libXtst.so.6.1
unlink /usr/lib/libXtst.so.6
ln -s /usr/X11R6/lib/libXtst.so.6.1 /usr/lib/libXtst.so.6
5.Restore the .profile/env file/xml file from the backups
cp /apps/orarpt/LT1G2C/c3-a1-oa2-iplt-101/saveconfig/.profile /apps/lt1g2c/
cp /apps/orarpt/LT1G2C/c3-a1-oa2-iplt-101/saveconfig/APPLSYS_ux.env
/apps/lt1g2c/apps/apps_st/appl/ad/12.0.0/admin/template/custom/APPLSYS_ux.env
cp /apps/orarpt/LT1G2C/c3-a1-oa2-iplt-101/saveconfig/LT1G2C_c3-a1-oa2-iplt-101.xml
/apps/local/LT1G2C/inst/apps/LT1G2C_c3-a1-oa2-iplt-101/appl/admin/LT1G2C_c3-a1-oa2-iplt-101.xml
export KSH_VERSION="PD KSH"
unset LD_ASSUME_KERNAL
export
PATH=/apps/<<sid>>/apps/tech_st/10.1.3/appsutil/jdk/jre/bin:/apps/<<sid>>/apps/tech_st/10.1.2/bin:/apps/<<sid>>/apps/tech_st/10.1.3/perl/bin:$PATH
export
PERL5LIB=/apps/<<sid>>/apps/tech_st/10.1.3/perl/lib/5.8.3:/apps/<<sid>>/apps/tech_st/10.1.3/perl/lib/site_perl/5.8.3:/apps/<<sid>>/apps/apps_st/appl/au/12.0.
export TWO_TASK=<<SID>>
Syntax :perl /apps/<sid>/apps/apps_st/comn/clone/bin/adcfgclone.pl appsTier
/apps/local/<SID>/inst/apps/<CONTEXT_NAME>/appl/admin/<CONTEXT_NAME>.xml
EX: /apps/lt1g2c/apps/apps_st/comn/clone/bin/adcfgclone.pl appsTier
/apps/local/LT1G2C/inst/apps/LT1G2C_c3-a2-oa2-iplt-101/appl/admin/LT1G2C_c3-a2-oa2-iplt-101.xml
Monitor the adcfgclone log. if any errors found, fix it and rerun adcfgclone.
Verify Apps Env -- Only for ERP
http://wwwin-<sid>.cisco.com:<port>/OA_HTML/AppsLocalLogin.jsp
Use sysadmin user with source password.Make sure that you are able to login and launch forms
Stop Services On All Internal Nodes -- Only for ERP
Stop the fe services in Primary FE node.
/apps/local/LT1G2C/inst/apps/LT1G2C_c3-a1-oa2-iplt-101/admin/scripts/adstpall.sh APPS/Kn19hth00d
Monitor the log for any errors : /apps/local/LT1G2C/inst/apps/LT1G2C_c3-a1-oa2-iplt-101/logs/appl/admin/log/adstpall.log
Run Autoconfig on all Secondary Nodes -- Only for ERP
1.copy the xml file as mentioned below and run the autoconfig in other FE internal nodes.
cp /apps/orarpt/LT1G2C/c3-a2-oa2-iplt-102/saveconfig/LT1G2C_c3-a2-oa2-iplt-102.xml
/apps/local/LT1G2C/inst/apps/LT1G2C_c3-a2-oa2-iplt-102/appl/admin/LT1G2C_c3-a2-oa2-iplt-102.xml
Autoconfig Syntax : perl /apps/<sid>/apps/apps_st/appl/ad/12.0.0/bin/adconfig.pl
contextfile=/apps/local/<SID>/inst/apps/<CONTEXT_NAME>/appl/admin/<CONTEXT_NAME>.xml appspass=<passwd>
Autoconfig CMD : perl /apps/lt1g2c//apps/apps_st/appl/ad/12.0.0/bin/adconfig.pl
contextfile=/apps/local/LT1G2C/inst/apps/LT1G2C_c3-a2-oa2-iplt-101/apps/admin/LT1G2C_c3-a2-oa2-iplt-104.xml appspass=Kn19hth00d
Autoconfig log : /apps/local/LT1G2C/inst/apps/LT1G2C_c3-a2-oa2-iplt-102/admin/log/06211027/adconfig.log
Validate the GUEST password : grep -i s_guest_pass $CONTEXT_FILE
<password oa_var="s_guest_pass">ORACLE</password>
sqlplus apps/Kn19hth00d
select fnd_web_sec.validate_login('GUEST','ORACLE') from dual;
Run adgentns on All Nodes -- Only for ERP
Run adgentns cmd in all fe internal nodes.
cp /apps/orarpt/LT1G2C/c3-a1-oa2-iplt-101/saveconfig/*.ora /apps/local/LT1G2C/inst/apps/LT1G2C_c3-a1-oa2-iplt-101/ora/10.1.2/network/admin
/apps/lt1g2c/apps/apps_st/appl/ad/12.0.0/bin/adgentns.pl
contextfile=/apps/local/LT1G2C/inst/apps/LT1G2C_c3-a1-oa2-iplt-101/appl/admin/LT1G2C_c3-a1-oa2-iplt-101.xml appspass=Kn19hth00d
Stop Services On All Internal Nodes -- Only for ERP
Stop the fe services in All FE nodes.
/apps/local/LT1G2C/inst/apps/LT1G2C_c3-a1-oa2-iplt-101/admin/scripts/adstpall.sh APPS/Kn19hth00d
Monitor the log for any errors : /apps/local/LT1G2C/inst/apps/LT1G2C_c3-a1-oa2-iplt-101/logs/appl/admin/log/adstpall.log
Apps Clone-Instance Specific -- Only for ERP
????
Remove references to SSO -- Only for ERP
Run the below cmd on any of the FE internal node
Syntax: $FND_TOP/bin/txkrun.pl -script=SetSSOReg -removereferences=Yes -appspass=<Apps Password>
CMD EX: /apps/lt1g2c/apps/apps_st/appl/fnd/12.0.0/bin/txkrun.pl -script=SetSSOReg -appspass=Kn19hth00d -removereferences=Yes
Run adpreclone on Internal Node Before Copying Code Tree to Ext
Node -- Only for ERP External
Run adpreclone.pl in FE primary internal node.
EX: perl $INST_TOP/admin/scripts/adpreclone.pl appsTier
FE Code Tree Copy
Get the SA copy the FE code tree from source to target[Internal FE node to External FE node].
A)source and target apps_st and tech_st size/date should be same
c3-a1-oa2-istg-45 CLFSTG /apps/clfstg > cd apps/apps_st
c3-a1-oa2-istg-45 CLFSTG /apps/clfstg/apps/apps_st > du -sh .
27G .
c3-a1-oa2-istg-45 CLFSTG /apps/clfstg/apps/apps_st > cd ../tech_st/
c3-a1-oa2-istg-45 CLFSTG /apps/clfstg/apps/tech_st > du -sh .
3.2G .
Once the copy is validated restore the files that were backed up under $AD_TOP/admin/template/custom directory.
Run Adcfgclone On Primary Ext Node -- Only for ERP External
1.Restore the .profile/env file/xml file from the backups
cp /apps/orarpt/LT1G2C/c3-a2-oa2-xplt-101/saveconfig/.profile /apps/lt1g2c/
cp /apps/orarpt/LT1G2C/c3-a2-oa2-xplt-101/saveconfig/APPLSYS_ux.env
/apps/lt1g2c/apps/apps_st/appl/ad/12.0.0/admin/template/custom/APPLSYS_ux.env
cp /apps/orarpt/LT1G2C/c3-a2-oa2-xplt-101/saveconfig/LT1G2C_c3-a2-oa2-xplt-101.xml
/apps/local/LT1G2C/inst/apps/LT1G2C_c3-a2-oa2-xplt-101/appl/admin/LT1G2C_c3-a2-oa2-xplt-101.xml
export KSH_VERSION="PD KSH"
unset LD_ASSUME_KERNAL
export
PATH=/apps/<<sid>>/apps/tech_st/10.1.3/appsutil/jdk/jre/bin:/apps/<<sid>>/apps/tech_st/10.1.2/bin:/apps/<<sid>>/apps/tech_st/10.1.3/perl/bin:$PATH
export
PERL5LIB=/apps/<<sid>>/apps/tech_st/10.1.3/perl/lib/5.8.3:/apps/<<sid>>/apps/tech_st/10.1.3/perl/lib/site_perl/5.8.3:/apps/<<sid>>/apps/apps_st/appl/au/12.0.
export TWO_TASK=<<SID>>
Syntax : perl /apps/<sid>/apps/apps_st/comn/clone/bin/adcfgclone.pl appsTier
/apps/local/<SID>/inst/apps/<CONTEXT_NAME>/appl/admin/<CONTEXT_NAME>.xml
CMD EX: perl /apps/lt1g2c/apps/apps_st/comn/clone/bin/adcfgclone.pl appsTier
/apps/local/lt1g2c/inst/apps/LT1G2C_c3-a2-oa2-xplt-101/appl/admin/LT1G2C_c3-a2-oa2-xplt-101.xml
Monitor the adcfgclone log. if any errors found, fix it and rerun adcfgclone.
Run Autoconfig On All Ext FE Nodes -- Only for ERP External
Run autoconfig on all other EXT FE nodes.
Syntax : perl /apps/<sid>/apps/apps_st/appl/ad/12.0.0/bin/adconfig.pl
contextfile=/apps/local/<SID>/inst/apps/<CONTEXT_NAME>/appl/admin/<CONTEXT_NAME>.xml appspass=<passwd>
CMD EX: /apps/lt1g2c/apps/apps_st/appl/ad/12.0.0/bin/adconfig.pl
contextfile=/apps/local/LT1G2C/inst/apps/LT1G2C_c3-a2-oa2-xplt-101/appl/admin/LT1G2C_c3-a2-oa2-xplt-101.xml appspass=Kn19hth00d
Monitor Adconfig log. location EX : /apps/local/LT1G2C/inst/apps/LT1G2C_c3-a2-oa2-xplt-101/admin/log/12170251/adconfig.log
Run Autoconfig On Primary FE Node -- Only for ERP
Run autoconfig in FE Primary internal node
Syntax : perl /apps/<sid>/apps/apps_st/appl/ad/12.0.0/bin/adconfig.pl
contextfile=/apps/local/<SID>/inst/apps/<CONTEXT_NAME>/appl/admin/<CONTEXT_NAME>.xml appspass=<passwd>
CMD EX: /apps/lt1g2c/apps/apps_st/appl/ad/12.0.0/bin/adconfig.pl
contextfile=/apps/local/LT1G2C/inst/apps/LT1G2C_c3-a1-oa2-iplt-101/appl/admin/LT1G2C_c3-a1-oa2-iplt-101.xml appspass=Kn19hth00d
Monitor Adconfig log. location EX : /apps/local/LT1G2C/inst/apps/LT1G2C_c3-a1-oa2-iplt-101/admin/log/12170251/adconfig.log
Start Services On Primary FE Node -- Only for ERP
Start the FE services in Primary FE Internal nodes.
cd /apps/local/LT1G2C/inst/apps/LT1G2C_c3-a1-oa2-iplt-101/admin/scripts
./adstartal apps/Kn19hth00d
Monitor the Adstartal Log for any errors : /apps/local/LT1G2C/inst/apps/LT1G2C_c3-a1-oa2-iplt-101/logs/appl/admin/log/adstrtal.log
Stop Services On All Internal FE Nodes -- Only for ERP
Stop the fe services in All Internal FE nodes.
/apps/local/LT1G2C/inst/apps/LT1G2C_c3-a1-oa2-iplt-101/admin/scripts/adstpall.sh APPS/Kn19hth00d
Monitor the adstpall log for any errors : /apps/local/LT1G2C/inst/apps/LT1G2C_c3-a1-oa2-iplt-101/logs/appl/admin/log/adstpall.log
Stop Services On All External FE Nodes -- Only for ERP External
Stop the fe services in All External FE nodes.
/apps/local/LT1G2C/inst/apps/LT1G2C_c3-a2-oa2-xplt-101/admin/scripts/adstpall.sh APPS/Kn19hth00d
Monitor the adstpall log for any errors : /apps/local/LT1G2C/inst/apps/LT1G2C_c3-a2-oa2-xplt-101/logs/appl/admin/log/adstpall.log
Setup SSO if required -- Only for ERP
*1)*Run this is in ANY ONE of the FE (Internal) servers.
/apps/lt1g2c/apps/apps_st/appl/fnd/12.0.0/bin/txkrun.pl -script=SetSSOReg -appspass=m1ll10n -registerinstance=yes -infradbhost=ldap-i-imstg
-ldapport=3070 -ldapportssl=3171 -oidadminuserpass=imstgia5
*2) *vi /apps/lt1g2c/apps/tech_st/10.1.3/Apache/Apache/bin/iasobf
ORACLE_HOME=/apps/lt1g2c/apps/tech_st/10.1.3 ->should have entry of 10.1.3 and target database name.
*3) *Run this is in ALL the FE (Internal & External) Servers
EX: /apps/lt1g2c/apps/apps_st/appl/fnd/12.0.0/bin/txkrun.pl -script=SetSSOReg -appspass=Kn19hth00d -registersso=yes
*4) *Run this is in ANY ONE of the Internal Server.
$FND_TOP/bin/txkrun.pl -script=SetSSOReg -registeroid=yes -ldaphost=<> -ldapport=<> -oidadminuserpass=<> -instpass=<>
-appspass=start3am -provisiontype=4
EX: /apps/lt1g2c/apps/apps_st/appl/fnd/12.0.0/bin/txkrun.pl -script=SetSSOReg -appspass=m1ll10n -registeroid=yes -ldaphost=ldap-i-imstg
-ldapport=3070 -oidadminuserpass=imstgia5 -instpass=ss0syn -provisiontype=4
*5) *Update FND_USER.USER_GUID to null
Connect as apps user and run the below query.
Update FND_USER set user_guid=null where user_guid is not null;
commit;
Start all services/Start services on ALL Internal nodes -- Only for ERP
Start the services in All Internal nodes.
cd /apps/local/LT1G2C/inst/apps/LT1G2C_c3-a1-oa2-iplt-101/admin/scripts
./adstartal apps/Kn19hth00d
Monitor the Adstartal Log for any errors : /apps/local/LT1G2C/inst/apps/LT1G2C_c3-a1-oa2-iplt-101/logs/appl/admin/log/adstrtal.log
Start services on ALL External Nodes -- Only for ERP External
Start the services in All External nodes.
cd /apps/local/LT1G2C/inst/apps/LT1G2C_c3-a2-oa2-xplt-101/admin/scripts
./adstartal apps/Kn19hth00d
Monitor the Adstartal Log for any errors : /apps/local/LT1G2C/inst/apps/LT1G2C_c3-a2-oa2-xplt-101/logs/appl/admin/log/adstrtal.log
Change Apps Password Before Restore UR -- Only for ERP
Change the APPS password in target database using the FNDCPASS
Syntax: /apps/<sid>/apps/apps_st/appl/fnd/12.0.0/bin/FNDCPASS apps/<current apps pass> 0 Y system/coes4sdev SYSTEM APPLSYS <new
apps pass>
EX: /apps/lt1g2c/apps/apps_st/appl/fnd/12.0.0/bin/FNDCPASS apps/m1ll10n 0 Y system/lt1s4sg2c SYSTEM APPLSYS kn1ghtw00d
Table [ ops$oracle.dba_users_bkp ] Does Not Exist. Please Ignore...
Table [ ops$oracle.fnd_user_bkp ] Does Not Exist. Please Ignore...
Table [ ops$oracle.fnd_oracle_userid_bkp ] Does Not Exist. Please Ignore...
connected to TS2CG1 with system/ts2s4scg1
Executing query [ alter trigger apps.XXCFI_FND_PRINTER_TR disable ]
Trigger [ apps.XXCFI_FND_PRINTER_TR ] Does Not Exist. Please Ignore...
Log filename : L4412048.log
Report filename : O4412048.out
APPLSYS password changed
connected to TS2CG1 with system/ts2s4scg1
Executing query [ alter trigger apps.XXCFI_FND_PRINTER_TR enable ]
Trigger [ apps.XXCFI_FND_PRINTER_TR ] Does Not Exist. Please Ignore...
Setting parfile parameter value.
APPS password Extracted AFTER resetting APPLSYS ?
Update FND users -- Only for ERP
Disabling triggers on FND_USERS table.
alter trigger GESADM.MTRG$_FND_USER disable;
alter trigger APPS.XXCFIR_FND_PRINTER_TR disable;
01. Creating Index on xpr_fnd_resp_groups
cat /usr/tools/oracle/Standard/clonepackage/clickClone/sql/create_index_on_xprfndrespgroups.sql
prompt drop index xpr_fnd_user_resp_groups_idx
drop index ops$oracle.xpr_fnd_user_resp_groups_idx;
prompt create index xpr_fnd_user_resp_groups_idx
create index ops$oracle.xpr_fnd_user_resp_groups_idx on ops$oracle.xpr_fnd_user_resp_groups(user_name);
SQL>@/usr/tools/oracle/Standard/clonepackage/clickClone/sql/create_index_on_xprfndrespgroups.sql;
02. Gather Stats
cat /usr/tools/oracle/Standard/clonepackage/clickClone/sql/gather_stats_r12.sql
prompt gather stats on XPR_FND_USER_RESP_GROUPS
exec FND_STATS.GATHER_TABLE_STATS (ownname => 'ops$oracle', tabname => 'XPR_FND_USER_RESP_GROUPS', percent => 10,
degree => 15, cascade => TRUE, granularity => 'ALL');
prompt gather stats on XPR_FND_USER
exec FND_STATS.GATHER_TABLE_STATS (ownname => 'ops$oracle', tabname => 'XPR_FND_USER', percent => 10, degree => 15, cascade
=> TRUE, granularity => 'ALL');
prompt gather stats on XPR_WF_LOCAL_USER_ROLES
exec FND_STATS.GATHER_TABLE_STATS (ownname => 'ops$oracle', tabname => 'XPR_WF_LOCAL_USER_ROLES', percent => 10, degree
=> 15, cascade => TRUE, granularity => 'ALL');
SQL>@ /usr/tools/oracle/Standard/clonepackage/clickClone/sql/gather_stats_r12.sql;
03. Creating Missing Users
vi /oracle/export/Q1FY16_LT1G2C_Refresh/FND_USER_ADD_gen.sql
set linesize 1000
set heading off
set feedback off
spool /oracle/export/Q2FY16_LT1G2C_Refresh/LT1G2C_FND_USER_ADD.sql
SELECT distinct 'exec fnd_user_pkg.createuser(x_user_name=>'''||x.user_name||''', x_owner=>'''''||
', x_start_date =>TO_DATE('''||TO_CHAR(x.start_date,'DD-MON-YYYY HH24:MI:SS')||
''',''DD-MON-YYYY HH24:MI:SS''), x_end_date => to_date('''||
TO_CHAR(x.end_date,'DD-MON-YYYY HH24:MI:SS')||
''',''DD-MON-YYYY HH24:MI:SS''), x_last_logon_date => to_date('''||
TO_CHAR(x.last_logon_date,'DD-MON-YYYY HH24:MI:SS')||
''',''DD-MON-YYYY HH24:MI:SS''), x_description => '''||replace(x.description, '''', '''''')||
''', x_password_lifespan_days=> TO_NUMBER ('''||x.password_lifespan_days||
'''), x_employee_id=>to_number('''||x.employee_id||
'''), x_email_address=>'''||x.email_address||''');'
FROM OPS$ORACLE.xpr_fnd_user x
WHERE x.user_name IN (SELECT upper(a.user_name) FROM OPS$ORACLE.xpr_fnd_user a
MINUS select b.user_name FROM applsys.fnd_user b)
;
spool off;
SQL>@/oracle/export/Q2FY16_LT1G2C_Refresh/LT1G2C_FND_USER_ADD.sql
Enabling triggers on FND_USERS table
alter trigger GESADM.MTRG$_FND_USER enable;
alter trigger APPS.XXCFIR_FND_PRINTER_TR enable;
Update FND Responsibilities -- Only for ERP
04. Adding Missing Responsibilities
vi /oracle/export/Q1FY16_LT1G2C_Refresh/FND_RESP_ADD_gen.sql
set linesize 1000
set heading off
set feedback off
spool /oracle/export/Q2FY16_LT1G2C_Refresh/LT1G2C_FND_RESP_ADD.sql
SELECT distinct 'exec fnd_user_resp_groups_api.insert_assignment(user_id=>'||u.user_id||','||
'responsibility_id=> '||x.responsibility_id||','||
'responsibility_application_id=> '||x.RESPONSIBILITY_APPLICATION_ID||','||
'SECURITY_GROUP_ID=> '||y.security_group_id||','||
'start_date=> '||''''||x.start_date||''''||','||
'end_date=> '||''''||x.end_date||''''||','||
'description=>'||''''||x.description||''''||');'
FROM ops$oracle.xpr_fnd_user_resp_groups x, applsys.fnd_responsibility_tl r, applsys.fnd_user u,
applsys.wf_local_roles j,applsys.fnd_responsibility k1,applsys.fnd_application g,applsys.fnd_security_groups y
WHERE x.user_name = u.user_name
--and x.user_name = 'SONARASI'
--and x.responsibility_id = 50241
and x.responsibility_id=r.responsibility_id
AND r.responsibility_name = x.responsibility_name
and x.RESPONSIBILITY_APPLICATION_ID = r.APPLICATION_ID
and x.RESPONSIBILITY_ID = k1.RESPONSIBILITY_ID
and r.language = 'US'
and k1.application_id = g.application_id
and x.security_key = y.security_group_key
and j.name = 'FND_RESP|'||g.application_short_name||'|'||k1.responsibility_key||'|'||x.security_key
AND (x.user_name, x.responsibility_name,x.security_key ) IN
(SELECT x1.user_name, x1.responsibility_name, x1.security_key
FROM OPS$ORACLE.xpr_fnd_user_resp_groups x1
MINUS
SELECT u1.user_name, r1.responsibility_name,
(select security_group_key from applsys.fnd_security_groups
where security_group_key =/* Val after 3rd separator */
replace(substr(g1.ROLE_NAME,INSTR(g1.ROLE_NAME, '|', 1, 3)+1),'%col', ':')) security_group_id
FROM applsys.fnd_user u1, applsys.fnd_responsibility_tl r1, apps.wf_local_user_roles g1
WHERE u1.user_NAME = g1.user_name
and g1.role_orig_system = 'FND_RESP'
and g1.partition_id = 2
and g1.assignment_type='D'
AND g1.ROLE_ORIG_SYSTEM_ID = r1.responsibility_id
and (select application_id from applsys.fnd_application
where application_short_name =/* Val between 1st and 2nd separator */
replace(substr(g1.ROLE_NAME, INSTR(g1.ROLE_NAME, '|', 1, 1)+1,( INSTR(g1.ROLE_NAME, '|', 1, 2)
-INSTR(g1.ROLE_NAME, '|', 1, 1)-1)),'%col', ':')) =r1.application_id)
;
spool off
SQL>@/oracle/export/Q2FY16_LT1G2C_Refresh/LT1G2C_FND_RESP_ADD.sql
05. Updating Missing Responsibilities
vi /oracle/export/Q2FY16_LT1G2C_Refresh/FND_RESP_UPDATE_gen.sql
set linesize 1000
set heading off
set feedback off
spool /oracle/export/Q2FY16_LT1G2C_Refresh/LT1G2C_FND_RESP_UPDATE.sql
SELECT distinct 'exec fnd_user_resp_groups_api.update_assignment(user_id=>'||furg.user_id||
', responsibility_id=>'||furg.responsibility_id||', responsibility_application_id=>'||
r.application_id||', security_group_id=>'||furg.security_group_id||
', start_date=>TO_DATE('''||TO_CHAR(xxdba.start_date,'DD-MON-YYYY HH24:MI:SS')||
''',''DD-MON-YYYY HH24:MI:SS''), end_date=>TO_DATE('''||
TO_CHAR(decode(xxdba.end_date,'01-jan-9999',null),'DD-MON-YYYY HH24:MI:SS')||
''',''DD-MON-YYYY HH24:MI:SS''), description=>'''||replace(xxdba.description, '''', '''''')||''')'
FROM applsys.fnd_responsibility_tl r,
apps.fnd_user_resp_groups furg,
applsys.fnd_user fu,
ops$oracle.xpr_fnd_user_resp_groups xxdba,applsys.wf_local_user_roles wur
WHERE fu.user_id = furg.user_id
--and fu.user_name = 'XXTEST'
AND r.responsibility_id = furg.responsibility_id
AND fu.user_name = xxdba.user_name
AND xxdba.responsibility_name = r.responsibility_name
AND (NVL(xxdba.end_date,sysdate) <> nvl(wur.effective_end_date,sysdate) OR
xxdba.start_date <> wur.effective_start_date)
AND furg.responsibility_application_id = r.application_id
and wur.role_orig_system = 'FND_RESP'
and wur.user_name = xxdba.user_name
and wur.partition_id = 2
and wur.assignment_type='D'
and furg.responsibility_id = wur.role_orig_system_id
and r.language = 'US'
spool off;
SQL>@/oracle/export/Q2FY16_LT1G2C_Refresh/LT1G2C_FND_RESP_UPDATE.sql
06. Add Roles
vi /oracle/export/Q2FY16_LT1G2C_Refresh/FND_WF_ROLE_ADD_gen.sql
set linesize 1000
set heading off
set feedback off
spool /oracle/export/Q2FY16_LT1G2C_Refresh/FND_WF_ROLE_ADD.sql
SELECT distinct 'exec wf_local_synch.PropagateUserRole( p_user_name=>'||''''||x.user_name||''''||' , '||
' p_role_name=> '||''''||x.role_name||''''||','||
' p_role_orig_system=> '||''''||x.role_orig_system||''''||' , '||
'p_start_date=> '||''''||x.start_date||''''||','||
'p_expiration_date=>NULL'||
');'
FROM ops$oracle.xpr_wf_local_user_roles x,applsys.fnd_user u
WHERE x.user_name = u.user_name
and x.user_id = u.user_id
AND x.user_name IN
(SELECT x1.user_name
FROM OPS$ORACLE.xpr_wf_local_user_roles x1
MINUS
SELECT u1.user_name
FROM applsys.fnd_user u1, apps.wf_local_user_roles g1
WHERE u1.user_NAME = g1.user_name
and g1.role_orig_system = 'UMX'
and g1.partition_id = 13
and g1.assignment_type='D')
;
spool off;
SQL>@/oracle/export/Q2FY16_LT1G2C_Refresh/FND_WF_ROLE_ADD.sql;
07. Update Roles
vi /oracle/export/Q2FY16_LT1G2C_Refresh/FND_WF_ROLE_UPD_gen.sql
set linesize 1000
set heading off
set feedback off
spool /oracle/export/Q2FY16_LT1G2C_Refresh/LT1G2C_FND_WF_ROLE_UPD.sql
SELECT distinct 'exec wf_local_synch.PropagateUserRole( p_user_name=> '||''''||x.user_name||''''||' , '||
'p_role_name=>'||''''||x.role_name||''''||' , '||
' p_role_orig_system=> '||''''||x.role_orig_system||''''||' , '||
'p_start_date=> '||''''||x.start_date||''''||','||
'p_expiration_date=>'||''''||x.end_date||''''||
' );'
FROM ops$oracle.xpr_wf_local_user_roles x,
applsys.wf_local_user_roles wur
WHERE x.role_name = wur.role_name
AND x.user_name = wur.user_name
AND (NVL(x.end_date,sysdate) <> nvl(wur.effective_end_date,sysdate) OR
x.start_date <> wur.effective_start_date)
;
spool off
SQL>@/oracle/export/Q2FY16_LT1G2C_Refresh/LT1G2C_FND_WF_ROLE_UPD.sql
Change SYSADMIN Password After Restore UR -- Only for ERP
Change the SYSADMIN password of Target database using FNDCPASS utility
Syntax: /apps/<sid>/apps/apps_st/appl/fnd/12.0.0/bin/FNDCPASS apps/<current apps pass> 0 Y system/<system password> SYSTEM
SYSADMIN <new apps pass>
EX: /apps/lt1g2c/apps/apps_st/appl/fnd/12.0.0/bin/FNDCPASS apps/kn1ghtw00d 0 Y system/lt1s4sg2c SYSTEM SYSADMIN lt1admg2c
connected to TS2CG1 with system/ts2s4scg1
Executing query [ alter trigger apps.XXCFI_FND_PRINTER_TR disable ]
Trigger [ apps.XXCFI_FND_PRINTER_TR ] Does Not Exist. Please Ignore...
Changing the SYSADMIN password
The Parameters passed for FNDCPASS command are
apps/Kn19hth00d
0
Y
system/ts2s4scg1
USER
SYSADMIN
ts2lss_8006cg1
Log filename : L4424943.log
Report filename : O4424943.out
SYSADMIN password changed
connected to TS2CG1 with system/ts2s4scg1
Executing query [ alter trigger apps.XXCFI_FND_PRINTER_TR enable ]
Trigger [ apps.XXCFI_FND_PRINTER_TR ] Does Not Exist. Please Ignore...
The changeAppspassAfterRestoreUR has successfully completed and updating the password to Kn19hth00d
Setting parfile parameter value.
APPS password Replaced AFTER resetting APPLSYS
APPS Password change process After Restore COMPLETED ON < c3-a1-oa2-ipts-38 >
Updated Connected Password with Derived Password successfully
*****************End of Change Apps Password After Restore UR Task [Completed] >>>>>>>>>
Apps Post Steps Phase 1 -- Only for ERP
1). updateSourceInformationInProfiles
create table ops$oracle.fnd_prof_option_val_bchange as select * from apps.fnd_profile_option_values;
create table ops$oracle.ops$oracle.fnd_prof_option_bchange as select * from apps.fnd_profile_options;
create table ops$oracle.fnd_concurrent_queues_bchange as select * from apps.fnd_concurrent_queues;
2) Check Target is PCP enabled in CM nodes.
c3-a2-oa2-istg-47 CLFSTG_BALANCE /apps/clfstg > grep -i APPLDCP $CONTEXT_FILE
<APPLDCP oa_var="s_appldcp">ON</APPLDCP>
3) updateConcurrentQueue
sqlplus apps/Kn19hth00d
SQL> select concurrent_queue_name,control_code,node_name,target_node,node_name2 from apps.fnd_concurrent_queues;
SQL> select concurrent_queue_name,control_code,node_name,target_node,node_name2 from
ops$oracle.XPR_FND_CONCURRENT_QUEUES;
compare the above two tables and prepare the update statement to update the node_name/node_name2/target_node/control_code of
apps.fnd_concurrent_queues same as backup table ops$oracle.XPR_FND_CONCURRENT_QUEUES.
EX : update APPS.FND_CONCURRENT_QUEUES set node_name = 'C3-A2-OA2-ISTG-47' where CONCURRENT_QUEUE_NAME='FNDICM';
update APPS.FND_CONCURRENT_QUEUES set node_name2 = 'C3-A2-OA2-ISTG-47' where
CONCURRENT_QUEUE_NAME='FNDCRM';
update APPS.FND_CONCURRENT_QUEUES set target_node = C3-A1-OA2-ISTG-47 where CONCURRENT_QUEUE_NAME='
AMSDMIN';
update APPS.FND_CONCURRENT_QUEUES set control_code = null where
CONCURRENT_QUEUE_NAME='FNDSM_C3-A2-OA2-ISTG-47';
Run the query to find out if there is any data mismatch between fnd_concurrent_queues and fnd_concurrent_queues_tl table
select Q.concurrent_queue_name,T.user_concurrent_queue_name, Q.concurrent_queue_id "In Queues", T. concurrent_queue_id "In TL",
Q.application_id from apps.fnd_concurrent_queues_tl T, apps.fnd_concurrent_queues Q where T.concurrent_queue_id <>
Q.concurrent_queue_id and T.concurrent_queue_name=Q.concurrent_queue_name;
Check status of FNDSM for all the nodes. It should be enabled.
select CONCURRENT_QUEUE_NAME, ENABLED_FLAG, MAX_PROCESSES, RUNNING_PROCESSES from
apps.FND_CONCURRENT_QUEUES where CONCURRENT_QUEUE_NAME like 'FNDSM%';
Verify the concurrent queues pointing to the right target hosts.
select distinct node_name from apps.fnd_concurrent_queues; -- Can be FE/CM/External
select distinct node_name2 from apps.fnd_concurrent_queues; -- Always be CM nodes
select distinct target_node from apps.fnd_concurrent_queues; -- Can be FE/CM/External
4) Preparing to Assign Workshift Assignments to FNDIM AND FNDSM ON
sqlplus apps/Kn19hth00d
SQL>INSERT INTO APPLSYS.FND_CONCURRENT_QUEUE_SIZE SELECT fcq.APPLICATION_ID, fcq.CONCURRENT_QUEUE_ID,
0,0,SYSDATE, 0,SYSDATE,0,215018307, 1, NULL, 60, NULL, NULL, NULL FROM applsys.fnd_concurrent_queues fcq WHERE
CONCURRENT_QUEUE_NAME IN (SELECT 'FNDIM_' || node_name FROM applsys.fnd_nodes WHERE support_cp = 'Y' OR support_forms =
'Y' OR support_web = 'Y' UNION SELECT 'FNDSM_' || node_name FROM applsys.fnd_nodes WHERE support_cp = 'Y' OR support_forms = 'Y'
OR support_web = 'Y') AND concurrent_queue_id NOT IN (SELECT concurrent_queue_id FROM applsys.fnd_concurrent_queue_size);
SQL>INSERT INTO APPLSYS.FND_CONCURRENT_QUEUE_SIZE SELECT fcq.APPLICATION_ID, fcq.CONCURRENT_QUEUE_ID,
0,0,SYSDATE, 0,SYSDATE,0,215018307, 1, NULL, 60, NULL, NULL, NULL FROM applsys.fnd_concurrent_queues fcq WHERE
CONCURRENT_QUEUE_NAME IN (SELECT 'FNDIM_' || node_name FROM applsys.fnd_nodes WHERE support_cp = 'Y' OR support_forms =
'Y' OR support_web = 'Y' UNION SELECT 'FNDSM_' || node_name FROM applsys.fnd_nodes WHERE support_cp = 'Y' OR support_forms = 'Y'
OR support_web = 'Y') AND concurrent_queue_id NOT IN (SELECT concurrent_queue_id FROM applsys.fnd_concurrent_queue_size);
5) disableInternalMonitor
sqlplus apps/Kn19hth00d
SQL>update applsys.fnd_concurrent_queues set enabled_flag = 'N' where concurrent_queue_name in (select 'FNDIM_'||node_name from
applsys.fnd_nodes where support_web = 'Y' or support_forms = 'Y' union select 'FNDSM_'||node_name from applsys.fnd_nodes where
support_web = 'Y' or support_forms = 'Y');
6) updateWFAdminRole
sqlplus / as sysdba
SQL>update apps.wf_resources set text=(select name from apps.wf_roles where display_name ='Workflow Administrator Web (New)') where
name='WF_ADMIN_ROLE';
7) updateWFSettings
SQL>UPDATE applsys.fnd_svc_comp_param_vals fscpv SET fscpv.parameter_value = (select lower('workflow_'||name||'[email protected]') from
v$database) WHERE fscpv.parameter_id in (select fscpt.parameter_id from applsys.fnd_svc_comp_params_tl fscpt WHERE fscpt.display_name
= 'Test Address' );
SQL>UPDATE applsys.fnd_svc_comp_param_vals fscpv SET fscpv.parameter_value = (select name||'_W' from v$database) WHERE
fscpv.parameter_id in (select fscpt.parameter_id from applsys.fnd_svc_comp_params_tl fscpt WHERE fscpt.display_name = 'Mailer Node Name'
);
SQL>SELECT profile_option_value FROM applsys.fnd_profile_option_values fpov, applsys.fnd_profile_options fpo WHERE fpov.profile_option_id
= fpo.profile_option_id AND fpov.application_id = fpo.application_id AND fpo.profile_option_name = 'CSF_EMAP_RMI_PORT';
Apps Post Steps Phase 2 -- Only for ERP
1) updateProfileOptToResp
update applsys.fnd_profile_options set resp_enabled_flag = 'Y', resp_update_allowed_flag = 'Y' where profile_option_name =
'SIGNONAUDIT:LEVEL' and resp_update_allowed_flag <> 'Y' and resp_enabled_flag <> 'Y';
2) updateProfileValue
sqlplus apps/Kn19hth00d
UPDATE applsys.fnd_profile_option_values SET profile_option_value = ? WHERE profile_option_id = (SELECT profile_option_id FROM
applsys.fnd_profile_options WHERE profile_option_name ='SITENAME');
3) trunUserRestrictHistoryTbl
sqlplus system/ts2s4scg1
truncate table ops$oracle.RESTRICTED_USERS_HISTORY
truncate table ops$oracle.ALLOWED_USERS_DURING_MONTHEND
4) setPermissionsForCustomXXDirectories
Setting Permissions for Custom XX Directories.
Apps Post Steps-Externalization -- Only for ERP External
Executing [ /usr/tools/oracle/Standard/clonepackage/clickClone/script/chgOHPerms.sh TS2CG11]...chmod 600
/oracle/product/11.2.0.3/TS2CG1/network/admin/TS2CG11_lnxdbcj-pts-224/listener.ora
chmod 644 /oracle/product/11.2.0.3/TS2CG1/network/admin/TS2CG11_lnxdbcj-pts-224/tnsnames.ora
chmod 600 /oracle/product/11.2.0.3/TS2CG1/network/admin/TS2CG11_lnxdbcj-pts-224/sqlnet.ora
chmod 751 /oracle/product/11.2.0.3/TS2CG1/bin
chmod 750 /oracle/product/11.2.0.3/TS2CG1
Do the above on all DB nodes
Apps Post Steps Phase 3 -- Only for ERP
1. compareInternalURLToHomeURL
DB node:
sqlplus / as sysdba
select home_url from apps.icx_parameters;
FE node:
grep -i login $CONTEXT_FILE
2. schedulePurgeJobs
/apps/lt1clf/apps/apps_st/appl/fnd/12.0.0/bin/CONCSUB apps/cl0udware SYSADMIN 'System Administrator' SYSADMIN WAIT=N
CONCURRENT FND FNDCPPUR START='"10-NOV-2009 23:00:00"' REPEAT_DAYS=7 ALL Age 4
/apps/lt1clf/apps/apps_st/appl/fnd/12.0.0/bin/CONCSUB apps/cl0udware SYSADMIN 'System Administrator' SYSADMIN WAIT=N
CONCURRENT FND FNDWFPR START='"10-NOV-2009 23:00:00"' REPEAT_DAYS=7 '"::7:Temporary:Y:500:N"'
/apps/lt1clf/apps/apps_st/appl/fnd/12.0.0/bin/CONCSUB apps/cl0udware SYSADMIN 'System Administrator' SYSADMIN WAIT=N
CONCURRENT FND FNDSCPRG START='"10-NOV-2009 23:00:00"' REPEAT_DAYS=7 16-SEP-2009
/apps/lt1clf/apps/apps_st/appl/fnd/12.0.0/bin/CONCSUB apps/cl0udware SYSADMIN 'System Administrator' SYSADMIN WAIT=N
CONCURRENT FND FNDLGPRG START='"10-NOV-2009 23:00:00"' REPEAT_DAYS=7 '"16-SEP-2009 10:20:12"'
3. alterAutoConfigTablesToNoParallel
sqlplus system/lt1s4sclf
alter table applsys.WF_ITEM_ATTRIBUTE_VALUES noparallel;
alter table applsys.WF_NOTIFICATION_ATTRIBUTES noparallel;
alter table applsys.FND_LOBS noparallel;
4. setupMonitoringJobs
sqlplus / as sysdba
drop table ops$oracle.apps_servers;
create table ops$oracle.apps_servers ( SEQ_NO NUMBER, HOST_NAME VARCHAR2(25 BYTE) PRIMARY KEY, NODEFOR VARCHAR2(25
BYTE));
insert into ops$oracle.apps_servers as select * from ops$oracle.xpr_apps_servers;
update ops$oracle.apps_servers a set a.seq_no = ( select b.node_id from applsys.fnd_nodes b where upper(b.node_name) =
upper(a.host_name));
Apps Post-Instance Specific -- Only for ERP
CFN Specific:--executeP2RCloningSteps, updateProfileOptionForCM, additionalStepsForCloneVerification.
executeP2RCloningSteps
1. The folder $XXCFI_TOP/interface/ (i.e /apps/ts3cfn/apps/apps_st/appl/xxcfi/12.0.0/interface/) is not having any folders except TREC. The
folder/files should be present as that of the CFNPRD.
so compare with source once and copy the folders as required.
2. The folder $XXCFI_TOP/faxpo/ has been owned by 'oats3cfn' while the expected owner is 'faxmgr'.
3. The file POXBWVRP.fmx pointing to 'POXBWVRP.fmx-> /apps/cfnprd/apps/apps_st/appl/xxcfi/12.0.0/forms/US/CFIBWVRP.fmx'. The expected
result is 'POXBWVRP.fmx-> /apps/ts3cfn/apps/apps_st/appl/xxcfi/12.0.0/forms/US/CFIBWVRP.fmx'
cd $PO_TOP/forms/US
ls -lrt POXBWVRP.fmx
'POXBWVRP.fmx-> /apps/cfnprd/apps/apps_st/appl/xxcfi/12.0.0/forms/US/CFIBWVRP.fmx' ->its pointing to source and need to change it to
target.
unlink POXBWVRP.fmx
ln -s /apps/ts3cfn/apps/apps_st/appl/xxcfi/12.0.0/forms/US/CFIBWVRP.fmx POXBWVRP.fmx
ls -lrt POXBWVRP.fmx
4. In the 'Verification Step 1.1: Set WF Parameters', the WF parameter 'REPLYTO' has been set to the value '[email protected]' while the
expected value is '[email protected]'.
Run the below UDPATE statement to fix the issue:
UPDATE apps.fnd_svc_comp_param_vals v
SET v.parameter_value = '[email protected]',
WHERE v.parameter_id =
(SELECT p.parameter_id
FROM apps.fnd_svc_comp_params_b p,
apps.fnd_svc_components c
WHERE c.component_type = 'WF_MAILER'
AND v.component_id = c.component_id
AND v.parameter_id = p.parameter_id
AND p.parameter_name = 'REPLYTO');
5. In the 'Verification Step 1.3: Set Workflow Administrator Web to WF Admin', the Workflow Administrator Web has been set to the value
'SYSADMIN' while the expected value is 'FND_RESP|FND|FNDWF_ADMIN_WEB_NEW|STANDARD'.
Run the below UDPATE statement to fix the issue:
UPDATE wf_resources
SET text = 'FND_RESP|FND|FNDWF_ADMIN_WEB_NEW|STANDARD'
WHERE name = 'WF_ADMIN_ROLE';
6. In the 'Verification Step 3.6: XML Publisher Administrator', the XML Profile, SYSTEM_TEMP_DIR is set to the value
'/apps/orarpt/CFNPRD/temp' while the expected value is '/apps/orarpt/TS3CFN/temp'.
Run the below UDPATE statement to fix the issue:
UPDATE xdo_config_values
SET value = '/apps/orarpt/TS3CFN/temp'
WHERE property_code = 'SYSTEM_TEMP_DIR';
7. In the 'Verification Step 4.2 : Set Email alias for Employe Load Lookup', the lookup code: MAX_REC_TOLERANCE is set to the value '29000'
while the expected value is '100000'.
Run the below UDPATE statement to fix the issue:
UPDATE fnd_lookup_values
SET meaning = '100000'
WHERE lookup_type = 'XXCFI_EMP_LOAD_HRMS_DATA_CHECK'
AND lookup_code = 'MAX_REC_TOLERANCE';
8. In the 'Verification Step 4.3: APINV email Alias check', the total number of APINV records SET to a value other than 'fin-workflow-emails' are
'2298' while the expected value is ZERO.
Run the below UDPATE statement to fix the issue:
UPDATE /* parallel(a,8) */
wf_item_attribute_values
SET text_value = 'fin-workflow-emails'
WHERE item_type = 'APINV';
AND NAME IN ('XXCFI_APBUS_ALIAS','XXCFI_APEMAIL_ALIAS')
AND SUBSTR (item_key, 1, INSTR (item_key, '_') - 1) IN
(SELECT invoice_id
FROM ap_invoices_all
WHERE wfapproval_status = 'INITIATED')
AND text_value <> 'fin-workflow-emails'
2. updateProfileOptionForCM
UPDATE apps.fnd_profile_option_values SET profile_option_value = 'QUEUE' WHERE profile_option_id = (SELECT profile_option_id FROM
apps.fnd_profile_options WHERE profile_option_name ='CONC_TM_TRANSPORT_TYPE') AND level_id = 10001;
UPDATE apps.fnd_profile_option_values SET profile_option_value = 'ON' WHERE profile_option_id = (SELECT profile_option_id FROM
apps.fnd_profile_options WHERE profile_option_name ='CP_INSTANCE_CHECK') AND level_id = 10001;
3. additionalStepsForCloneVerification
UPDATE apps.fnd_svc_comp_param_vals v SET v.parameter_value = '[email protected] 'WHERE v.parameter_id = (SELECT
p.parameter_id FROM apps.fnd_svc_comp_params_b p, apps.fnd_svc_components c WHERE c.component_type = 'WF_MAILER' AND
v.component_id = c.component_id AND v.parameter_id = p.parameter_id AND p.parameter_name = 'REPLYTO');
UPDATE apps.wf_resources SET text = 'FND_RESP|FND|FNDWF_ADMIN_WEB_NEW|STANDARD' WHERE name = 'WF_ADMIN_ROLE';
UPDATE apps.xdo_config_values SET value = '/apps/orarpt/TS3CFN/temp' WHERE property_code = 'SYSTEM_TEMP_DIR';
UPDATE apps.fnd_lookup_values SET meaning = '100000' WHERE lookup_type = 'XXCFI_EMP_LOAD_HRMS_DATA_CHECK' AND
lookup_code = 'MAX_REC_TOLERANCE';
UPDATE /* parallel(a, */ apps.wf_item_attribute_values SET text_value = 'fin-workflow-emails' WHERE item_type = 'APINV' AND NAME IN
('XXCFI_APBUS_ALIAS','XXCFI_APEMAIL_ALIAS') AND SUBSTR (item_key, 1, INSTR (item_key, '_') - 1) IN (SELECT invoice_id FROM
apps.ap_invoices_all WHERE wfapproval_status = 'INITIATED') AND text_value <> 'fin-workflow-emails';
G2C Specific:-- updateADOVARSFile, compileJSPs, recursiveChangePermission, runBulkSynchronizationOnWFLocalUserRoles,
updateFNDFormFuncRW, updateSSOLoginTypes, updateSSOLoginTypesToBoth, recursiveChangePermissionXML
1. ADOVARS file : cp /apps/orarpt/LT1G2C/c3-a1-oa2-iplt-101/saveconfig/adovars.env /apps/lt1g2c/apps/apps_st/appl/admin/adovars.env
2. SOCKET file : cp /apps/orarpt/LT1G2C/c3-a1-oa2-iplt-101/saveconfig/socket.env
/apps/local/LT1G2C/inst/apps/LT1G2C_c3-a1-oa2-iplt-101/ora/10.1.2/forms/server/socket.env
3. Compile jsp
cd $FND_TOP/patch/115/bin
perl ojspCompile.pl --compile --flush -p 20
4. recursiveChangePermission
chmod -R 777 /apps/lt1g2c/apps/apps_st/comn/java/classes/cisco/oracle/apps/xxg2c/goaling
5. runBulkSynchronizationOnWFLocalUserRoles
sqlplus system/lt1s4sg2c
select count(1) from dba_tab_partitions where table_name = 'WF_LOCAL_USER_ROLES' and logging != 'YES' ->Bulk Synchronization needs to
be executed
sqlplus APPS/Kn19hth00d
exec apps.wf_local_synch.bulksynchronization() set timeout=7200
6. updateFNDFormFuncRW
sqlplus system/lt1s4sg2c
update apps.fnd_form_functions set parameters = nvl(replace(parameters, 'YES', 'NO'), 'QUERY_ONLY="NO"') where function_name =
'FND_FNDSCAUS';
7. updateSSOLoginTypes
sqlplus system/lt1s4sg2c
UPDATE apps.fnd_profile_option_values SET profile_option_value = 'N' WHERE (application_id, profile_option_id) = (SELECT application_id,
profile_option_id FROM apps.fnd_profile_options WHERE profile_option_name ='APPS_SSO_LDAP_SYNC' and level_id = 10001);
8. updateSSOLoginTypesToBoth
sqlplus system/lt1s4sg2c
UPDATE apps.fnd_profile_option_values SET profile_option_value = 'BOTH' WHERE (application_id, profile_option_id) = (SELECT
application_id, profile_option_id FROM apps.fnd_profile_options WHERE profile_option_name ='APPS_SSO_LOCAL_LOGIN' and level_id =
10001);
9. recursiveChangePermissionXML
Change permissions on xml files On All Nodes
Post Database tasks -- Only for ERP
1. set PASSWORD_VERIFY_FUNCTION to null
set lines 500 pages 0
select * from dba_profiles where RESOURCE_NAME like 'PASSWORD_VERIFY_FUNCTION';
select 'alter profile '||PROFILE||' limit PASSWORD_VERIFY_FUNCTION null;' from dba_profiles where
resource_name='PASSWORD_VERIFY_FUNCTION';
alter profile default limit PASSWORD_VERIFY_FUNCTION null;
alter profile SOX_PROFILE limit PASSWORD_VERIFY_FUNCTION null;
alter profile EMAN_DB_MONITOR limit PASSWORD_VERIFY_FUNCTION null;
alter profile DBPROF limit PASSWORD_VERIFY_FUNCTION null;
run the above cmds to make profile null.
2. set PASSWORD_REUSE_MAX to unlimited
SQL>select 'alter profile '||PROFILE||' limit PASSWORD_REUSE_MAX unlimited;' from dba_profiles where
RESOURCE_NAME='PASSWORD_REUSE_MAX';
'ALTERPROFILE'||PROFILE||'LIMITPASSWORD_REUSE_MAXUNLIMITED;'
------------------------------------------------------------------------------------------------------------------------
alter profile DEFAULT limit PASSWORD_REUSE_MAX unlimited;
alter profile AD_PATCH_MONITOR_PROFILE limit PASSWORD_REUSE_MAX unlimited;
alter profile EM_OAM_MONITOR_PROFILE limit PASSWORD_REUSE_MAX unlimited;
alter profile EMAN_DB_MONITOR limit PASSWORD_REUSE_MAX unlimited;
alter profile SOX_PROFILE limit PASSWORD_REUSE_MAX unlimited;
run the above cmds to make PASSWORD_REUSE_MAX to null.
3. set the global_name
select * from global_name;
ALTER DATABASE RENAME GLOBAL_NAME to LT1G2C;
4. check oracleDB.par for LT1G2C
cd /usr/tools/oracle/Standard/script
cat oracleDB.par
5. check flags in oratab entry
cat /etc/oratab
6. restore aq_tm_processes and job_queue_processes
SQL> show parameter aq
aq_tm_processes integer 0
SQL> show parameter job_queue
job_queue_processes integer 0
SQL> alter system set aq_tm_processes=5 scope=both;
SQL> alter system set job_queue_processes=32 scope=both;
SQL> show parameter aq
aq_tm_processes integer 5
SQL> show parameter job_queue
job_queue_processes integer 32
7. set _external_scn_rejection_delta_threshold_minutes to null
SQL> alter system set "_external_scn_rejection_delta_threshold_minutes" = 0 scope=both;
SQL> show parameter scn
8. setup Cisco DBlinks governance
SQL>@/usr/tools/oracle/dblink-gov/dblink_admin_create_user.sql
tnsping RDACPRD
9. verify if any INVALID objects in ciscoDblinkAdm
select count(*) from dba_objects where status='INVALID' and owner='CISCODBLINKADM';
10. drop database link selflink_system if exists
SQL> drop database link selflink_system;
SQL>@/usr/tools/oracle/dblink-gov/dblink_validation.sql
11. check DBLINK Governance.
SQL> set linesize 100
column object_name format a50
column object_type format a20
column status format a10
select object_name,object_type,status,created from dba_objects where owner='CISCO_DBLINKADM';
OBJECT_NAME OBJECT_TYPE STATUS CREATED
-------------------------- --------------- ---------- -----------------
DB_LINK_CHECK TRIGGER VALID 06-MAR-2011
REPLACE_SPACES_SINGLE_SPACE FUNCTION VALID 30-MAY-2009
CHECK_DBLINK_CREATION PROCEDURE VALID 30-MAY-2009
DBLINKADM2SOXRO.CISCO.COM DATABASE LINK VALID 28-NOV-2012
12. after complete, reset the _external_scn_rejection_delta_threshold_minutes parameter
SQL> alter system set "_external_scn_rejection_delta_threshold_minutes" = 2880 scope=both;
SQL> alter system set "_external_scn_logging_threshold_seconds" = 3600 scope=both;
13. enabling SOX_PROFILE if applicable
select 'alter profile '||PROFILE||' limit PASSWORD_VERIFY_FUNCTION password_dontchange_function;' from dba_profiles where
resource_name='PASSWORD_VERIFY_FUNCTION';
for sox_profile set it as below.
alter profile SOX_PROFILE limit PASSWORD_VERIFY_FUNCTION password_dontchange_function;
14. compile Invalid Objects
select count(*) from dba_objects where status='INVALID';
run utl_recomp.recomp_parallel(8);
select count(*) from dba_objects where status='INVALID';
15. dropping ops$oracle.xpr_dba_objects_post, ignore if it does not exist
drop table ops$oracle.xpr_dba_objects_post;
16. backing up dba_objects to ops$oracle.xpr_dba_objects_post
create table ops$oracle.xpr_dba_objects_post as select * from dba_objects
17. compare if rows in DBA_DB_LINKS and SYS.LINK$ are equal
select count(*) from dba_db_links;
select count(*) from sys.link$;
18. run the below script for granting the privs to PERF11i in NON ERP and ERP databases.
vi /oracle/export/Perf11i_privileges_for_11g_SOX_Databases.sql
GRANT CREATE VIEW TO PERF11I;
GRANT CREATE TABLE TO PERF11I;
GRANT ALTER SESSION TO PERF11I;
GRANT CREATE SESSION TO PERF11I;
GRANT CREATE SYNONYM TO PERF11I;
GRANT CREATE SEQUENCE TO PERF11I;
GRANT CREATE DATABASE LINK TO PERF11I;
GRANT CREATE PROCEDURE TO PERF11I;
GRANT CREATE TRIGGER TO PERF11I;
GRANT CREATE TYPE TO PERF11I;
GRANT CREATE MATERIALIZED VIEW TO PERF11I;
GRANT EXECUTE ON SYS.DBMS_LOCK TO PERF11I;
GRANT EXECUTE ON SYS.DBMS_SYSTEM TO PERF11I;
GRANT SELECT_CATALOG_ROLE TO PERF11I;
GRANT SELECT ANY DICTIONARY TO PERF11I;
GRANT SELECT ANY TABLE TO PERF11I;
GRANT SELECT ON DBA_SEGMENTS TO PERF11I;
GRANT SELECT ON DBA_FREE_SPACE TO PERF11I;
GRANT SELECT ON SYS.GV_$SESSION TO PERF11I;
GRANT SELECT ON SYS.V_$SESSION TO PERF11I;
GRANT SELECT ON SYS.V_$SESSION_WAIT TO PERF11I;
GRANT SELECT ON SYS.V_$SQLAREA TO PERF11I;
GRANT SELECT ON SYS.V_$SQLTEXT TO PERF11I;
GRANT SELECT ON SYS.V_$SYSSTAT TO PERF11I;
GRANT SELECT ON SYS.V_$TRANSACTION TO PERF11I;
GRANT SELECT ON SYS.V_$ROLLNAME TO PERF11I;
GRANT SELECT ON SYS.V_$SORT_USAGE TO PERF11I;
GRANT SELECT ON SYS.V_$ROLLSTAT TO PERF11I;
GRANT SELECT ON SYS.V_$SQL TO PERF11I;
GRANT SELECT ON SYS.V_$SYSTEM_EVENT TO PERF11I;
GRANT SELECT ON SYS.V_$LATCH TO PERF11I;
GRANT SELECT ON SYS.V_$INSTANCE TO PERF11I;
GRANT SELECT ON SYS.V_$SQL_PLAN TO PERF11I;
GRANT SELECT ON SYS.V_$SQLTEXT_WITH_NEWLINES TO PERF11I;
GRANT EXECUTE ON DBMS_WORKLOAD_REPOSITORY TO PERF11I;
GRANT EXECUTE ON DBMS_MONITOR TO PERF11I;
GRANT EXECUTE ON DBMS_ADVISOR TO PERF11I;
GRANT EXECUTE ON DBMS_SQLTUNE TO PERF11I;
GRANT ADMINISTER ANY SQL TUNING SET TO PERF11I;
GRANT ADVISOR TO PERF11I;
GRANT ALTER ANY SQL PROFILE TO PERF11I;
GRANT CREATE ANY SQL PROFILE TO PERF11I;
GRANT DROP ANY SQL PROFILE TO PERF11I;
GRANT ADMINISTER SQL MANAGEMENT OBJECT TO PERF11I;
GRANT SELECT ON V_$SESS_TIME_MODEL TO PERF11I;
GRANT SELECT ON V_$SYS_TIME_MODEL TO PERF11I;
GRANT SELECT ON V_$MUTEX_SLEEP TO PERF11I;
GRANT SELECT ON V_$MUTEX_SLEEP_HISTORY TO PERF11I;
GRANT SELECT ON V_$SQLSTATS TO PERF11I;
GRANT SELECT ON V_$PROCESS_MEMORY TO PERF11I;
GRANT SELECT ON V_$ENQUEUE_STATISTICS TO PERF11I;
GRANT SELECT ON V_$JAVA_POOL_ADVICE TO PERF11I;
GRANT SELECT ON V_$SGA_TARGET_ADVICE TO PERF11I;
GRANT SELECT ON V_$FILE_HISTOGRAM TO PERF11I;
GRANT SELECT ON V_$EVENT_HISTOGRAM TO PERF11I;
GRANT SELECT ON V_$OSSTAT TO PERF11I;
GRANT SELECT ON V_$INSTANCE_CACHE_TRANSFER TO PERF11I;
GRANT SELECT ON V_$CURRENT_BLOCK_SERVER TO PERF11I;
GRANT SELECT ON V_$SEGSTAT TO PERF11I;
GRANT SELECT ON V_$SEGSTAT_NAME TO PERF11I;
GRANT SELECT ON V_$SEGMENT_STATISTICS TO PERF11I;
GRANT SELECT ON V_$UNDOSTAT TO PERF11I;
GRANT SELECT ON V_$CR_BLOCK_SERVER TO PERF11I;
GRANT SELECT ON V_$PGASTAT TO PERF11I;
GRANT SELECT ON V_$PGA_TARGET_ADVICE TO PERF11I;
GRANT SELECT ON V_$SQL_WORKAREA_HISTOGRAM TO PERF11I;
GRANT SELECT ON V_$SHARED_POOL_ADVICE TO PERF11I;
GRANT SELECT ON V_$DB_CACHE_ADVICE TO PERF11I;
GRANT SELECT ON V_$RESOURCE_LIMIT TO PERF11I;
GRANT SELECT ON V_$EVENT_NAME TO PERF11I;
GRANT SELECT ON V_$SESSION_EVENT TO PERF11I;
GRANT SELECT ON V_$WAITSTAT TO PERF11I;
GRANT SELECT ON V_$SGASTAT TO PERF11I;
GRANT SELECT ON V_$SQLTEXT TO PERF11I;
GRANT SELECT ON V_$SQLAREA TO PERF11I;
GRANT SELECT ON V_$DATABASE TO PERF11I;
GRANT SELECT ON V_$LIBRARYCACHE TO PERF11I;
GRANT SELECT ON V_$ROWCACHE TO PERF11I;
GRANT SELECT ON V_$SYSTEM_PARAMETER TO PERF11I;
GRANT SELECT ON V_$PARAMETER TO PERF11I;
GRANT SELECT ON V_$SGA TO PERF11I;
GRANT SELECT ON V_$SESSTAT TO PERF11I;
GRANT SELECT ON V_$LATCH_MISSES TO PERF11I;
GRANT SELECT ON V_$LATCH_PARENT TO PERF11I;
GRANT SELECT ON V_$LATCH_CHILDREN TO PERF11I;
GRANT SELECT ON V_$PROCESS TO PERF11I;
GRANT SELECT ON V_$THREAD TO PERF11I;
GRANT SELECT ON V_$INSTANCE_RECOVERY TO PERF11I;
GRANT SELECT ON V_$BUFFER_POOL_STATISTICS TO PERF11I;
GRANT SELECT ON V_$BUFFER_POOL TO PERF11I;
GRANT SELECT ON V_$DLM_MISC TO PERF11I;
GRANT SELECT ON SYS.X_$KSPPCV2 TO PERF11I;
GRANT SELECT ON SYS.X_$KSPPI TO PERF11I;
SQL>@/oracle/export/Q1FY16_LT1G2C/Perf11i_privileges_for_11g_SOX_Databases.sql
Run the below script for granting the privs in ERP databases
vi /oracle/export/Q1FY16_LT1G2C/Perf11i_privileges_for_ERP.sql
GRANT SELECT ON APPLSYS.FND_APPLICATION TO PERF11I;
GRANT SELECT ON APPLSYS.FND_CONCURRENT_REQUESTS TO PERF11I;
GRANT SELECT ON APPLSYS.FND_CONCURRENT_PROGRAMS TO PERF11I;
GRANT SELECT ON APPLSYS.FND_CONCURRENT_PROGRAMS_TL TO PERF11I;
GRANT SELECT ON APPLSYS.FND_CONCURRENT_PROCESSES TO PERF11I;
GRANT SELECT ON APPLSYS.FND_CONCURRENT_QUEUES_TL TO PERF11I;
GRANT SELECT ON APPLSYS.FND_CONCURRENT_QUEUES TO PERF11I;
GRANT SELECT ON APPS.FND_CONCURRENT_WORKER_REQUESTS TO PERF11I;
SQL>@/oracle/export/Q1FY16_LT1G2C/Perf11i_privileges_for_ERP.sql;
19. make sure listeners is up in all nodes.
20. LDAP connectivity->make sure in sqlnet.ora we have LDAP entry first.
cd /var/opt/oracle
cat sqlnet.ora
EX : NAMES.DIRECTORY_PATH=(LDAP, TNSNAMES, ONAMES, HOSTNAME)
Golden Gate Setup
1).Enable the archive log mode if it has gg setup
A.run the stop_oracle script to shut down the db.
B. In Instance1->sqlplus / as sysdba
SQL>startup mount;
SQL>alter database archivelog;
SQL>archive log list; ->check the archive log dest is correct.
2).enable supplemental logging at database level
SQL>alter database add supplemental log data;
SQL> alter database open;
SQL>shut immediate;
Run the start_oracle script to bring up all instances.
3).give 755 for redo's for NAS/Delphix FS DB's
chmod 755 -R /oracle/oradata/TS2ECP/datafile/TS1CSF/onlinelog
chmod 755 -R /oracle/oradata/TS2ECP/archive
4). setup the cron for arch permission change.
vi /usr/tools/oracle/custom/chg_perm_ts2ecp.sh
chmod 755 /oracle/oradata/TS2ECP/archive/*.dbf*
chmod 755 /oracle/oradata/TS2ECP/datafile/TS2ECP/onlinelog/*.log*
crontab -e
5,10,15,20,25,30,35,40,45,50,55,00 * * * * /usr/tools/oracle/custom/chg_perm_ts2ecp.sh >/dev/null 2>&1
5).datavault should be disabled.
cd $ORACLE_HOME/rdbms/lib
ar -t libknlopt.a | grep -c kzvidv.o
6). GG mount points should be visible in all nodes.
df -h |grep TS2ECP
/apps/gg/home/TS2ECP
/apps/gg/TS2ECP
7).GGADM schema password should work and the default and temporary tablespace of GGADM
EX: sqlplus ggadm/qwerty123
8).Make sure /oracle/oradata/TS2ECP/datafile should be owned by oracle:dba[for delphix databases]
9). make sure /oracle/oradata/TS2CSF/fs* should be owned by oracle:dba[for non delphix databases]
Miscellaneous Steps
1).Make sure that none of the Service Component Setup points to the source database
Run $FND_TOP/sql/wfver.sql
2) Disable detailed diagnostics on external nodes
a. change/verify the FND_DIAGNOSTICS profile Hierarchy type to serv-resp in application developer responsibility
b. set "FND: Diagnostics" profile value to No for external servers.
Alternatively use following updates
a.update applsys.fnd_profile_options set hierarchy_type = 'SERVRESP' where profile_option_name = 'FND_DIAGNOSTICS';
b. This query is not updating any records at this time, since its stored differentlyin db (level_id = 10007 instead of 10005, also the level_value
does not match server_id in fnd_nodes)
update apps.fnd_profile_option_values a set a.profile_option_value = 'N' where a.profile_option_id in (select p.profile_option_id --, v.level_id,
v.level_value, v.profile_option_value from apps.fnd_profile_options p, apps.fnd_profile_option_values v, apps.fnd_profile_options_tl
n,apps.fnd_nodes svr where p.profile_option_id = v.profile_option_id and p.profile_option_name = n.profile_option_name and
upper(n.user_profile_option_name) like upper('fnd%diag%') and svr.node_id = v.level_value ) and a.level_id = 10005 and a.level_value in (select
node_id from apps.fnd_nodes where node_name like '%X%') and a.profile_option_value <> 'N';
3). Change $AU_TOP permissions to 755
chmod -R 755 $AU_TOP
4).Update List of Responsibilities for Extrenal user Access
a. Login to Oracle E-Business Suite as sysadmin user using the internal URL
b. Select System Administrator Responsibility
c. Select Profile / System
d. From the 'Find system profile option Values' window, select %IBE Customer% from User Option.
e. Query for %RESP%TRUST%. You will see a profile option named 'Responsibility trust level'.
The value for this profile option at site level will be Normal. Leave this setting unchanged If the value is normal.
f. Set the value of this profile option for the chosen responsibility to External at the responsibility level.
The site-level value should remain Normal.
Alternatively run the following update:
update fnd_profile_option_values a set a.profile_option_value = 3 where a.rowid in (select v.rowid -- , v.level_id, v.level_value,
v.profile_option_value from apps.fnd_profile_options p, apps.fnd_profile_option_values v, apps.fnd_profile_options_tl n, apps.fnd_application app,
apps.fnd_responsibility rsp where p.profile_option_id = v.profile_option_id and p.profile_option_name = n.profile_option_name and
upper(n.user_profile_option_name) like upper('%trust_level%') and rsp.application_id = v.level_value_application_id and rsp.responsibility_id
= v.level_value and app.application_id (+) = v.level_value) and a.profile_option_value <> 3;
-- Notice that IBE Customer responsibility key has not been entered just to make sure that this will work for any future responsibilities that are
going to be added
5) Update Node Trust Level
a) Login to Oracle E-Business Suite as sysadmin user using the internal URL
b) Select the System Administrator Responsibility
c) Select Profile / System
d) From the 'Find system profile option Values' window, select the server that you want to designate as the external web tier
e) Query for %NODE%TRUST%. You will see a profile option named 'Node Trust Level'. The value for this profile option at the site level will be
Normal.
Leave this setting unchanged If the value has been set to normal.
f) Set the value of this profile option to External at the server level. The site level value should remain Normal.
g) Do the same changes for other external nodes too
Alternatively use the following update statement
update apps.fnd_profile_option_values a set a.profile_option_value = 3 where a.profile_option_id in (select p.profile_option_id --, v.level_id,
v.level_value, v.profile_option_value from apps.fnd_profile_options p, apps.fnd_profile_option_values v, apps.fnd_profile_options_tl n,
apps.fnd_nodes svr where p.profile_option_id = v.profile_option_id and p.profile_option_name = n.profile_option_name and
upper(n.user_profile_option_name) like upper('node_trust_level') and svr.node_id = v.level_value) and a.level_id = 10005 and a.level_value in
(select node_id from apps.fnd_nodes where node_name like '%X%') and a.profile_option_value <> 3;
OTM Refresh Post Steps
Please refer the wiki OTM Refresh Post Steps
Sanity Check - DB
Refer the Sanity Check List
Pre-Release Check List
1) Remove special instructions if any in DBA Duty Tool.
2) Uncomment crons on target (DB & FE) & Remove blackout of target.
3) In case of delphix please perform the below :
Inventory Page Update -- Update the inventory page with vdb provisioning details.
Start/Stop oracle scripts integration -- Make sure start/stop oracle scripts are integrated with vdb mount/umount scripts and is working as
expected.
Snap taken -- Make sure a successfull vdb snapshot is taken.
4) DBTS Update -- Make sure DBTS is updated (Both DB & FE) including Extended DB details. Fill in Delphix details in as well in case of delphix.