image

Oracle 19c – Clone an Existing RDBMS using Gold Image?

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.

Following method can be used to have same binaries of oracle home (where patches are already applied) from source to target machine as gold image.

Assumption: The following is already done:

  1. Installation of 19c Home in a location (eg : /u01/app/oracle/product/19c/db_1)
  2. Installation of all the required patches

Cloning Steps

  • Create New Gold Image:

$ORACLE_HOME/runInstaller -createGoldImage -destinationLocation /home/oracle

Note: This Utility requires Graphical Display Setup – X Display. Otherwise, you may get the following:

ERROR: Unable to verify the graphical display setup. This application requires X display. Make sure that xdpyinfo exist under PATH variable.

Oracle Gold Image is in Progress

Oracle Database Gold Image is Ready, Now

Copy the zip file to the Target

  • scp db_home_2022-08-14_02-14-36PM.zip 1.1.1.1:/oradata/stage

Unzip & Install the newly created Gold Image zip in Target oracle home

  • Create the required Directory
    • mkdir -p /applic/oracle/product/19c/dbhome_1
  • Unzip the Gold Image File
    • cd /applic/oracle/product/19c/dbhome_1
    • unzip -q  db_home_2022-08-14_02-14-36PM.zip -d /applic/oracle/product/19c/dbhome_1
  • Set the Target Environment
    • export ORACLE_HOME=/applic/oracle/product/19c/dbhome_1
    • export ORA_INVENTORY=/applic/oracle/oraInventory
    • export ORACLE_BASE=/applic/oracle

Note: Make sure that all Oracle Installation OS Prerequisites are done, prior to Gold Image Install. Also check OS Supported Version, otherwise, you may get the following:

WARNING:  [Aug 14, 2022 6:23:15 PM] [WARNING] [INS-08101] Unexpected error while executing the action at state: ‘supportedOSCheck’

Workaround:        $ export CV_ASSUME_DISTID=OEL7.8

You may use the “oracle-database-preinstall-19c” package to perform all your prerequisite setup, by issuing the following command.

# dnf install -y oracle-database-preinstall-19c

If you are using RHEL8 or CentOS8, you can pick up the RPM from the OL8 repository and install it. It will pull the dependencies from your normal repositories.

curl -o oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/getPackage/oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm
yum -y localinstall oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm

Gold Image Installation

Once System is ready and everything is fine, you may start Gold Image Install, for instance:

$ORACLE_HOME/runInstaller -ignorePrereq -waitforcompletion -silent \ ORACLE_BASE=${ORACLE_BASE} -responseFile ${ORACLE_HOME}/install/response/db_install.rsp oracle.install.option=INSTALL_DB_SWONLY UNIX_GROUP_NAME=dba INVENTORY_LOCATION=${ORA_INVENTORY} oracle.install.db.OSDGDBA_GROUP=dba ORACLE_HOME=${ORACLE_HOME} oracle.install.db.OSKMDBA_GROUP=dba 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

Logs are located at: /applic/oracle/oraInventory/logs/InstallActions2022-08-14_06-23-13PM


For Your Further Reading:

Leave a Reply

Your email address will not be published. Required fields are marked *

2 × 5 =