Clone database home (clone.pl) deprecated in Oracle 19c

Back to blogging, at last. Well, this time it's about clone.pl.

Background about clone.pl

The easiest way to install a patched and up-to-date Oracle home is to physically copy it from a source server (that is already patched and up-to-date) and use clone.pl on the target server so that the binaries are linked to the target server's OS binaries (like gcc, libstdc++ etc.,), registered with the Oracle Inventory etc.

The alternative to clone.pl is to:

  1. Install Oracle binaries using GUI or command line
  2. Apply the latest patchset (PSU/CPU patches)

As you can see now, clone.pl is really useful in order to cut down time to build a database in a new server.

More about clone.pl here and here (12c), here (18c).

However, in Oracle 19c, Oracle has officially said - "Starting from oracle database 19c ,the clone.pl script is deprecated  and can be removed in a future release. Hence, Oracle recommends that you use the software-only installation option, available in the database installer, instead of clone.pl to clone your database.This document provides instructions on how to clone oracle home using gold image concept ." (2565006.1)

Here I list the simple steps to create a gold image and then cloning the target oracle home using that gold image. Hope it helps.

STEP 1: Create gold image zip file

 

Once the 19c software is installed and patched, use the below command to create the gold image zip file:

 

$ $ORACLE_HOME/runInstaller -silent -createGoldImage -destinationLocation <DESTINATION_DIRECTORY>

Launching Oracle Database Setup Wizard...

 

Successfully Setup Software.

Gold Image location: <DESTINATION_DIRECTORY>/db_home_2020-03-30_07-38-54AM.zip

 

STEP 2: Copy gold image to the target location


$ rsync -aS <DIRECTORY_OF_GOLD_IMAGE_ZIP>/db_home_2020-03-30_07-38-54AM.zip <TARGET_USER>@<TARGET_SERVER>:<TARGET_DIR>

 

STEP 3: Unzip the gold image under $ORACLE_HOME

 

Unzip the gold image under the ORACLE_HOME directory (/oracle/product/19.0.0):

 

$ cd $ORACLE_HOME

$ unzip -d $ORACLE_HOME <DESTINATION_DIRECTORY>/db_home_2020-03-30_07-38-54AM.zip

 

 

STEP 4: Execute runInstaller to clone the target ORACLE_HOME

 

Execute runInstaller command to clone the target ORACLE_HOME. Ensure to use the runInstaller binary directly under $ORACLE_HOME.

 

$ ${ORACLE_HOME}/runInstaller -silent -responseFile <PATH_TO_RESPONSE_FILE>

$ ${ORACLE_HOME}/runInstaller -silent -responseFile install.rsp

 

RESPONSE FILE CONTENTS:

 

$ cat install.rsp

oracle.install.responseFileVersion=<PATH>/rspfmt_dbinstall_response_schema_v19.0.0

oracle.install.option=INSTALL_DB_SWONLY

UNIX_GROUP_NAME=dba

INVENTORY_LOCATION=<ACTUAL_INVENTORY_LOCATION>

ORACLE_HOME=<ACTUAL_ORACLE_HOME_LOCATION>

ORACLE_BASE=<ACTUAL_ORACLE_BASE_LOCATION>

oracle.install.db.InstallEdition=EE

oracle.install.db.OSDBA_GROUP=dba

oracle.install.db.OSOPER_GROUP=dba

oracle.install.db.OSBACKUPDBA_GROUP=dba

oracle.install.db.OSDGDBA_GROUP=dba

oracle.install.db.OSKMDBA_GROUP=dba

oracle.install.db.OSRACDBA_GROUP=dba


References:







Comments

Popular posts from this blog

java.lang.ExceptionInInitializerError while trying to Access login page

Solution to "End Program - WMS Idle"

WGET shell Script for downloading patches