Skip to content

Oracle Applications RMAN Cloning

March 4, 2010

Source Instance
Name: PROD
Application and Database Owner: appown
Database Node: xyzdb Application Node : xyzap

Target Instance
Name: TST
Application and Database Owner: apptst
Node: abcdb Application Node: abcap

1. Copy RDBMS Oracle Home(ORACLE_HOME) from source (PROD,xyzdb) to target instance abcdb

Node: xyzdb
RDBMS ORACLE_HOME=/u00/app/oracle/PROD

RDBMS ORACLE_HOME=/u00/app/oracle/TST

2.Copy APPL_TOP, COMMON_TOP, ORA_TOP from xyzap to abcap



3.Cloning of Oracle Database normally can be done in 3 ways
1. Cold Backup Cloning
2. Hot Backup Cloning
3. RMAN Cloning

Here we are using RMAN Veritas Netbackup

Configuring Veritas Netbackup on abcdb node (Target)

Files to be Changed on abcdb

1) usr/openv/NetBackup/bp.conf
Change the client name to xyzdb ( Client name should be same as on Production)

2) Create a user (appown) to perform the restore (this user’s name and group must match the user that performed the backup on the original client).

(Refer : Doc ID 246241 Basic steps for running an alternate Client restore of Oracle database using Recovery Manager without a catalog )

Create a orapwdfile on target database
orapwd file=orapwdTST password=clonetst entries=5

On Node : xyzdb

Collect the information from PROD database ( Files to be Restored on TST)
a) spool the following result on PROD
sql >spool restore.rcv
sql>select ‘set newname for datafile’file#’ to ”’name”’;’ from v$datafile;

sql> spool off

b)Get the latest sequence number backed up on PROD (last log sequence=2153)

on Node : abcdb Path: /u00/app/oracle/TST/bin ( Target ORACLE_HOME)
a) tocuh restore.rcv & copy the spool result from above , Use the last log sequence number backed up in the script.
b) allocate channels for restoring database on abcdb.

sample restore.rcv look like this
run {
allocate auxiliary channel t1 type ‘SBT_TAPE’;
allocate auxiliary channel t2 type ‘SBT_TAPE’;
allocate auxiliary channel t3 type ‘SBT_TAPE’;
SEND ‘NB_ORA_SERV=sunvrts1, NB_ORA_CLIENT=xyzdb’;
set until logseq = 2153;
set newname for datafile 1 to ‘/u02/oradata/TST/datafiles/SYSTEM01.dbf’;
set newname for datafile 2 to ‘/u02/oradata/TST/redo/UNDOTBS101.dbf’;
set newname for datafile 3 to ‘/u02/oradata/TST/datafiles/SYSAUX01.dbf’;
set newname for datafile 4 to ‘/u02/oradata/TST /datafiles/ctxd01.dbf’;
duplicate target database to “TST” nofilenamecheck logfile
GROUP 1 ( ‘/u02/oradata/TST/redo/redo01.log’) SIZE 50M,
GROUP 2 ( ‘/u02/oradata/TST/redo/redo02.log’) SIZE 50M,
GROUP 3 ( ‘/u02/oradata/TST/redo/redo03.log’) SIZE 50M;

in above script
NB_ORA_SERV=Server name of the tape library
NB_ORA_CLIENT= Client Name with backup was done ( PROD Server Name)

Target Node : abcdb
Source ORACLE_HOME=/u00/app/oracle/TST
Create a init file $ORACLE_HOME/dbs/initTST.ora
sql> startup nomount

$ORACLE_HOME/bin Connect to catalog and source, target databases and run restore.rcv
connect target rman/XXXX@PROD
connect catalog RMAN_PROD/XXXX@RMANREP
connect auxiliary sys/clonetst
The above step will duplicate and open the database to TST

Backup init File
CP initTST.ora initTST.ora.original

on Node : abcdb
Configure the Database of Target System

a. cd $ORACLE_HOME/appsutil/clone/bin

$perl dbTier

Do you want to use a virtual hostname for the target node (y/n) [n] ?:n

Target instance is a Real Application Cluster (RAC) instance (y/n) [n]:n

Target System database name [PROD]:TST

Target system RDBMS ORACLE_HOME directory [/u00/app/oracle/PROD]

Target system utl_file accessible directories list [/usr/tmp]:/usr/tmp

Number of DATA_TOP’s on the target system [3]

Target system DATA_TOP 1 :/u02/oradata/TST/datafiles

Target system DATA_TOP 2:/u02/oradata/TST/redo

Target system DATA_TOP 3:/u02/oradata/TST/datafiles

Do you want to preserve the Display set to localhost:12.0 (y/n) [y] ?:y

Do you want to preserve the port values from the source system on the target system (y/n) [y] ?
: n

Started testing the availabilty of ports in port pool 21

Shutdown database TST and startup using backup initfile (initTST.ora.original)
cp initTST.ora.original initTST.ora
startup using pfile;

Configure the Target System Application nodes (abcap)

Log on to the target system as the APPLMGR user and type the following commands:
$ cd COMMON_TOP/clone/bin
$ perl appsTier
Do you want to use a virtual hostname for the target node (y/n) [n] ? n

Target system database SID [PROD] : TST

Target system database server node [xyzdb]:abcdb
Target system database domain name []

Does the target system have more than one application tier server node (y/n) [y] ? n

Does the target system application tier utilize multiple domain names (y/n) [n] ? n

Target system concurrent processing node [xyzap] :abcap

Target system administration node [xyzap] :abcap

Target system forms server node [xyzap]:abcap

Target system web server node [xyzap]:abcap

Is the target system APPL_TOP divided into multiple mount points (y/n) [n] ?:n

Target system APPL_TOP mount point [u11/app/prodappl l]:/u11/app/tstappl

Target system COMMON_TOP directory [/u11/app/prodcomn]:u11/app/prodcomn

Target system 8.0.6 ORACLE_HOME directory
u11/app/prodora/8.0.6] /u11/app/prodora /8.0.6

