Showing posts with label Upgrade grid rac 12.1.0.20 to 12.2.0.1.0 12.2.. Show all posts
Showing posts with label Upgrade grid rac 12.1.0.20 to 12.2.0.1.0 12.2.. Show all posts

Friday 17 July 2020

Upgrade- PART 1 | 12.1.0.2.0 to 12.1.0.2.0 grid and database upgradation

Scenario :

2 Node RAC 12.1.0.2.0  installed on OEL 6.7.  We have to upgrade into 12.2.0.1.0 grid. 

Details:

Operating System : OEL 6.7 64 bit

Instance : RAC1, RAC2

Hostname: srv1, srv2

STEPS:
  1. Download an automated upgrade-specific health check for upgrades to Oracle Grid Infrastructure from Oracle Support (Doc ID 1457357.1).
  2. Apply patch 21255373.
  3. Create directory on both server and unzip setup on local node.
  4. Take Tar level grid and oraInventory binary backup on both node.
  5. Take manual backup of OCR and OLR.
  6. execute ./gridSetup.sh.
  7. Execute rootupgrade.sh on both node one by one using root user. 
  8. Check listener | Clusterware status and version on both nodes.
Practice :
  • Take tar backup of grid | Ora-inventory on both nodes 
LINK : TAR level binary backup of grid_home, db_home and orainventory_home
  • Apply patch 21255373

  • Create directory on both server
mkdir -p /u01/app/12.2.0/grid

chown grid:oinstall /u01/app/12.2.0/grid

  • Unzip grid setup on local node

unzip linuxx64_12201_grid_home.zip -d /u01/app/12.2.0/grid 

  • Take manual backup of OCR and OLR
  1. OCR Backup 
[root@srv1 grid]# ocrconfig -manualbackup

srv2     2020/06/17 12:24:10     /u01/app/12.1.0/grid/cdata/rac/backup_20200617_122410.ocr     3544584551

srv1     2020/06/15 20:39:01     /u01/app/12.1.0/grid/cdata/rac/backup_20200615_203901.ocr     3544584551

    2. Check Backup

[root@srv1 grid]# ocrconfig -showbackup manual

srv2     2020/06/17 12:24:10     /u01/app/12.1.0/grid/cdata/rac/backup_20200617_122410.ocr     3544584551

srv1     2020/06/15 20:39:01     /u01/app/12.1.0/grid/cdata/rac/backup_20200615_203901.ocr     3544584551

   3. Check  OLR status
 
[root@srv1 grid]# ocrcheck -local
Status of Oracle Local Registry is as follows :
         Version                  :          4
         Total space (kbytes)     :     409568
         Used space (kbytes)      :       1004
         Available space (kbytes) :     408564
         ID                       :  153890040
         Device/File Name         : /u01/app/12.1.0/grid/cdata/srv1.olr
                                    Device/File integrity check succeeded

         Local registry integrity check succeeded

         Logical corruption check succeeded
  
   4. OLR Backup 

[root@srv1 grid]# ocrconfig -local -manualbackup

srv1     2020/06/17 12:25:25     /u01/app/12.1.0/grid/cdata/srv1/backup_20200617_122525.olr     3544584551
  5. Check OLR Backup status 

srv1     2020/06/15 13:50:36     /u01/app/12.1.0/grid/cdata/srv1/backup_20200615_135036.olr     0
[root@srv1 grid]# ocrconfig -local -showbackup manual

srv1     2020/06/17 12:25:25     /u01/app/12.1.0/grid/cdata/srv1/backup_20200617_122525.olr     3544584551

srv1     2020/06/15 13:50:36     /u01/app/12.1.0/grid/cdata/srv1/backup_20200615_135036.olr     0
[root@srv1 grid]#
  • We can also create directory and take OLR and OCR backup.
[root@srv1 u01]# mkdir -p /u01/OCR_OLR_BACKUP
[root@srv1 u01]# ocrconfig -local -backuploc /u01/OCR_OLR_BACKUP/
[root@srv1 u01]# ocrconfig  -backuploc /u01/OCR_OLR_BACKUP/
  • After unzip to location /u01/app/12.2.0/grid set path and execute ./gridSetup.sh  
     
