You are on page 1of 9

************************

*** On the DB Server ***


************************
Create /orahome/db/oraInventory directory and point /etc/oraInst.loc to this
directory

[oracle@tst-oracledb01 oraInventory]$ cat /etc/oraInst.loc


# inventory_loc=/u01/app/oraInventory
# TQ
inventory_loc=/orahome/db/oraInventory
inst_group=dba

Extract the Oracle Home from the backup

$ cd /orahome/db

$ tar -xzf /util/c3backup/rman/20170817_234209/oracledb01_orahome.tgz

Restore the Context File from ~/work to /orahome/db/tech_st/11.2.0/appsutil

$ cd ~/work
$ cp -ip TST_tst-oracledb01.xml /orahome/db/tech_st/11.2.0/appsutil

Clone the DB Tech stack

$ cd /orahome/db/tech_st/11.2.0/appsutil/clone/bin

$ perl adcfgclone.pl dbTechStack /orahome/db/tech_st/11.2.0/appsutil/TST_tst-


oracledb01.xml

Cleanup /oradata, /oraredo and /oraarch

The rman process needs more than 24GB in /oraarch. To overcome this issue use the
work around by creating the softlink in /oradata

$ df -h .
Filesystem Size Used Avail Use% Mounted on
/dev/xvdb 24G 44M 24G 1% /oraarch

$ mkdir -p /oradata/db/apps_st/redo_data/data

$ cd /oraarch/db/apps_st

$ mv -i data data.orig

$ ln -s /oradata/db/apps_st/redo_data/data

$ ls -trl

drwxr-xr-x. 2 oracle dba 4096 Aug 19 11:08 data.orig


lrwxrwxrwx. 1 oracle dba 34 Aug 19 11:13 data ->
/oradata/db/apps_st/redo_data/data
$ sqlplus "/as sysdba"
SQL> startup nomount

SQL> exit

$ rman AUXILIARY /

Recovery Manager: Release 11.2.0.3.0 - Production on Sat Aug 19 09:08:11 2017

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

connected to auxiliary database: TST (not mounted)

RMAN> DUPLICATE DATABASE TO TST


BACKUP LOCATION '/util/c3backup/rman/20170817_234209'
NOFILENAMECHECK;

input datafile copy RECID=96 STAMP=952437325 file


name=/oradata/db/apps_st/data/a_ref02.dbf

contents of Memory Script:


{
Alter clone database open resetlogs;
}
executing Memory Script

database opened
Finished Duplicate Db at 19-AUG-17

RMAN> exit

Recovery Manager complete.

$ exit

# exit

This will terminate the screen session.

Open another session

Shutdown the database

Creat spfile

SQL> create spfile from pfile;

Disable Automatic archivelogging


$ sqlplus "/as sysdba"
SQL> startup mount
SQL> alter database noarchivelog;

SQL> alter database open;

Shutdown the database

Startup the database

$ cd $ORACLE_HOME/appsutil/clone/bin

$ perl adcfgclone.pl dbconfig $CONTEXT_FILE

Excute AUTOCONFIG
------------------

$ cd $ORACLE_HOME/appsutil/scripts/$CONTEXT_NAME

$ adautocfg.sh

--------------------------------------------------------------
SQL> update wf_notifications
set mail_status = 'SENT'
where mail_status != 'SENT';

2075294 rows updated.

--------------------------------------------------------------
SQL> create table ar.hz_contact_points_bkup
as
select * from ar.hz_contact_points;

Table created.

--------------------------------------------------------------
SQL> update ar.hz_contact_points
set email_address = 'postclone@example.com'
where contact_point_type = 'EMAIL';

3203 rows updated.

--------------------------------------------------------------
SQL> UPDATE APPLSYS.FND_PRINTER_TL FPT
SET FPT.PRINTER_NAME = 'NPC3_'||FPT.PRINTER_NAME
where upper(printer_name) <> 'NOPRINT';

13 rows updated.

--------------------------------------------------------------
SQL> UPDATE APPLSYS.FND_PRINTER FP
SET FP.PRINTER_NAME = 'NPC3_'||FP.PRINTER_NAME
where upper(printer_name) <> 'NOPRINT';

13 rows updated.

--------------------------------------------------------------
SQL> update fnd_concurrent_requests
set hold_flag = 'Y'
WHERE phase_code = 'P'
AND status_code in ('Q','I')
and hold_flag = 'N';

110 rows updated.


--------------------------------------------------------------

SQL> commit;

SQL> Commit Complete


