>>CLONING A 12CR2 STANDALON GRID INFRASTRUCTURE SOURCE To TARGET (NEW SEVRER )<<
Here we are using the Oracle perl utility for Grid Cloning
Oracle provided perl utility is seemingly one of the most useful features that oracle provide for the Cloning .
Let Start :-
Step -1
First up we tar up an existing GI install that we know works ok (it doesn't need to be stopped) .
tar -cvpf /Dump/grid_HOME.tar /Grid
We then copy that tar file to the destination server using whatever tool you see fit scp/sftp etc.
Step -2
We then untar in my case (you could have used zip earlier) that file into the destination directory - iused the same path as the original server but as with the database software this shouldn't matter
tar -xvf grid_HOME.tar
Step -3 This below command run grid owner -
Parameters Description :-
ORACLE_BASE=ORACLE_BASE \\The complete path to the Oracle base to be cloned. If you specify an invalid path, then the script exits. This parameter is required.
ORACLE_HOME=GRID_HOME \\The complete path to the Grid Infrastructure home for cloning. If you specify an invalid path, then the script exits. This parameter is required.
ORACLE_HOME_NAME=Oracle_home_name (or) -defaultHomeName The Oracle home name of the home to be cloned. Optionally, you can specify the -defaultHomeName flag. This parameter is not required.
cd /Grid/Ora12c/Sw/clone/bin/clone.pl
[oracle@farukh01 bin]$ ./clone.pl ORACLE_HOME=/u01/Grid/Ora12c/Sw ORACLE_HOME_NAME=GI12c ORACLE_BASE=/u01/Grid/Ora12c/
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 500 MB. Actual 5065 MB Passed
Checking swap space: must be greater than 500 MB. Actual 65227 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2021-12-25_10-38-27AM. Please wait ...[WARNING] [INS-32029] The Installer has detected that the Oracle Base location is not empty.
ACTION: Oracle recommends that the Oracle Base location is empty.
You can find the log of this install session at:
/u01/app/oraInventory/logs/cloneActions2021-12-25_10-38-27AM.log
.................................................. 5% Done.
.................................................. 10% Done.
.................................................. 15% Done.
.................................................. 20% Done.
.................................................. 25% Done.
.................................................. 30% Done.
.................................................. 35% Done.
.................................................. 40% Done.
.................................................. 45% Done.
.................................................. 50% Done.
.................................................. 55% Done.
.................................................. 60% Done.
.................................................. 65% Done.
.................................................. 70% Done.
.................................................. 75% Done.
.................................................. 80% Done.
.................................................. 85% Done.
..........
Copy files in progress.
Copy files successful.
Link binaries in progress.
Link binaries successful.
Setup files in progress.
Setup files successful.
Setup Inventory in progress.
Setup Inventory successful.
Finish Setup successful.
The cloning of GI12c was successful.
Please check '/u01/app/oraInventory/logs/cloneActions2021-12-25_10-38-27AM.log' for more details.
Setup Oracle Base in progress.
Setup Oracle Base successful.
.................................................. 95% Done.
As a root user, execute the following script(s):
1. /u01/app/oraInventory/orainstRoot.sh
2. /u01/Grid/Ora12c/Sw/root.sh
.................................................. 100% Done.
Step -4
[root@farukh01 oracle]#
[root@farukh01 oracle]#
[root@farukh01 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@farukh01 oracle]# /u01/Grid/Ora12c/Sw/root.sh
Check /u01/Grid/Ora12c/Sw/install/root_farukh01_2021-12-25_10-54-02-611889450.log for the output of root script
[root@farukh01 oracle]# more /u01/Grid/Ora12c/Sw/install/root_farukh01_2021-12-25_10-54-02-611889450.log
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/Grid/Ora12c/Sw
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
To configure Grid Infrastructure for a Cluster or Grid Infrastructure for a Stand-Alone Server execute the following command as oracle user:
/u01/Grid/Ora12c/Sw/gridSetup.sh
This command launches the Grid Infrastructure Setup Wizard. The wizard also supports silent operation, and the parameters can be passed through the response file that i
s available in the installation media.
[root@farukh01 oracle]#
Step - 5
[root@farukh01 install]# /u01/Grid/Ora12c/Sw/perl/bin/perl -I /u01/Grid/Ora12c/Sw/perl/lib -I /u01/Grid/Ora12c/Sw/crs/install /u01/Grid/Ora12c/Sw/crs/install/roothas.pl
Using configuration parameter file: /u01/Grid/Ora12c/Sw/crs/install/crsconfig_params
The log of current session can be found at:
/u01/Grid/Ora12c/crsdata/farukh01/crsconfig/roothas_2021-12-25_12-45-42AM.log
LOCAL ADD MODE
Creating OCR keys for user 'oracle', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node farukh01 successfully pinned.
2021/12/25 12:45:51 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'farukh01'
CRS-2673: Attempting to stop 'ora.evmd' on 'farukh01'
CRS-2677: Stop of 'ora.evmd' on 'farukh01' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'farukh01' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
farukh01 2021/12/25 12:49:47 /u01/Grid/Ora12c/Sw/cdata/farukh01/backup_20211225_124947.olr 3518739597
2021/12/25 12:49:47 CLSRSC-327: Successfully configured Oracle Restart for a standalone server
[root@farukh01 install]#
Step - 6 Run this below command Grid owner
[oracle@farukh01 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=/u01/Grid/Ora12c/Sw -defaultHomeName CLUSTER_NODES= CRS=TRUE
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 65227 MB Passed
The inventory pointer is located at /etc/oraInst.loc
'UpdateNodeList' was successful.
[oracle@farukh01 bin]$ pwd
/u01/Grid/Ora12c/Sw/oui/bin
[oracle@farukh01 bin]$
Step - 7 with the help of below command we are creating the asm disk group .
cd /u01/Grid/Ora12c/Sw/bin
[oracle@farukh01 bin]$ ./asmca -silent -configureASM -diskString '/dev/oracleasm/disks/*' -sysAsmPassword Grid#123 -asmsnmpPassword Grid#123 -diskGroupName DATA -diskList /dev/oracleasm/disks/DATA1 -redundancy EXTERNAL
Disk groups created successfully. Check /u01/Grid/Ora12c/cfgtoollogs/asmca/asmca-211225PM084751.log for details.
Step -8 login with root user and check the resources using the below command .
cd /u01/Grid/Ora12c/Sw/bin
[root@farukh01 bin]# ./crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCHIVE.dg
ONLINE ONLINE farukh01 STABLE
ora.CONTROLE.dg
ONLINE ONLINE farukh01 STABLE
ora.DATA.dg
ONLINE ONLINE farukh01 STABLE
ora.REDO.dg
ONLINE ONLINE farukh01 STABLE
ora.asm
ONLINE ONLINE farukh01 Started,STABLE
ora.ons
OFFLINE OFFLINE farukh01 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE farukh01 STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE farukh01 STABLE
--------------------------------------------------------------------------------
[root@farukh01 bin]#
Step -9
[oracle@farukh01 bin]$ ps -ef|grep pmon
oracle 70533 1 0 20:49 ? 00:00:00 asm_pmon_+ASM
oracle 93797 52656 0 22:13 pts/0 00:00:00 grep --color=auto pmon
[oracle@farukh01 bin]$ sqlplus /
SQL*Plus: Release 12.2.0.1.0 Production on Sat Dec 25 22:14:08 2021
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> select name,total_mb/1024,free_mb/1024 from v$asm_diskgroup ;
NAME TOTAL_MB/1024 FREE_MB/1024
------------------------------ ------------- ------------
DATA 2047.99805 2047.90137
CONTROLE 49.9990234 49.9462891
REDO 49.9990234 49.9462891
ARCHIVE 199.999023 199.944336
SQL>
Thank you to All ....
Thank you for giving your valuable time to read the above information.