Friday, September 11, 2009

CLONING ..

Introduction:

Cloning creates an identical copy of an existing Oracle Applications system. There are various reasons for cloning an Oracle Applications system such as:

* Creating a copy of the production system for testing updates.

* Migrating an existing system to new hardware.

* Creating a stage area to reduce patching downtime

Apply the latest rapid clone patch

Apply the latest Rapid Clone patches
update the Oracle Applications file system with the latest Rapid Clone files by applying the following patches to all application tier server nodes: Please follow the Metalink Note:230672.1

a. 4709948

b. 5225940

c. 3453499

Prepare the Source System

Execute the following commands to prepare the source system for cloning.

Prepare the source system database tier for cloning

Log on to the source system as the ORACLE user and run the following commands: ( owner of the database user, for us it’s a applmgr)
cd /appsutil/scripts/
perl adpreclone.pl dbTier

Prepare the source system application tier for cloning
Log on to the source system as the APPLMGR user and run the following commands on each node that contains an APPL_TOP:
cd /admin/scripts/
perl adpreclone.pl appsTier

Here apps password will ask and please put the apps password here.

E) Shutdown application i.e shutdown all the services of the source instance,

Change to the directory to the cd $COMMON_TOP/admin/scripts/ ( /preprod/u01/appstire/testcomn/admin/scripts/test_ka01axsd2)

F) Log on to the source system as applmgr and shutdown database (normal shutdown)

SQL> shutdown

Copy the Source System to the Target System


Copy the application tier file system from the source Applications system to the target node by executing the following steps in the order listed.

Login as root and copy all five top i.e APPL_TOP, COMMON_TOP,ORA_TOP,DATA_TOP,DB_TOP( i.e testappl,

testcomn. testora,testadata,testdb dir from sourve m/c to destination m/c)

# Login to the source system’s

# cp -rf /preprod/u01/appstier/testappl . &

# cp -rf /prep/preprod/u01/appstier/testcomn . &

# cp -r /preprod/u01/appstier/testappl/testdb

H) Log on to the target system as root and change the owner of all the above dir

#chown -R devmgr:dba testappl and move testappl dir to devappl as below

# mv testappl devappl ( do all the dir)

I)

Configure the Target System
Execute the following commands to configure the target system. You will be prompted for the target system specific values (SID, Paths, Ports, etc)

Configure the target system database server
Log on to the target system as the ORACLE user and type the following commands to configure and start the database:
cd /appsutil/clone/bin
perl adcfgclone.pl dbTier

{e.g àLog on to the target system as applmgrr and run the following command

II) (DO FIRST at DB TIER) ,go to db tier's home i.e ORACLE_HOME/appsutil/clone/bin and run the adcfgclone.pl dbTier

$ cd /crp1/devmgr/DEV/testdb/9.2.0/appsutil/clone/bin

# ls -l

total 432

-rwx--x--x 1 devmgr dba 36519 Dec 03 11:15 adcfgclone.pl

-rwxr-xr-x 1 devmgr dba 3273 Dec 03 11:15 adchkutl.sh

-rwxr-xr-x 1 devmgr dba 93301 Dec 03 11:15 adclone.pl

-rwxr-xr-x 1 devmgr dba 29104 Dec 03 11:15 adclonectx.pl }

J) Run adcfgclone.pl command at the DB TIER and answer all the question as below

$ perl adcfgclone.pl dbTier

Enter the APPS password [APPS]: à enter the apps password here.

apps

First Creating a new context file for the cloned system.

The program is going to ask you for information about the new system:

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

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

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

Target System database name [test]:DEV

Target system RDBMS ORACLE_HOME directory [/preprod/u01/dbtire/testdb/9.2.0]:/crp1/devmgr/DEV/devdb/9.2.0

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

Number of DATA_TOP's on the target system [1]:

Target system DATA_TOP 1 [/preprod/u01/dbtire/testdata]:/crp1/devmgr/DEV/devdata

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

Clone Context uses the same port pool mechanism as the Rapid Install

Once you choose a port pool, Clone Context will validate the port availability.

Enter the port pool number [0-99]: 4

============= THESE ARE THE SCREEN OUTPUT ================

Checking the port pool 4

done: Port Pool 4 is free

Database port is 1525

Backing up /crp1/devmgr/DEV/devdb/9.2.0/appsutil/DEV_ka01axsd2.xml to

/crp1/devmgr/DEV/devdb/9.2.0/appsutil/DEV_ka01axsd2.xml.bak

Creating the new Database Context file from :

/preprod/u01/dbtire/testdb/9.2.0/appsutil/template/adxdbctx.tmp

The new database context file has been created :

/crp1/devmgr/DEV/devdb/9.2.0/appsutil/DEV_ka01axsd2.xml

Log file located at /crp1/devmgr/DEV/devdb/9.2.0/appsutil/clone/bin/CloneContext_12031133.log

Running Rapid Clone with command:

perl /crp1/devmgr/DEV/devdb/9.2.0/appsutil/clone/bin/adclone.pl

java=/crp1/devmgr/DEV/devdb/9.2.0/appsutil/clone/bin/../jre/jre mode=apply

stage=/crp1/devmgr/DEV/devdb/9.2.0/appsutil/clone/bin/.. component=dbTier method=CUSTOM

dbctxtg=/crp1/devmgr/DEV/devdb/9.2.0/appsutil/DEV_ka01axsd2.xml showProgress contextValidated=true

Beginning database tier Apply - Sun Dec 3 11:35:39 2006

