Wanna clone Oracle, just copy it

Hey. Hypothetical situation. You have freshly installed OS Linux, and you wanna install Oracle GRID+RDBMS there. But you have another server with has already installed Oracle. All you need it’s just copy Oracle homes, and do couple steps.

1.1. Make a tar archive for the RDBMS home

tar --exclude $DB_HOME/rdbms/audit --exclude $DB_HOME/network/admin --exclude $DB_HOME/dbs -cvf rdbms_home12c.tar $DB_HOME

1.2. Copy this archive to the new server
1.3. Untar the archive

tar -xvf rdbms_home12c.tar -C /

1.4. Run the clone.pl script

$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/clone/bin/clone.pl ORACLE_BASE=$ORACLE_BASE ORACLE_HOME=$ORACLE_HOME OSDBA_GROUP=dba OSOPER_GROUP=dba -defaultHomeName -O -ignoreSysPrereqs

1.5 Edit the inventory


vim $ORACLE_HOME/inventory/ContentsXML/oraclehomeproperties.xml

vim /opt/oracle/oraInventory/ContentsXML/inventory.xml

That’s it.

Now time for the GRID.

2.1. Make a tar acrhive for the GRID home

tar --exclude $GRID_HOME/rdbms/audit --exclude $GRID_HOME/network/admin --exclude $GRID_HOME/dbs -cvf grid_home12c.tar $GRID_HOME

2.2. Copy this archive to the new server
2.3. Untar the archive

tar -xvf grid_home12c.tar -C /

2.4. Run clone.pl script

$GRID_HOME/perl/bin/perl $GRID_HOME/clone/bin/clone.pl ORACLE_BASE=$ORACLE_BASE ORACLE_HOME=$GRID_HOME OSDBA_GROUP=dba OSOPER_GROUP=dba -defaultHomeName -O -ignoreSysPrereqs CRS=true

2.5. Some steps for configuration cluster

$ORA_INVENTORY_HOME/orainstRoot.sh
$GRID_HOME/root.sh

unset ORA_CRS_HOME
$GRID_HOME/crs/config/config.sh

Done.

PITFALLS

If you have already installed cluster, and has untar newer version above it. You may see this error

$GRID_HOME/bin/crsctl start crs

CRS-6706: Oracle Clusterware Release patch level ('2278979115') does not match Software patch level ('2888253033'). Oracle Clusterware cannot be started.
CRS-4000: Command Start failed, or completed with errors.

To solve this you need to upgrade OLR.

$GRID_HOME/bin/clscfg -localupgrade

Deconfig cluster.

perl $GRID_HOME/crs/install/rootcrs.pl -deconfig -force

And configure it again.

unset ORA_CRS_HOME

$GRID_HOME/crs/config/config.sh

Documentation

Advertisements

3 thoughts on “Wanna clone Oracle, just copy it

  1. Dima Rudik

    Should be the OS user id, OS dba,oinstall group id, versions of glibc, c++, perl the same on hosts or we can just copy the archives without check this?

    Reply
    1. mczimm Post author

      Hi Dima. Of course you should prepare your OS like for new Oracle installation, and you should be done all prepare steps.

      Reply

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s