--------------------------------------------------------------

**************************
*** On the APPS Server ***
**************************

$ cd /orahome/apps

$ tar -xzf /util/c3backup/rman/apps/20170819_234049/app_apps-fs1.tgz

$ tar -xzf /util/c3backup/rman/apps/20170819_234049/app_apps-fs2.tgz

$ tar -xzf /util/c3backup/rman/apps/20170819_234049/app_apps-fsne.tgz

Set the Inventory location to

/orahome/apps/oraInventory in /etc/oraInst.loc

If the
/orahome/apps/oraInventory does not exist create it. If the directory exists from a
previous clone, then clean it.

Remove FMW_Home and inst directories under fs1 and fs2


------------------------------------------------------
$ cd /orahome/apps/fs1
$ rm -Rf FMW_Home inst

$ cd /orahome/apps/fs2
$ rm -Rf FMW_Home inst

Execute Rapid Clone on fs1 filesystem


--------------------------------------
$ cd /orahome/apps/fs1/EBSapps/comn/clone/bin
$ perl adcfgclone.pl appsTier
[applmgr@tst-oracle01 bin]$ perl adcfgclone.pl appsTier

Copyright (c) 2011 Oracle Corporation


Redwood Shores, California, USA

Oracle E-Business Suite Rapid Clone

Version 12.2

adcfgclone Version 120.63.12020000.27

Enter the APPS password :


Running:
/orahome/apps/fs1/EBSapps/comn/clone/bin/../jre/bin/java -Xmx600M -classpath
/orahome/apps/fs1/EBSapps/comn/clone/jlib/obfuscatepassword.jar:/orahome/apps/fs1/E
BSapps/comn/clone/jlib/ojmisc.jar:/orahome/apps/fs1/EBSapps/comn/clone/jlib/java:/o
rahome/apps/fs1/EBSapps/comn/clone/jlib/emCfg.jar
oracle.apps.ad.clone.util.OPWrapper -encryptpwd
/orahome/apps/fs1/EBSapps/comn/clone/bin/../FMW/tempinfoApps.txt

Enter the Weblogic AdminServer password :


Running:
/orahome/apps/fs1/EBSapps/comn/clone/bin/../jre/bin/java -Xmx600M -classpath
/orahome/apps/fs1/EBSapps/comn/clone/jlib/obfuscatepassword.jar:/orahome/apps/fs1/E
BSapps/comn/clone/jlib/ojmisc.jar:/orahome/apps/fs1/EBSapps/comn/clone/jlib/java:/o
rahome/apps/fs1/EBSapps/comn/clone/jlib/emCfg.jar
oracle.apps.ad.clone.util.OPWrapper
/orahome/apps/fs1/EBSapps/comn/clone/bin/../FMW/tempinfo.txt
Running:
/orahome/apps/fs1/EBSapps/comn/clone/bin/../jre/bin/java -Xmx600M -classpath
/orahome/apps/fs1/EBSapps/comn/clone/jlib/obfuscatepassword.jar:/orahome/apps/fs1/E
BSapps/comn/clone/jlib/ojmisc.jar:/orahome/apps/fs1/EBSapps/comn/clone/jlib/java:/o
rahome/apps/fs1/EBSapps/comn/clone/jlib/emCfg.jar
oracle.apps.ad.clone.util.OPWrapper
/orahome/apps/fs1/EBSapps/comn/clone/bin/../FMW/EBSDataSource

Do you want to add a node (yes/no) [no] :

Running:
/orahome/apps/fs1/EBSapps/comn/clone/bin/../jre/bin/java -Xmx600M -cp
/orahome/apps/fs1/EBSapps/comn/clone/jlib/java:/orahome/apps/fs1/EBSapps/comn/clone
/jlib/xmlparserv2.jar:/orahome/apps/fs1/EBSapps/comn/clone/jlib/ojdbc5.jar:/orahome
/apps/fs1/EBSapps/comn/clone/jlib/obfuscatepassword.jar:/orahome/apps/fs1/EBSapps/c
omn/clone/jlib/ojmisc.jar:/orahome/apps/fs1/EBSapps/comn/clone/jlib/java:/orahome/a
pps/fs1/EBSapps/comn/clone/jlib/emCfg.jar oracle.apps.ad.context.CloneContext -e
/orahome/apps/fs1/EBSapps/comn/clone/bin/../context/apps/CTXORIG.xml -validate
-pairsfile /tmp/adpairsfile_5281.lst -stage /orahome/apps/fs1/EBSapps/comn/clone
2> /tmp/adcfgclone_5281.err; echo $? > /tmp/adcfgclone_5281.res