Target system iAS ORACLE_HOME directory u11/app/prodora/iAS]

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

Location of the JDK on the target system [/usr/java/jdk1.6.0_03]:/usr/java/jdk1.6.0_03

Target system JRE_TOP [/usr/java/jdk1.6.0_03]:/usr/java/jdk1.6.0_03

Do you want to preserve the port values from the source system on the target system (y/n) [y] ?

Started testing the availabilty of ports in port pool 21
UTL_FILE_DIR on database tier consists of the following directories.
1. /usr/tmp
2. /u00/app/tstdb/10.2.0/appsutil/outbound/TST_abcdb
3. /usr/tmp
Choose a value which will be set as APPLPTMP value on the target node [1]:3

This will configure the apps tire and startup all apps services on this node.

How to check the oracle application services (adbcap)

1) Apache
ps -ef grep Apache grep apptst

2) Forms
ps –ef grep f60srvm grep apptst

3) Concurrent Manager
ps -ef grep FNDLIBR grep apptst

4) Reports Server
ps -ef grep rwmts60 grep apptst

Post Installation Tasks

1) Update Profile Options
2) Update Printer Settings
3) Repoint the DB links
4) Update workflow configuration settings

Cloning Errors

1)Unable to find ‘kshell’ in path When Running
$ export KSH_VERSION=’@(#)PD KSH v5.2.14 99/07/13.2′
Follow Metalink:451994.1 Subject :Unable to Find ‘kshell’ in Path When Running

2) Node id does not exist for the current application server id.
Solution : Rerun Auto Config and generate DBC file in FND_TOP/secure

3)APP-FND-01564: ORACLE error 28000 in AFPCOACause: AFPCOA failed due to ORA-28000: the account is locked.The SQL statement being executed at the time of the error was: and was executed from the file .APP-FND-01564: ORACLE error 28000 in AFPCOA
Solution: From Database Node ( Apps account is locked)
SQL> select account_status from dba_users where username = ‘APPS’;
SQL> alter user apps account unlock;
User altered.
SQL> select account_status from dba_users where username = ‘APPS’;

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s