Home > Oracle > cloning an oracle 11g R2 home

cloning an oracle 11g R2 home

September 27, 2011 Leave a comment Go to comments

Check the oracle home to clone

[oracle@uk-yo-dbmon01 OPatch]$./opatch lsinv

Check the Oracle home size

 [oracle@uk-yo-dbmon01 db_1]$ cd /oracle/app/product/11.2.0/db_1
 [oracle@uk-yo-dbmon01 db_1]$ du -h . | tail -1


Create the directory structre on the remote server and change the ownership to oracle

[oracle@uk-yo-dbmon02 db_1]$mkdir -p /u01/app/oracle/product/

[oracle@uk-yo-dbmon02 db_1]$chown -R oracle:oinstall /oracle

On the source server zip the contents of the oracle home and transfer to the remote server

[oracle@uk-yo-dbmon01 db_1]$cd /oracle/app/product/11.2.0/db_1

[oracle@uk-yo-dbmon01 db_1]$tar cvf - . | ( ssh  uk-yo-dbmon01 "cd /oracle/app/product/11.2.0/db_1 ; tar xvf -" )

Check the total size on the remote server of the Oracle Home

 [oracle@uk-yo-dbmon02 db_1]$ cd /oracle/app/product/11.2.0/db_1

 [oracle@uk-yo-dbmon02 db_1]$ du -h . | tail -1


Start the cloning process using OUI

if the remote server has been cloned from the source server you need to detach the inventory

[oracle@uk-yo-dbmon02 db_1] $ cd /oracle/app/product/11.2.0/dbhome_1/oui/bin
[oracle@uk-yo-dbmon02 db_1] $./runInstaller -detachHome ORACLE_HOME="/oracle/app/product/11.2.0/db_1"

once the invetory is detached you can run the cloning process

[oracle@uk-yo-dbmon02 db_1]$./runInstaller -clone -silent -ignorePreReq ORACLE_HOME="/oracle/app/product/11.2.0/db_1" ORACLE_HOME_NAME="OraDb11g_home1" ORACLE_BASE="/oracle/app" OSDBA_GROUP=dba OSOPER_GROUP=dba

To find your Oracle_home_name , locate your  location of  your oraInventory from /etc/oraInst.loc and then view the contents of the /u01/app/oraInventory/ContentsXML/inventory.xml  file

execute as root the root.sh script

[oracle@uk-yo-dbmon02 db_1]$/oracle/app/product/11.2.0/dbhome_1/root.sh

Check the Cloned Home

[oracle@uk-yo-dbmon02 OPatch]$]$ opatch lsinv

Post Clone tasks

Update $ORACLE_HOME/network/admin and $ORACLE_HOME/dbs so that they match the source server

useful document from oracle

Cloning An Existing Oracle11g Release 2 (11.2.0.x) RDBMS Installation Using OUI [ID 1221705.1]
Connect as SYSDBA on 11.2 Cloned Home Gives “ORA-1031: Insufficient Privileges” Error [ID 1061788.1]
Cloning A Database Home And Changing The User/Group That Owns It [ID 558478.1]

Categories: Oracle
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

%d bloggers like this: