August 31, 2012

Copy Oracle Client home to a new server

Clone Oracle Client installation to a new server and register it in the oraInventory

First steps

Make a copy of the entire Oracle Client ORACLE_HOME and move it to the new server, where you want the client without having to install it. 

This can be done by creating a tar ball of the /opt/oracle/11.2.0.3 directory and copying it across the network.

scp /opt/oracle/client_11.2.0.3.tar oracle@server2:/opt/oracle


Prepare the files on the new server

With the files copied to the new server, extract the files to /opt/oracle/11.2.0.3 (or wherever your ORACLE_HOME is) and set ORACLE_HOME and ORACLE_BASE environment variables.

cd /opt/oracle
tar xf /opt/oracle/client_11.2.0.3.tar
export ORACLE_HOME=/opt/oracle/11.2.0.3
export ORACLE_BASE=/opt/oracle

"Install" the Oracle Client on the new server

All that's left to do is run the command below, and the Oracle Client will be linked and registered in the Oracle inventory, ready to be used.

NOTE: The command below is one command, run everything together on a single line.

$ORACLE_HOME/oui/bin/runInstaller -silent -clone ORACLE_BASE="/opt/oracle/" ORACLE_HOME="/opt/oracle/11.2.0.3" ORACLE_HOME_NAME="Oracle11203_client" -invPtrLoc="/etc"


Breakdown of the command

Let's break the command down into pieces. First, you call runInstaller using: $ORACLE_HOME/oui/bin/runInstaller

-silent specifies that it's a silent install, you won't see the graphical Oracle Universal Installer (OUI) interface
-clone is the command to clone the Oracle Home. It's not an installation, we've simply copied a previous installation from another server
ORACLE_BASE points to where you have your ORACLE_BASE, for example /opt/oracle
ORACLE_HOME points to your ORACLE_HOME, where you have the software files
ORACLE_HOME_NAME is what the Oracle Client home installation will be called in the Oracle inventory
-invPtrLoc specifies where the oraInst.loc file is located. This file points out where on disk the Oracle inventory is located.

No comments:

Post a Comment