Log file located at


/orahome/apps/fs1/EBSapps/comn/clone/bin/CloneContext_0822101142.log

Target System File Edition type [run] :


Provide the values required for creation of the new APPL_TOP Context file.

Target System Hostname (virtual or normal) [tst-oracle01] :

Target System Database SID : TST

Target System Database Server Node [tst-oracle01] : tst-oracledb01

Target System Database Domain Name [ind1.com] :

Target System Base Directory : /orahome/apps

Target System Base Directory set to /orahome/apps

Target System Current File System Base set to /orahome/apps/fs1

Target System Other File System Base set to /orahome/apps/fs2

Target System Fusion Middleware Home set to /orahome/apps/fs1/FMW_Home

Target System Web Oracle Home set to /orahome/apps/fs1/FMW_Home/webtier

Target System Appl TOP set to /orahome/apps/fs1/EBSapps/appl

Target System COMMON TOP set to /orahome/apps/fs1/EBSapps/comn

Target System Instance Home Directory [/orahome/apps] :

Target System Instance Top set to /orahome/apps/fs1/inst/apps/TST_tst-oracle01

Do you want to preserve the Display [app01:0.0] (y/n) : n

Target System Display [tst-oracle01:0.0] :

Target System Root Service [enabled] :

Target System Web Administration [enabled] :

Target System Web Entry Point Services [enabled] :

Target System Web Application Services [enabled] :

Target System Batch Processing Services [enabled] :

Target System Other Services [disabled] :

Do you want the target system to have the same port values as the source system
(y/n) [y] ? : n

Target System Port Pool [0-99] : 0

Checking the port pool 0


done: Port Pool 0 is free
Report file located at /orahome/apps/fs1/inst/apps/TST_tst-
oracle01/admin/out/portpool.lst
Complete port information available at /orahome/apps/fs1/inst/apps/TST_tst-
oracle01/admin/out/portpool.lst
UTL_FILE_DIR on database tier consists of the following directories.

1. /usr/tmp/TST
2. /usr/tmp
3. /orahome/db/tech_st/11.2.0/appsutil/outbound/TST_tst-oracledb01
Choose a value which will be set as APPLPTMP value on the target node [1] : 1

Source environment file

Start Admin server

execute preclone

delete everything under fs2

copy fs1 to fs2

[applmgr@tst-oracle01 apps]$ echo $CONTEXT_FILE


/orahome/apps/fs1/inst/apps/TST_tst-oracle01/appl/admin/TST_tst-oracle01.xml

Logout and log back in without sourcing the environment file

$ cd /orahome/apps/fs2/EBSapps/comn/clone/bin

$ perl adcfgclone.pl appsTier

Enter the APPS password :


Running:
/orahome/apps/fs2/EBSapps/comn/clone/bin/../jre/bin/java -Xmx600M -classpath
/orahome/apps/fs2/EBSapps/comn/clone/jlib/obfuscatepassword.jar:/orahome/apps/fs2/E
BSapps/comn/clone/jlib/ojmisc.jar:/orahome/apps/fs2/EBSapps/comn/clone/jlib/java:/o
rahome/apps/fs2/EBSapps/comn/clone/jlib/emCfg.jar
oracle.apps.ad.clone.util.OPWrapper -encryptpwd
/orahome/apps/fs2/EBSapps/comn/clone/bin/../FMW/tempinfoApps.txt

Enter the Weblogic AdminServer password :


Running:
/orahome/apps/fs2/EBSapps/comn/clone/bin/../jre/bin/java -Xmx600M -classpath
/orahome/apps/fs2/EBSapps/comn/clone/jlib/obfuscatepassword.jar:/orahome/apps/fs2/E
BSapps/comn/clone/jlib/ojmisc.jar:/orahome/apps/fs2/EBSapps/comn/clone/jlib/java:/o
rahome/apps/fs2/EBSapps/comn/clone/jlib/emCfg.jar
oracle.apps.ad.clone.util.OPWrapper
/orahome/apps/fs2/EBSapps/comn/clone/bin/../FMW/tempinfo.txt
Running:
/orahome/apps/fs2/EBSapps/comn/clone/bin/../jre/bin/java -Xmx600M -classpath
/orahome/apps/fs2/EBSapps/comn/clone/jlib/obfuscatepassword.jar:/orahome/apps/fs2/E
BSapps/comn/clone/jlib/ojmisc.jar:/orahome/apps/fs2/EBSapps/comn/clone/jlib/java:/o
rahome/apps/fs2/EBSapps/comn/clone/jlib/emCfg.jar
oracle.apps.ad.clone.util.OPWrapper
/orahome/apps/fs2/EBSapps/comn/clone/bin/../FMW/EBSDataSource

Do you want to add a node (yes/no) [no] :


Running:
/orahome/apps/fs2/EBSapps/comn/clone/bin/../jre/bin/java -Xmx600M -cp
/orahome/apps/fs2/EBSapps/comn/clone/jlib/java:/orahome/apps/fs2/EBSapps/comn/clone
/jlib/xmlparserv2.jar:/orahome/apps/fs2/EBSapps/comn/clone/jlib/ojdbc5.jar:/orahome
/apps/fs2/EBSapps/comn/clone/jlib/obfuscatepassword.jar:/orahome/apps/fs2/EBSapps/c
omn/clone/jlib/ojmisc.jar:/orahome/apps/fs2/EBSapps/comn/clone/jlib/java:/orahome/a
pps/fs2/EBSapps/comn/clone/jlib/emCfg.jar oracle.apps.ad.context.CloneContext -e
/orahome/apps/fs2/EBSapps/comn/clone/bin/../context/apps/CTXORIG.xml -validate
-pairsfile /tmp/adpairsfile_7782.lst -stage /orahome/apps/fs2/EBSapps/comn/clone
2> /tmp/adcfgclone_7782.err; echo $? > /tmp/adcfgclone_7782.res

Log file located at


/orahome/apps/fs2/EBSapps/comn/clone/bin/CloneContext_0823015451.log

Target System File Edition type [run] : patch

Enter the full path of Run File System Context file :


/orahome/apps/fs1/inst/apps/TST_tst-oracle01/appl/admin/TST_tst-oracle01.xml

Provide the values required for creation of the new APPL_TOP Context file.

Target System Fusion Middleware Home set to /orahome/apps/fs2/FMW_Home

Target System Web Oracle Home set to /orahome/apps/fs2/FMW_Home/webtier

Target System Appl TOP set to /orahome/apps/fs2/EBSapps/appl

Target System COMMON TOP set to /orahome/apps/fs2/EBSapps/comn

RC-00217: Warning: Configuration home directory (s_config_home) evaluates to


/orahome/apps/fs2/inst/apps/TST_tst-oracle01. A directory with this name already
exists and is not empty.

Do you want to continue (y/n) : y

Target System Instance Top set to /orahome/apps/fs2/inst/apps/TST_tst-oracle01

Target System Port Pool [0-99] : 1

Checking the port pool 1


done: Port Pool 1 is free
Report file located at /orahome/apps/fs2/inst/apps/TST_tst-
oracle01/temp/portpool.lst
Complete port information available at /orahome/apps/fs2/inst/apps/TST_tst-
oracle01/temp/portpool.lst

UTL_FILE_DIR on database tier consists of the following directories.

1. /usr/tmp/TST
2. /usr/tmp
3. /orahome/db/tech_st/11.2.0/appsutil/outbound/TST_tst-oracledb01
Choose a value which will be set as APPLPTMP value on the target node [1] : 1

--------------------------------------------------------------
SQL> select profile_option_value
from apps.FND_PROFILE_OPTION_VALUES
where profile_option_id = 125;

PROFILE_OPTION_VALUE
--------------------------------------------------------------
TST

--------------------------------------------------------------
SQL> select distinct b.profile_option_id,a.user_profile_option_name "OPTION",
b.profile_option_value||decode(b.level_id,
10001,' at Site',
10002,' at App '||d.application_name,
10003,' at Resp '||e.responsibility_name,
10004,' at User '||f.user_name,
' Not Set'
) "Value"
from apps.fnd_profile_options_vl a,
apps.fnd_profile_option_values b,
apps.fnd_application_vl d,
apps.fnd_responsibility_vl e,
apps.fnd_user f
where a.profile_option_id = b.profile_option_id
and b.level_value=d.application_id(+)
and b.level_value=e.responsibility_id(+)
and b.level_value=f.user_id(+)
and ( upper(b.profile_option_value) like '%PRD%'
or upper(b.profile_option_value) like '%APP01%');

PROFILE_OPTION_ID
-----------------
OPTION
--------------------------------------------------------------------------------
Value
--------------------------------------------------------------------------------
9825
Applications Help Web Base URL
http://app01.ind1.com:8000/OA_HTML/ Not Set

You might also like