export ORACLE_HOME=/u01/app/12.2.0/grid 
./gridSetup.sh











  • Execute rootupgrade.sh on both node one by one using root user. 
root@srv2's password: 
Last login: Wed Jun 17 15:44:17 2020 from 192.168.56.1
[root@srv2 ~]# /u01/app/12.2.0/grid/rootupgrade.sh
Performing root user operation.

root@srv2 ~]# /u01/app/12.2.0/grid/rootupgrade.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/12.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The contents of "dbhome" have not changed. No need to overwrite.
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: 
The contents of "coraenv" have not changed. No need to overwrite.

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.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/12.2.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/srv2/crsconfig/rootcrs_srv2_2020-06-18_07-03-19PM.log
2020/06/18 19:03:36 CLSRSC-595: Executing upgrade step 1 of 19: 'UpgradeTFA'.
2020/06/18 19:03:36 CLSRSC-4015: Performing install or upgrade action for Oracle Trace File Analyzer (TFA) Collector.
2020/06/18 19:03:36 CLSRSC-4012: Shutting down Oracle Trace File Analyzer (TFA) Collector.
2020/06/18 19:03:55 CLSRSC-4013: Successfully shut down Oracle Trace File Analyzer (TFA) Collector.
2020/06/18 19:04:39 CLSRSC-4003: Successfully patched Oracle Trace File Analyzer (TFA) Collector.
2020/06/18 19:04:39 CLSRSC-595: Executing upgrade step 2 of 19: 'ValidateEnv'.
2020/06/18 19:05:00 CLSRSC-595: Executing upgrade step 3 of 19: 'GenSiteGUIDs'.
2020/06/18 19:05:01 CLSRSC-595: Executing upgrade step 4 of 19: 'GetOldConfig'.
2020/06/18 19:05:01 CLSRSC-464: Starting retrieval of the cluster configuration data
2020/06/18 19:06:06 CLSRSC-465: Retrieval of the cluster configuration data has successfully completed.
2020/06/18 19:06:06 CLSRSC-595: Executing upgrade step 5 of 19: 'UpgPrechecks'.
2020/06/18 19:06:11 CLSRSC-595: Executing upgrade step 6 of 19: 'SaveParamFile'.
2020/06/18 19:06:19 CLSRSC-595: Executing upgrade step 7 of 19: 'SetupOSD'.
2020/06/18 19:06:25 CLSRSC-595: Executing upgrade step 8 of 19: 'PreUpgrade'.
2020/06/18 19:06:26 CLSRSC-595: Executing upgrade step 9 of 19: 'CheckCRSConfig'.
2020/06/18 19:06:28 CLSRSC-595: Executing upgrade step 10 of 19: 'UpgradeOLR'.
2020/06/18 19:06:35 CLSRSC-595: Executing upgrade step 11 of 19: 'ConfigCHMOS'.
2020/06/18 19:06:36 CLSRSC-595: Executing upgrade step 12 of 19: 'InstallAFD'.
2020/06/18 19:06:40 CLSRSC-595: Executing upgrade step 13 of 19: 'createOHASD'.
2020/06/18 19:06:45 CLSRSC-595: Executing upgrade step 14 of 19: 'ConfigOHASD'.
2020/06/18 19:06:51 CLSRSC-595: Executing upgrade step 15 of 19: 'InstallACFS'.
2020/06/18 19:06:59 CLSRSC-595: Executing upgrade step 16 of 19: 'InstallKA'.
2020/06/18 19:07:05 CLSRSC-595: Executing upgrade step 17 of 19: 'UpgradeCluster'.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'srv2'
CRS-2673: Attempting to stop 'ora.crsd' on 'srv2'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on server 'srv2'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'srv2'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'srv2' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'srv2'
CRS-2677: Stop of 'ora.scan1.vip' on 'srv2' succeeded
CRS-2672: Attempting to start 'ora.scan1.vip' on 'srv1'
CRS-2676: Start of 'ora.scan1.vip' on 'srv1' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'srv1'
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'srv1' succeeded
CRS-2673: Attempting to stop 'ora.srv2.vip' on 'srv2'
CRS-2677: Stop of 'ora.srv2.vip' on 'srv2' succeeded
CRS-2672: Attempting to start 'ora.srv2.vip' on 'srv1'
CRS-2673: Attempting to stop 'ora.asm' on 'srv2'
CRS-2676: Start of 'ora.srv2.vip' on 'srv1' succeeded
CRS-2677: Stop of 'ora.asm' on 'srv2' succeeded
CRS-2673: Attempting to stop 'ora.ASMIBNETLSNR_ASM.lsnr' on 'srv2'
CRS-2677: Stop of 'ora.ASMIBNETLSNR_ASM.lsnr' on 'srv2' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'srv2'
CRS-2677: Stop of 'ora.ons' on 'srv2' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'srv2'
CRS-2677: Stop of 'ora.net1.network' on 'srv2' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'srv2' has completed
CRS-2677: Stop of 'ora.crsd' on 'srv2' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'srv2'
CRS-2673: Attempting to stop 'ora.crf' on 'srv2'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'srv2'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'srv2'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'srv2'
CRS-2677: Stop of 'ora.drivers.acfs' on 'srv2' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'srv2' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'srv2' succeeded
CRS-2677: Stop of 'ora.crf' on 'srv2' succeeded
CRS-2677: Stop of 'ora.asm' on 'srv2' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'srv2'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'srv2' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'srv2'
CRS-2673: Attempting to stop 'ora.evmd' on 'srv2'
CRS-2677: Stop of 'ora.ctssd' on 'srv2' succeeded
CRS-2677: Stop of 'ora.evmd' on 'srv2' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'srv2'
CRS-2677: Stop of 'ora.cssd' on 'srv2' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'srv2'
CRS-2677: Stop of 'ora.gipcd' on 'srv2' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'srv2' has completed
CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Starting Oracle High Availability Services-managed resources
CRS-2672: Attempting to start 'ora.mdnsd' on 'srv2'
CRS-2672: Attempting to start 'ora.evmd' on 'srv2'
CRS-2676: Start of 'ora.mdnsd' on 'srv2' succeeded
CRS-2676: Start of 'ora.evmd' on 'srv2' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'srv2'
CRS-2676: Start of 'ora.gpnpd' on 'srv2' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'srv2'
CRS-2676: Start of 'ora.gipcd' on 'srv2' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'srv2'
CRS-2676: Start of 'ora.cssdmonitor' on 'srv2' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'srv2'
CRS-2672: Attempting to start 'ora.diskmon' on 'srv2'
CRS-2676: Start of 'ora.diskmon' on 'srv2' succeeded
CRS-2676: Start of 'ora.cssd' on 'srv2' succeeded
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'srv2'
CRS-2672: Attempting to start 'ora.ctssd' on 'srv2'
CRS-2676: Start of 'ora.ctssd' on 'srv2' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'srv2' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'srv2'
CRS-2676: Start of 'ora.asm' on 'srv2' succeeded
CRS-2672: Attempting to start 'ora.storage' on 'srv2'
diskgroup CRS not mounted (MOUNTING)
CRS-2676: Start of 'ora.storage' on 'srv2' succeeded
CRS-2672: Attempting to start 'ora.crf' on 'srv2'
CRS-2676: Start of 'ora.crf' on 'srv2' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'srv2'
CRS-2676: Start of 'ora.crsd' on 'srv2' succeeded
CRS-6017: Processing resource auto-start for servers: srv2
CRS-2672: Attempting to start 'ora.ASMIBNETLSNR_ASM.lsnr' on 'srv2'
CRS-2672: Attempting to start 'ora.ons' on 'srv2'
CRS-2673: Attempting to stop 'ora.srv2.vip' on 'srv1'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'srv1'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'srv1' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'srv1'
CRS-2677: Stop of 'ora.srv2.vip' on 'srv1' succeeded
CRS-2672: Attempting to start 'ora.srv2.vip' on 'srv2'
CRS-2677: Stop of 'ora.scan1.vip' on 'srv1' succeeded
CRS-2672: Attempting to start 'ora.scan1.vip' on 'srv2'
CRS-2676: Start of 'ora.srv2.vip' on 'srv2' succeeded
CRS-2672: Attempting to start 'ora.LISTENER.lsnr' on 'srv2'
CRS-2676: Start of 'ora.scan1.vip' on 'srv2' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'srv2'
CRS-2676: Start of 'ora.ASMIBNETLSNR_ASM.lsnr' on 'srv2' succeeded
CRS-2676: Start of 'ora.ons' on 'srv2' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'srv2' succeeded
CRS-2674: Start of 'ora.LISTENER.lsnr' on 'srv2' failed
CRS-2672: Attempting to start 'ora.LISTENER.lsnr' on 'srv2'
CRS-2672: Attempting to start 'ora.rac.db' on 'srv2'
CRS-2674: Start of 'ora.LISTENER.lsnr' on 'srv2' failed
CRS-2676: Start of 'ora.rac.db' on 'srv2' succeeded
===== Summary of resource auto-start failures follows =====
CRS-2807: Resource 'ora.LISTENER.lsnr' failed to start automatically.
CRS-6016: Resource auto-start has completed for server srv2
CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources
CRS-4123: Oracle High Availability Services has been started.
2020/06/18 19:36:33 CLSRSC-343: Successfully started Oracle Clusterware stack
clscfg: EXISTING configuration version 5 detected.
clscfg: version 5 is 12c Release 2.
Successfully taken the backup of node specific configuration in OCR. 
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
2020/06/18 19:37:45 CLSRSC-595: Executing upgrade step 18 of 19: 'UpgradeNode'.
Start upgrade invoked..
2020/06/18 19:38:17 CLSRSC-478: Setting Oracle Clusterware active version on the last node to be upgraded
2020/06/18 19:38:17 CLSRSC-482: Running command: '/u01/app/12.2.0/grid/bin/crsctl set crs activeversion'
Started to upgrade the active version of Oracle Clusterware. This operation may take a few minutes.
Started to upgrade CSS.
CSS was successfully upgraded.
Started to upgrade Oracle ASM.
Started to upgrade CRS.
CRS was successfully upgraded.
Successfully upgraded the active version of Oracle Clusterware.
Oracle Clusterware active version was successfully set to 12.2.0.1.0.
2020/06/18 19:39:30 CLSRSC-479: Successfully set Oracle Clusterware active version
2020/06/18 19:40:11 CLSRSC-476: Finishing upgrade of resource types
2020/06/18 19:41:47 CLSRSC-482: Running command: 'srvctl upgrade model -s 12.1.0.2.0 -d 12.2.0.1.0 -p last'
2020/06/18 19:41:47 CLSRSC-477: Successfully completed upgrade of resource types

2020/06/18 19:44:04 CLSRSC-595: Executing upgrade step 19 of 19: 'PostUpgrade'.
2020/06/18 19:44:52 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded
  • Check listener status below.
[root@srv1 bin]# srvctl config listener -asmlistener
Name: ASMIBNETLSNR_ASM
Type: ASM Listener
Owner: grid
Subnet: 192.168.10.0
Home: <CRS home>
End points: TCP:1525
Listener is enabled.
Listener is individually enabled on nodes: srv2
Listener is individually disabled on nodes:
[root@srv1 bin]#

  • Check Clusterware status on both node
[root@srv2 db_1]# crsctl status resource -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMIBNETLSNR_ASM.lsnr
               ONLINE  ONLINE       srv1                     STABLE
               ONLINE  ONLINE       srv2                     STABLE
ora.CRS.dg
               ONLINE  ONLINE       srv1                     STABLE
               ONLINE  ONLINE       srv2                     STABLE
ora.DATA.dg
               ONLINE  ONLINE       srv1                     STABLE
               ONLINE  ONLINE       srv2                     STABLE
ora.FRA.dg
               ONLINE  ONLINE       srv1                     STABLE
               ONLINE  ONLINE       srv2                     STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       srv1                     STABLE
               ONLINE  OFFLINE      srv2                     STABLE
ora.chad
               ONLINE  OFFLINE      srv1                     STABLE
               ONLINE  ONLINE       srv2                     STABLE
ora.net1.network
               ONLINE  ONLINE       srv1                     STABLE
               ONLINE  ONLINE       srv2                     STABLE
ora.ons
               ONLINE  ONLINE       srv1                     STABLE
               ONLINE  ONLINE       srv2                     STABLE
ora.proxy_advm
               OFFLINE OFFLINE      srv1                     STABLE
               OFFLINE OFFLINE      srv2                     STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       srv1                     STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       srv2                     STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       srv2                     STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       srv1                     169.254.224.241 192.
                                                             168.10.1,STABLE
ora.asm
      1        ONLINE  ONLINE       srv1                     Started,STABLE
      2        ONLINE  ONLINE       srv2                     STABLE
ora.cvu
      1        ONLINE  ONLINE       srv2                     STABLE
ora.mgmtdb
      1        ONLINE  OFFLINE                               Instance Shutdown,ST
                                                             ABLE
ora.qosmserver
      1        ONLINE  ONLINE       srv1                     STABLE
ora.rac.db
      1        ONLINE  ONLINE       srv1                     Open,HOME=/u01/app/o
                                                             racle/product/12.1.0
                                                             /dbhome_1,STABLE
      2        ONLINE  ONLINE       srv2                     Open,HOME=/u01/app/o
                                                             racle/product/12.1.0
                                                             /dbhome_1,STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       srv1                     STABLE
