1

Oracle Home 19c Cloning

Oracle Home 19c Cloning

 

1. Check the groups assigned to the Oracle Home owner

[oracle@test ~]$ . db.env
[oracle@test ~]$ cd $ORACLE_HOME/rdbms/lib/
[oracle@test lib]$ cat config.c |grep define
/* SS_DBA_GRP defines the UNIX group ID for sqldba adminstrative access. */
#define SS_DBA_GRP “oinstall”
#define SS_OPER_GRP “oinstall”
#define SS_ASM_GRP “”
#define SS_BKP_GRP “oinstall”
#define SS_DGD_GRP “oinstall”
#define SS_KMT_GRP “oinstall”
#define SS_RAC_GRP “oinstall”

 

2. Create a directory/location to store the Gold Image

[oracle@test lib]$ cd /orabackup/
[oracle@test orabackup]$ mkdir goldimage19cbinaries
[oracle@test orabackup]$ cd goldimage19cbinaries/
[oracle@test goldimage19cbinaries]$ pwd
/orabackup/goldimage19cbinaries
[oracle@test goldimage19cbinaries]$ $ORACLE_HOME/runInstaller -silent -createGoldImage -destinationLocation /orabackup/goldimage19cbinaries
Launching Oracle Database Setup Wizard…

Successfully Setup Software.
Gold Image location: /orabackup/goldimage19cbinaries/db_home_2025-11-06_08-38-39AM.zip

 

3. Copy the File / Image to the Target Server

 

4. Create the User

 

[root@test-oracle ~]# useradd -u 54321 -g oinstall -G dba,oper,backupdba,racdba,dgdba,kmdba oracle
[root@test-oracle ~]# id oracle
uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54330(racdba)
[root@test-oracle ~]# clear
[root@test-oracle ~]# su – oracle
[oracle@test-oracle ~]$ exit
logout
[root@test-oracle ~]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: The password contains the user name in some form
Retype new password:
passwd: all authentication tokens updated successfully.
======================

 

5. Perform the pre-reqs on the Target Server

5a. Disable or Permit the SELINUX

 

[root@test-oracle oracle]# getenforce
Enforcing
[root@test-oracle oracle]# setenforce 0
[root@test-oracle oracle]# getenforce
Permissive

 

5b. Check the Firewall and disable it if its running or create a rule

[root@test-oracle oracle]# systemctl status firewalld
● firewalld.service – firewalld – dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enable>
Active: active (running) since Mon 2025-11-03 18:25:34 UTC; 2 days ago
Docs: man:firewalld(1)
Main PID: 924 (firewalld)
Tasks: 2 (limit: 24659)
Memory: 47.7M
CGroup: /system.slice/firewalld.service
└─924 /usr/libexec/platform-python -s /usr/sbin/firewalld –nofork –nopid

Nov 03 18:25:34 test-oracle.novalocal systemd[1]: Starting firewalld – dynamic firewall daem>
Nov 03 18:25:34 test-oracle.novalocal systemd[1]: Started firewalld – dynamic firewall daemo>
Nov 03 18:25:35 test-oracle.novalocal firewalld[924]: WARNING: AllowZoneDrifting is enabled.>
[root@test-oracle oracle]# systemctl stop firewalld
[root@test-oracle oracle]# systemctl disable firewalld
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

 

5c. Install the Oracle 19c Preinstall RPM from Oracle Linux Repository

yum install oracle-database-preinstall-19c

 

6. Cloning the 19c Oracle Home

[root@test-oracle oracle]# su – oracle
[oracle@test-oracle ~]$ mkdir -p /u01/app/oracle/product/19.0.0.0/dbhome_2
[oracle@test-oracle ~]$ unset ORACLE_HOME ORACLE_SID ORACLE_RSID ORACLE_UNQNAME ORACLE_BASE
[oracle@test-oracle ~]$ hostname
test-oracle.novalocal
[oracle@test-oracle ~]$ export ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_2
[oracle@test-oracle ~]$ export ORACLE_HOSTNAME=test-oracle.novalocal
[oracle@test-oracle ~]$ export ORA_INVENTORY=/u01/app/oraInventory
[oracle@test-oracle ~]$ export ORACLE_BASE=/u01/app/oracle
[oracle@test-oracle ~]$ vi testdb.env
[oracle@test-oracle ~]$ env | grep ORACLE
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_2
ORACLE_HOSTNAME=test-oracle.novalocal

 

6a. Unzip the golden image to the ORACLE_HOME directory

[oracle@test-oracle ~]$ unzip db_home_2025-11-06_08-38-39AM.zip -d /u01/app/oracle/product/19.0.0.0/dbhome_2/

 

6b. edit the response file put the correct values for ORacle Home if changed

[oracle@test-oracle dbhome_2]$ cd install/response/
[oracle@test-oracle response]$ vi db_install.rsp
[oracle@test-oracle response]$ cd ../..
[oracle@test-oracle dbhome_2]$ ./runInstaller -ignorePrereq -waitforcompletion -silent -responseFile ${ORACLE_HOME}/install/response/db_install.rsp oracle.install.option=INSTALL_DB_SWONLY ORACLE_HOSTNAME=${ORACLE_HOSTNAME} UNIX_GROUP_NAME=oinstall INVENTORY_LOCATION=${ORA_INVENTORY} SELECTED_LANGUAGES=en ORACLE_HOME=${ORACLE_HOME} ORACLE_BASE=${ORACLE_BASE} oracle.install.db.InstallEdition=EE oracle.install.db.OSDBA_GROUP=oinstall oracle.install.db.OSOPER_GROUP=oinstall oracle.install.db.OSBACKUPDBA_GROUP=oinstall oracle.install.db.OSDGDBA_GROUP=oinstall oracle.install.db.OSKMDBA_GROUP=oinstall oracle.install.db.OSRACDBA_GROUP=oinstall oracle.install.db.config.starterdb.type=GENERAL_PURPOSE oracle.install.db.ConfigureAsContainerDB=false SECURITY_UPDATES_VIA_MYORACLESUPPORT=false DECLINE_SECURITY_UPDATES=true
Launching Oracle Database Setup Wizard…

[WARNING] [INS-32047] The location (/u01/app/oraInventory) specified for the central inventory is not empty.
ACTION: It is recommended to provide an empty location for the inventory.
The response file for this session can be found at:
/u01/app/oracle/product/19.0.0.0/dbhome_2/install/response/db_2025-11-06_05-23-29AM.rsp

You can find the log of this install session at:
/tmp/InstallActions2025-11-06_05-23-29AM/installActions2025-11-06_05-23-29AM.log

As a root user, execute the following script(s):
1. /u01/app/oraInventory/orainstRoot.sh
2. /u01/app/oracle/product/19.0.0.0/dbhome_2/root.sh

Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes:
[test-oracle]
Execute /u01/app/oracle/product/19.0.0.0/dbhome_2/root.sh on the following nodes:
[test-oracle]

Successfully Setup Software.
Moved the install session logs to:
/u01/app/oraInventory/logs/InstallActions2025-11-06_05-23-29AM
[oracle@test-oracle dbhome_2]$ exit
logout

 

6c. Run the ROOT scripts using “root” user

[root@test-oracle oracle]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@test-oracle oracle]# /u01/app/oracle/product/19.0.0.0/dbhome_2/root.sh
Check /u01/app/oracle/product/19.0.0.0/dbhome_2/install/root_test-oracle.novalocal_2025-11-06_05-25-00-131963356.log for the output of root script

 

7. Create the environment file and restore the Database using RMAN

[oracle@test-oracle ~]$ cat testdb.env
export ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_2
export ORACLE_HOSTNAME=test-oracle.novalocal
export ORA_INVENTORY=/u01/app/oraInventory
export ORACLE_BASE=/u01/app/oracle
export ORACLE_SID=TESTDB
export TMP=/tmp
export TMPDIR=$TMP
export PATH=/usr/sbin:/usr/local/bin:$PATH
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/perl/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

 

 

    About Abdul Khalique Siddique

    In addition to my proficiency in Oracle Database, I have also specialized in Oracle E-Business Suite. I have hands-on experience in implementing, configuring, and maintaining EBS applications, enabling organizations to streamline their business processes and achieve operational efficiency. Also I have hands-on experience in Oracle Cloud Infrastructure (OCI). I have worked with OCI services such as compute, storage, networking, and database offerings, leveraging the power of the cloud to deliver scalable and cost-effective solutions. My knowledge of OCI architecture and deployment models allows me to design and implement robust and secure cloud environments for various business requirements. Furthermore, I have specialized in disaster recovery solutions for Oracle technologies. I have designed and implemented comprehensive disaster recovery strategies, including backup and recovery procedures, standby databases, and high availability configurations. My expertise in data replication, failover mechanisms, and business continuity planning ensures that organizations can quickly recover from disruptions and maintain uninterrupted operations.

    Check Also

    1

    Enable Archive Log Mode in Oracle 19c RAC

    How to Enable Archive Log Mode in Oracle 19c RAC Database: Step-by-Step Guide   In …

    Leave a Reply