Log file located at /crp1/devmgr/DEV/devdb/9.2.0/appsutil/log/DEV_ka01axsd2/ApplyDBTier_12031135.log

Beginning APPSDB_DEV registration to central inventory...

ORACLE_HOME NAME : APPSDB_DEV

ORACLE_HOME PATH : /crp1/devmgr/DEV/devdb/9.2.0

stackpointer=2ff20750

JVMXM004: JVM is performing abort shutdown sequence

JVMDG217: Dump Handler is Processing a Signal - Please Wait.

JVMDG303: JVM Requesting Java core file

JVMDG304: Java core file written to /crp1/devmgr/DEV/devdb/9.2.0/appsutil/clone/bin/javacore2273388.1165135409.txt

JVMDG215: Dump Handler has Processed Exception Signal 4.

ERROR: Registration Failed... Please check log file.

You can rerun this registration with the following script:

/crp1/devmgr/DEV/devdb/9.2.0/appsutil/out/DEV_ka01axsd2/regOUI_APPSDB_DEV.sh

============ DONE CLONING for DATA BASE=================

BELOW ARE THE ERROR ENCOUNTERED WHILE RUNNING adcfgclone.pl at both the node ( DB AND APPS)

$ perl adcfgclone.pl appsTier

Enter the APPS password [APPS]:Apps

ERROR : Unable to set CLASSPATH

/crp1/devmgr/DEV/testcomn/clone/bin/../jlib/classes111.zip: is missing

First Creating a new context file for the cloned system.

The program is going to ask you for information about the new system:

sh: 1945818 Illegal instruction(coredump)

ERROR: context creation not completed successfully.

Please check /tmp/adcfgclone.err file for errors

Check the metalink note:393723.1 and implement the folowing..

As per the above notes, do the below activity

1.cd /appsutil/clone/jre

2.move lib lib.old

3.move bin bin.old

4.ln -s jre/bin bin

5.ln -s jre/lib lib

6.Run perl adcfgclone.pl appsTier

After that there will be error like .. Beginning APPSDB_TEST registration to central inventory...

ORACLE_HOME NAME : APPSDB_TEST

ORACLE_HOME PATH : /eappsdev01/TEST/testdb/9.2.0

stackpointer=2ff207a0

JVMXM004: JVM is performing abort shutdown sequence

JVMDG217: Dump Handler is Processing a Signal - Please Wait.

JVMDG303: JVM Requesting Java core file

JVMDG304: Java core file written to /eappsdev01/TEST/testdb/9.2.0/appsutil/clone/bin/javacore2797694.1167222185.txt

JVMDG215: Dump Handler has Processed Exception Signal 4.

ERROR: Registration Failed... Please check log file.

So nothing to panic….the above error is normal.

=============== FROM APPS TIER =======================

Configure the target system application tier server nodes
Log on to the target system as the APPLMGR user and type the following commands:
cd /clone/bin
perl adcfgclone.pl appsTier

e.g Go to the application tier common top dir and run the following command

$cd $COMMON_TOP/admin/scripts/CONTEXT_NAME

$ ls -l

total 360

-rwxr-xr-x 1 devmgr dba 7396 Dec 03 13:53 adaddnode.pl

-rwxr-xr-x 1 devmgr dba 36519 Dec 03 13:53 adcfgclone.pl

-rwxr-xr-x 1 devmgr dba 3273 Dec 03 13:53 adchkutl.sh

-rwxr-xr-x 1 devmgr dba 93301 Dec 03 13:53 adclone.pl

-rwxr-xr-x 1 devmgr dba 29104 Dec 03 13:53 adclonectx.pl

$ stty erase

$

$

$ perl adcfgclone.pl appsTier

Enter the APPS password [APPS]: apps

First Creating a new context file for the cloned system.

The program is going to ask you for information about the new system:

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

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

Target system database SID [test]:DEV

Target system database server node [ka01axsd2]:

Target system database domain name [ms-retail.com]:

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

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

Target system APPL_TOP mount point [/preprod/u01/appstire/testappl]:/crp1/devmgr/DEV/devappl

Target system COMMON_TOP directory [/preprod/u01/appstire/testcomn]:/crp1/devmgr/DEV/devcomn

Target system 8.0.6 ORACLE_HOME directory [/preprod/u01/appstire/testora/8.0.6]:/crp1/devmgr/DEV/devora/8.0.6

Target system iAS ORACLE_HOME directory [/preprod/u01/appstire/testora/iAS]:/crp1/devmgr/DEV/devora/iAS

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

Location of the JDK on the target system [/usr/java14]:

Clone Context uses the same port pool mechanism as the Rapid Install

Once you choose a port pool, Clone Context will validate the port availability.

Enter the port pool number [0-99]:

4

Checking the port pool 4

done: Port Pool 4 is free

Web Listener port is 8004

Complete port information available at /crp1/devmgr/DEV/devappl/admin/out/DEV_ka01axsd2/portpool.lst

Database Connection on Port 1525: Successful

UTL_FILE_DIR on database tier consists of the following directories.

1. /usr/tmp

2. /usr/tmp

3. /crp1/devmgr/DEV/devdb/9.2.0/appsutil/outbound/DEV_ka01axsd2

4. /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 the apps services.

Check the instance and fire a request.

1 comment:

  1. looks nice. Being a system administrator, I periodically use various data recovery services from other software developers. From my point of view, the import .sql files into ms sql server utility is very easy to use, it features intelligent data recovery algorithms that work under all supported software and hardware configurations.

    ReplyDelete