Clonig Grid Home 19c - denis-kol4ev/OraDBA GitHub Wiki

Purpose:

Clone Grid Home 19c with all installed patches from source to target server.

Based on:

https://docs.oracle.com/en/database/oracle/oracle-database/19/cwadd/cloning-oracle-clusterware.html#GUID-2D254450-A272-4049-9E1D-4A93E003B97B

Tested on:

Grid 19.10 on OEL 7.9

Image-Based Grid Installation :

a. Install fresh Grid 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

If we want to clone Grid home from working server, we need stop all services, as mentioned in documentation:

Step 2: Shut Down Running Software

Before copying the source Oracle Grid Infrastructure home, shut down all of the services, databases, listeners, applications, Oracle Clusterware, and Oracle ASM instances that run on the node. Oracle recommends that you use the Server Control (SRVCTL) utility to first shut down the databases, and then the Oracle Clusterware Control (CRSCTL) utility to shut down the rest of the components.

$ . oraenv <<< +ASM 
$ crsctl stat res -t
$ srvctl stop database -d orcl_devil19
$ crsctl stop has
$ echo $ORACLE_HOME
/opt/oracle/grid/19.3
$ cd $ORACLE_HOME
$ ./gridSetup.sh -waitforcompletion -silent -createGoldImage -destinationLocation /opt/oracle/distr

Launching Oracle Grid Infrastructure Setup Wizard...

Successfully Setup Software.
Gold Image location: /opt/oracle/distr/grid_home_2021-06-11_01-07-59AM.zip
$ crsctl start has
$ srvctl start database -d orcl_devil19
$ crsctl stat res -t

2. Copy image to the destination host

scp /opt/oracle/distr/grid_home_2021-06-11_01-07-59AM.zip [email protected]:/opt/oracle/distr/GridGoldImage19.10.zip

3. Unzip image to the new ORACLE_HOME directory

$ mkdir /opt/oracle/grid19.3
$ unzip /opt/oracle/distr/GridGoldImage19.10.zip -d /opt/oracle/grid19.3

4. Install oracle-database-preinstall-19c package

# yum install oracle-database-preinstall-19c

5. Execute the prerequisite checks

/opt/oracle/grid19.3/gridSetup.sh -silent -executePrereqs

check "List of failed Tasks" log file section

6. Prepare response file (software only install)

$ vi /home/oracle/gridsetup.rsp

ORACLE_BASE=/opt/oracle
INVENTORY_LOCATION=/opt/oraInventory
oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v19.0.0
oracle.install.option=HA_SWONLY 
oracle.install.asm.OSDBA=dba 
oracle.install.asm.OSASM=asmadmin
oracle.install.asm.OSOPER=oper

7. Run configuration wizard in silent mode using response file

$ /opt/oracle/grid19.3/gridSetup.sh -silent -ignorePrereqFailure -responseFile /home/oracle/gridsetup.rsp

8. Run post installation tasks as a root user

# /opt/oraInventory/orainstRoot.sh
# /opt/oracle/grid19.3/root.sh