Friday, February 7, 2020

11g Oracle Homes Cloning Made Easy for RAC Database

Cloning Oracle Home

Below are the details manual oracle home cloning steps.

Whenever we do clone Oracle home in RAC we need to perform the Post clone steps for the cloned oracle homes along with opatch verification.

Please refer the attached log file with detailed steps and execution log files.

Example:
=======
RAC             : 2 Node RAC 
Source Oracle Home                  : /u01/app/oracle/product/11.2.0.4/EBSDBA    -> owner oradba
Target/Clone Oracle Home         : /u01/app/oracle/product/11.2.0.4/EBSGOLD -> owner oragold

1. Take tar backup of existing Oracle home.

oradba$ tar cvfz /<mount point>/OH_EBSDBA_BINARIES_BKP_$DATE_TIME.tar.gz /u01/app/oracle/product/11.2.0.4/EBSDBA/*

2. untar the backup tar file in step1 with Target Oracle home and target owner

oragold$ mkdir -p /u01/app/oracle/product/11.2.0.4/EBSGOLD
oragold$ cd /u01/app/oracle/product/11.2.0.4/EBSGOLD
oragold$ tar -xvzf /< mount point>/OH_EBSDBA_BINARIES_BKP_$DATE_TIME.tar.gz .

3. Post steps to be performed on both the nodes. 

oragold$ cd /u01/app/oracle/product/11.2.0.4/EBSGOLD/clone/bin 

oragold$ ./clone.pl ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/EBSGOLD ORACLE_HOME_NAME=11204_EBSGOLD ORACLE_BASE=/u01/app/oracle/EBSGOLD

oragold$ /u01/app/oracle/product/11.2.0.4/EBSGOLD/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/EBSGOLD "CLUSTER_NODES={npexdbadm01, npexdbadm02}"

4. Enable on rds protocol on oracle Home (Applicable only for Oracle homes in EXADATA machine) 

export ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/EBSXPRE

cd $ORACLE_HOME/rdbms/lib
make -f ins_rdbms.mk ipc_rds ioracle


5. To check if the Binaries are RAC Enabled:

cd $ORACLE_HOME/rdbms/lib
nm -r libknlopt.a | grep -c kcsm.o
1 >>> means RAC feature enabled 
0 >>> means RAC feature NOT enabled 

cd $ORACLE_HOME/rdbms/lib
make -f ins_rdbms.mk rac_on ioracle

6. Verification:

oragold$ /u01/app/oracle/product/11.2.0.4/EBSGLOD/OPatch/opatch lsinventory

oragold$ cat /u01/app/oracInventory/Context/inventory.xml  
>>> Verify Target OH is having all the cluster nodes

Execution logs: 

Source Oracle Home : /u01/app/oracle/product/11.2.0.4/EBSDBA
Target/Clone Oracle Home: /u01/app/oracle/product/11.2.0.4/EBSGOLD

1. Take tar backup of existing Oracle home with help of below shell script.

#!/usr/bin/ksh
ENV()
{
. $HOME/.bash_profile
DATE_TIME=`date +%d%b%H%M`
}
cd /u01/app/oracle/product/EBSDBA
tar cvfz /zfs-10G/orabknp1/ACFS/NODE_OH_EBSDBA_BINARIES_BKP_$DATE_TIME.tar.gz *

2. Untar the backup tar file file with Target Oracle home.
mkdir -p /u01/app/oracle/product/EBSGOLD
cp /zfs-10G/orabknp1/ACFS/NODE_OH_EBSDBA_BINARIES_BKP_.tar.gz .
tar -xvzf NODE2_OH_EBSDBA_BINARIES_BKP_.tar.gz


3. Post steps to be performed on both the nodes.

Node1:
======
[orasnap@npexdbadm01 ~]$ cd /u01/app/oracle/product/11.2.0.4/EBSGOLD/clone/bin
[orasnap@npexdbadm01 bin]$ ./clone.pl ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/EBSGOLD ORACLE_HOME_NAME=11204_EBSGOLD ORACLE_BASE=/u01/app/oracle/EBSGOLD
./runInstaller -clone -waitForCompletion  "ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/EBSGOLD" "ORACLE_HOME_NAME=11204_EBSGOLD" "ORACLE_BASE=/u01/app/oracle/EBSGOLD" -silent -noConfig -nowait
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 24442 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2018-05-21_04-37-27AM. Please wait ...Oracle Universal Installer, Version 11.2.0.4.0 Production
Copyright (C) 1999, 2013, Oracle. All rights reserved.

You can find the log of this install session at:
 /u01/app/oraInventory/logs/cloneActions2018-05-21_04-37-27AM.log
.................................................................................................... 100% Done.



Installation in progress (Monday, May 21, 2018 4:37:34 AM EDT)
..............................................................................                                                  78% Done.
Install successful

Linking in progress (Monday, May 21, 2018 4:37:37 AM EDT)
Link successful

Setup in progress (Monday, May 21, 2018 4:37:57 AM EDT)
Setup successful

End of install phases.(Monday, May 21, 2018 4:38:18 AM EDT)
WARNING:
The following configuration scripts need to be executed as the "root" user.
/u01/app/oracle/product/11.2.0.4/EBSGOLD/root.sh
To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as "root"
    3. Run the scripts
   
The cloning of 11204_EBSGOLD was successful.
Please check '/u01/app/oraInventory/logs/cloneActions2018-05-21_04-37-27AM.log' for more details.
[orasnap@npexdbadm01 bin]$ /u01/app/oracle/product/11.2.0.4/EBSGOLD/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/EBSGOLD "CLUSTER_NODES={npexdbadm01, npexdbadm01}"
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 24442 MB    Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'UpdateNodeList' was successful.
[orasnap@npexdbadm01 bin]$


Node2:
======
[orasnap@npexdbadm02 ~]$ cd /u01/app/oracle/product/11.2.0.4/EBSGOLD/clone/bin
[orasnap@npexdbadm02 bin]$ ./clone.pl ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/EBSGOLD ORACLE_HOME_NAME=11204_EBSGOLD ORACLE_BASE=/u01/app/oracle/EBSGOLD
./runInstaller -clone -waitForCompletion  "ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/EBSGOLD" "ORACLE_HOME_NAME=11204_EBSGOLD" "ORACLE_BASE=/u01/app/oracle/EBSGOLD" -silent -noConfig -nowait
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 24575 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2018-05-21_04-37-44AM. Please wait ...Oracle Universal Installer, Version 11.2.0.4.0 Production
Copyright (C) 1999, 2013, Oracle. All rights reserved.

You can find the log of this install session at:
 /u01/app/oraInventory/logs/cloneActions2018-05-21_04-37-44AM.log
.................................................................................................... 100% Done.



Installation in progress (Monday, May 21, 2018 4:37:50 AM EDT)
..............................................................................                                                  78% Done.
Install successful

Linking in progress (Monday, May 21, 2018 4:37:54 AM EDT)
Link successful

Setup in progress (Monday, May 21, 2018 4:38:13 AM EDT)
Setup successful

End of install phases.(Monday, May 21, 2018 4:38:34 AM EDT)
WARNING:
The following configuration scripts need to be executed as the "root" user.
/u01/app/oracle/product/11.2.0.4/EBSGOLD/root.sh
To execute the configuration scripts:
    1. Open a terminal window
    2. Log in as "root"
    3. Run the scripts
   
The cloning of 11204_EBSGOLD was successful.
Please check '/u01/app/oraInventory/logs/cloneActions2018-05-21_04-37-44AM.log' for more details.
[orasnap@npexdbadm02 bin]$ /u01/app/oracle/product/11.2.0.4/EBSGOLD/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/EBSGOLD "CLUSTER_NODES={npexdbadm01, npexdbadm01}"
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 24575 MB    Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'UpdateNodeList' failed.
[orasnap@npexdbadm02 bin]$


Node1:
======
npexdbadm01.r02.xlgs.local:(root)-/u01/app/oracle
>/u01/app/oracle/product/11.2.0.4/EBSGOLD/root.sh
Check /u01/app/oracle/product/11.2.0.4/EBSGOLD/install/root_npexdbadm01.r02.xlgs.local_2018-05-21_04-39-56.log for the output of root script

npexdbadm01.r02.xlgs.local:(root)-/u01/app/oracle
>


Node2:
======
npexdbadm02.r02.xlgs.local:(root)-/u01/app/oracle
>/u01/app/oracle/product/11.2.0.4/EBSGOLD/root.sh
Check /u01/app/oracle/product/11.2.0.4/EBSGOLD/install/root_npexdbadm02.r02.xlgs.local_2018-05-21_04-40-00.log for the output of root script

npexdbadm02.r02.xlgs.local:(root)-/u01/app/oracle


4. Verification: (Perform on both the nodes)

[oragold@npexdbadm01 ~]$ /u01/app/oracle/product/11.2.0.4/EBSGOLD/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0.4/EBSGOLD
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0.4/EBSGOLD/oraInst.loc
OPatch version    : 11.2.0.3.4
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0.4/EBSGOLD/cfgtoollogs/opatch/opatch2018-05-21_10-34-37AM_1.log

Lsinventory Output file location : /u01/app/oracle/product/11.2.0.4/EBSGOLD/cfgtoollogs/opatch/lsinv/lsinventory2018-05-21_10-34-37AM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (1):

Oracle Database 11g                                                  11.2.0.4.0
There are 1 products installed in this Oracle Home.


Interim patches (8) :

Patch  18485835     : applied on Sat Mar 11 19:16:58 EST 2017
Unique Patch ID:  17494576
   Created on 4 Apr 2014, 09:26:38 hrs PST8PDT
   Bugs fixed:
     18485835

Patch  22731026     : applied on Sat Mar 11 19:13:16 EST 2017
Unique Patch ID:  20226192
   Created on 25 May 2016, 07:28:30 hrs
   Bugs fixed:
     22731026

Patch  19393542     : applied on Sat Mar 11 19:11:34 EST 2017
Unique Patch ID:  18021999
   Created on 12 Sep 2014, 09:36:51 hrs PST8PDT
   Bugs fixed:
     19393542

Patch  17892268     : applied on Sat Mar 11 19:08:54 EST 2017
Unique Patch ID:  17220924
   Created on 27 Jan 2014, 16:40:37 hrs PST8PDT
   Bugs fixed:
     17892268

Patch  17501296     : applied on Sat Mar 11 19:07:05 EST 2017
Unique Patch ID:  18802658
   Created on 10 Apr 2015, 16:40:58 hrs PST8PDT
   Bugs fixed:
     17501296

Patch  17468141     : applied on Sat Mar 11 19:05:29 EST 2017
Unique Patch ID:  16848154
   Created on 1 Oct 2013, 19:46:53 hrs PST8PDT
   Bugs fixed:
     17468141

Patch  17402822     : applied on Sat Mar 11 19:03:28 EST 2017
Unique Patch ID:  16826504
   Created on 24 Oct 2013, 23:32:52 hrs PST8PDT
   Bugs fixed:
     17402822

Patch  4247037      : applied on Sat Mar 11 19:01:45 EST 2017
Unique Patch ID:  16751181
   Created on 03 SEP 2013, 09:52:00 hrs US/Pacific
   Bugs fixed:
     4247037



Rac system comprising of multiple nodes
  Local node = npexdbadm01
  Remote node = npexdbadm02

--------------------------------------------------------------------------------

OPatch succeeded.
[oragold@npexdbadm01 ~]$


Regards,
Mallik

No comments:

Post a Comment

Automation Script | Archivelog Generation Hourly Monitoring

1. List out all the running databases and pic one database where we want to monitore the archive log generation from last 1 month. [oracle@o...