Creating a Gold Image of Oracle Database Home and using it for Cloning Oracle Home



What is a Gold Image?

A gold image is a master copy of an Oracle Database installation that includes all necessary configurations, patches, and updates. It can be replicated and deployed across various servers, ensuring identical installations. This method is especially beneficial in large enterprises where consistent configurations across multiple environments are crucial.

Benefits of Using a Gold Image

Consistency: Ensures uniformity across all database installations.
Efficiency: Reduces the time required for installation and configuration.
Error Reduction: Minimizes human errors during the installation process.
Compliance: Ensures all installations comply with organizational standards and policies.
Simplified Maintenance: Easier to manage and maintain patches and updates.

Applicable in 19c and onwards.

Cloning an Oracle Database Home Using an Gold Image File


Create an image file from the source Oracle home using the -createGoldImage option, unzip the image file, and perform a software-only Oracle Database installation to register the Oracle Database product.

Steps:

1) Log in as the Oracle installation owner user account (oracle).
2) Go to the source Oracle home directory.


cd /u01/install/APPS/19.0.0

3) Use the runInstaller command with the -createGoldImage option to create a gold image from the source Oracle home.

./runInstaller -createGoldImage  -destinationLocation /u01/install/APPS/19.0.0/19c_image -silent

destinationLocation- It has to be full path where we want to create the image file.May be any temporary location. While creating a directory with name 19c_image will be created and image zip will be kept inside.

Ouput:


[oracle@ebs12213-fresh 19.0.0]$ ./runInstaller -createGoldImage  -destinationLocation /u01/install/APPS/19.0.0/19c_image -silent
Launching Oracle Database Setup Wizard...

Successfully Setup Software.
Gold Image location: /u01/install/APPS/19.0.0/19c_image/db_home_2024-05-21_03-50-04PM.zip

[oracle@ebs12213-fresh 19.0.0]$ ls -ld 19c_image
drwxr-xr-x. 2 oracle oinstall 47 May 21 16:02 19c_image
[oracle@ebs12213-fresh 19.0.0]$ ls -ltr 19c_image
total 8343944
-rw-r--r--. 1 oracle oinstall 8544197673 May 21 16:02 db_home_2024-05-21_03-50-04PM.zip

4) On Target Server create a Oracle home directory and copy and extract the image file that you have created in to this destination Oracle home directory. We need to use the database user.

oracle@fresh-ebs:~$ scp u01/install/APPS/19.0.0/19c_image/db_home_2024-05-21_03-50-04PM.zip oracle@fundb:/u01/app/oracle/product/19.0.0/dbhome_1/

$ mkdir -p /u01/app/oracle/product/19.0.0/dbhome_1
$ cd /u01/app/oracle/product/19.0.0/dbhome_1
$ unzip -q u01/install/APPS/19.0.0/19c_image/db_home_2024-05-21_03-50-04PM.zip

Note:Oracle home or Oracle base cannot be symlinks, nor can any of their parent directories, all the way to up to the root directory.

5) From target Server Oracle home directory, run the runInstaller command to start the Oracle Database Setup Wizard and register Oracle Database.

export ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1
cd /u01/app/oracle/product/19.0.0/dbhome_1
$ ./runInstaller

In the Select Configuration Option screen, select Set Up Software Only to perform a software-only Oracle Database installation.
Select your installation type and respond to the configuration prompts as needed.
Provide information to automate root scripts, or run scripts as root when prompted by the setup wizard.
You can also perform a silent installation by creating a response file.

6) Oracle Database is now successfully registered. Run Oracle Database Configuration Assistant (Oracle DBCA) to create a database and configure the listener for the newly-cloned Oracle home.


$/u01/app/oracle/product/19.0.0/dbhome_1
$ ./dbca




Please do like and subscribe to my youtube channel: https://www.youtube.com/@foalabs If you like this post please follow,share and comment