ora.scan2.vip
      1        ONLINE  ONLINE       srv2                     STABLE
ora.scan3.vip
      1        ONLINE  ONLINE       srv2                     STABLE
ora.srv1.vip
      1        ONLINE  ONLINE       srv1                     STABLE
ora.srv2.vip
      1        ONLINE  ONLINE       srv2                     STABLE
--------------------------------------------------------------------------------
[root@srv2 db_1]#
root@srv1 ~]# ps -ef |grep lsnr
grid      8033     1  0 12:06 ?        00:00:00 /u01/app/12.2.0/grid/bin/tnslsnr ASMIBNETLSNR_ASM -no_crs_notify -inherit
grid      8178     1  0 12:06 ?        00:00:00 /u01/app/12.2.0/grid/bin/tnslsnr LISTENER -no_crs_notify -inherit
grid      8205     1  0 12:06 ?        00:00:00 /u01/app/12.2.0/grid/bin/tnslsnr LISTENER_SCAN2 -no_crs_notify -inherit
grid      8207     1  0 12:06 ?        00:00:00 /u01/app/12.2.0/grid/bin/tnslsnr LISTENER_SCAN3 -no_crs_notify -inherit
grid     13709     1  0 12:12 ?        00:00:00 /u01/app/12.2.0/grid/bin/tnslsnr MGMTLSNR -no_crs_notify -inherit
root     23488  7389  0 12:26 pts/0    00:00:00 grep lsnr
[root@srv1 ~]#


#########################################################################

[grid@srv1 OPatch]$ /u01/app/12.2.0/grid/bin/crsctl check cluster -all
**************************************************************
srv1:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
srv2:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
[grid@srv1 OPatch]$ /u01/app/12.2.0/grid/bin/crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [12.2.0.1.0]
[grid@srv1 OPatch]$
[root@srv2 app]# /u01/app/12.2.0/grid/bin/crsctl check cluster -all
**************************************************************
srv1:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
srv2:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
  • Check clusterware version
[root@srv2 app]# /u01/app/12.2.0/grid/bin/crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [12.2.0.1.0]
[root@srv2 app]#

Link Below: