Cloning an Oracle Home 19c - denis-kol4ev/OraDBA GitHub Wiki

Purpose:

Clone ORACLE_HOME with all installed patches from source to target server.

Based on:

https://docs.oracle.com/en/database/oracle/oracle-database/19/ladbi/Chunk7030974.html#GUID-30C45B5F-58A3-4D4C-8475-40093C51650B

19.x:Clone.pl script is deprecated and how to clone using gold-image (Doc ID 2565006.1)

Tested on:

Oracle 19.3 on OEL 7.6

Image-Based Oracle Database Installation :

a. Install fresh 19c home

b. Apply patches

c. Create gold image

d. Transfer image to destination host

e. Unzip image

f. Install

1. Let's skip first two basic steps, and begin from the third

$ORACLE_HOME/runInstaller -waitforcompletion -silent -createGoldImage -destinationLocation <location>
export ORACLE_HOME=/opt/oracle/rdbms/19.3
cd $ORACLE_HOME
./runInstaller -waitforcompletion -silent -createGoldImage -destinationLocation /opt/oracle/distr
Launching Oracle Database Setup Wizard...
Successfully Setup Software.
Gold Image location: /opt/oracle/distr/db_home_2021-04-26_08-08-27PM.zip

2. Copy image to the destination host

scp /opt/oracle/distr/db_home_2021-04-26_08-08-27PM.zip oracle@devil:/opt/oracle/distr/db_home_19.3_GoldImage.zip

3. Unzip image to the new ORACLE_HOME directory

unzip /opt/oracle/distr/19.3_GoldImage.zip -d /opt/oracle/rdbms/19.3

4. Run software installer

export ORACLE_HOME=/opt/oracle/rdbms/19.3
cd $ORACLE_HOME
./runInstaller -waitforcompletion -silent \
    oracle.install.option=INSTALL_DB_SWONLY \
    UNIX_GROUP_NAME=oinstall \
    INVENTORY_LOCATION=/opt/oraInventory \
    ORACLE_HOME=/opt/oracle/rdbms/19.3 \
    ORACLE_BASE=/opt/oracle \
    oracle.install.db.InstallEdition=EE \
    oracle.install.db.OSDBA_GROUP=dba \
    oracle.install.db.OSBACKUPDBA_GROUP=backupdba \
    oracle.install.db.OSDGDBA_GROUP=dgdba \
    oracle.install.db.OSKMDBA_GROUP=kmdba \
    oracle.install.db.OSRACDBA_GROUP=racdba \
    SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \
    DECLINE_SECURITY_UPDATES=true

5. As a root user, execute root.sh script

# /opt/oracle/rdbms/19.3/root.sh
⚠️ **GitHub.com Fallback** ⚠️