Upgrade oracle grid infrastructure from 11g to 12C

          Below are steps for upgrading Oracle grid infrastructure from 11.2.0.4 to 12.1.0.2

PRECHECK:

1. Check the active version:[ from grid owner]
crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [11.2.0.4.0]

2.Collect the crs status by running below commands[ grid owner]

/crsapp/app/oracle/product/grid/bin/crsctl check crs
/crsapp/app/oracle/product/grid/bin/crsctl stat res -t
/crsapp/app/oracle/product/grid/bin/crsctl stat res -p
/crsapp/app/oracle/product/grid/bin/oifcfg iflist -p -n
/crsapp/app/oracle/product/grid/bin/oifcfg getif
/crsapp/app/oracle/product/grid/bin/ocrcheck

3. Take backup of OCR:

./ocrconfig -export /softdump/BACKUP/pre_upgrade_backup/ocr_file

4. Download the copy the 12c grid software to the server:

total 135
-rwxr-xr-x 1 oracle oinstall 500 Feb 6 2013 welcome.html
-rwxr-xr-x 1 oracle oinstall 5085 Dec 31 2013 runcluvfy.sh
drwxr-xr-x 2 oracle oinstall 5 Jul 8 2014 udlm
-rwxr-xr-x 1 oracle oinstall 16869 Jul 8 2014 runInstaller
drwxr-xr-x 2 oracle oinstall 2 Jul 8 2014 rpm
drwxrwxr-x 2 oracle oinstall 3 Jul 8 2014 sshsetup
drwxrwxr-x 2 oracle oinstall 3 Jul 8 2014 response
drwxr-xr-x 14 oracle oinstall 30 Jul 8 2014 stage
-rwxr-xr-x 1 oracle oinstall 33934 Aug 24 2015 readme.html
drwxr-xr-x 4 oracle oinstall 16 Dec 18 12:44 install

5. Run the cluvfy script for precheck:

./runcluvfy.sh stage -pre crsinst -upgrade -rolling -src_crshome /crsapp/app/oracle/product/grid11204 -dest_crshome /crsapp/app/oracle/product/grid12c -dest_version 12.1.0.2.0 -fixup -verbose

Find the output here:   cluvfy_output

Make sure the cluvfy executed successfully. If any error, please take action before proceeding.

6. Unset all the environment variables:

unset ORACLE_BASE
unset ORACLE_HOME
unset ORACLE_SID
unset ORA_CRS_HOME
unset ORA_NLS10
unset TNS_ADMIN
env |grep ORA

7. Stop the database/services running in grid

srvctl stop database -d DBAPROD

8. Take backup of Grid binary:

tar -cvf grid_home_preupg.tar $GRID_HOME

UPGRADE:

9 . Now start the upgrade using runInstaller

[/softdump/12c_software/grid]./runInstaller

Starting Oracle Universal Installer…
Checking Temp space: must be greater than 180 MB.   Actual 2734 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 1592183 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed

[/softdump/12c_software/grid]You can find the log of this install session at: wait …

 

grid1

grid2

grid3

grid4

grid5

grid6

grid7

grid8

grid9

grid10

grid11

grid12
10. Run the scripts on the local node:[ from root]

root #/crsapp/app/oracle/product/grid12c/rootupgrade.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /crsapp/app/oracle/product/grid12c
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]: y
   Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) [n]: y
   Copying coraenv to /usr/local/bin ...
Entries will be added to the /var/opt/oracle/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.
Using configuration parameter file: /crsapp/app/oracle/product/grid12c/crs/install/crsconfig_params
2016/12/18 18:33:21 CLSRSC-4015: Performing install or upgrade action for Oracle Trace File Analyzer (TFA) Collector.
2016/12/18 18:33:23 CLSRSC-4003: Successfully patched Oracle Trace File Analyzer (TFA) Collector.
2016/12/18 18:33:31 CLSRSC-464: Starting retrieval of the cluster configuration data
2016/12/18 18:33:53 CLSRSC-465: Retrieval of the cluster configuration data has successfully completed.
2016/12/18 18:33:54 CLSRSC-363: User ignored prerequisites during installation
2016/12/18 18:34:25 CLSRSC-515: Starting OCR manual backup.
2016/12/18 18:34:31 CLSRSC-516: OCR manual backup successful.
2016/12/18 18:34:42 CLSRSC-468: Setting Oracle Clusterware and ASM to rolling migration mode
2016/12/18 18:34:42 CLSRSC-482: Running command: '/crsapp/app/oracle/product/grid12c/bin/asmca -silent -upgradeNodeASM -nonRolling false -oldCRSHome /crsapp/app/oracle/                             product/grid11204 -oldCRSVersion 11.2.0.4.0 -nodeNumber 1 -firstNode true -startRolling true'

ASM configuration upgraded in local node successfully.
2016/12/18 18:34:54 CLSRSC-469: Successfully set Oracle Clusterware and ASM to rolling migration mode
2016/12/18 18:34:54 CLSRSC-466: Starting shutdown of the current Oracle Grid Infrastructure stack
2016/12/18 18:35:29 CLSRSC-467: Shutdown of the current Oracle Grid Infrastructure stack has successfully completed.

OLR initialization - successful
2016/12/18 18:41:19 CLSRSC-329: Replacing Clusterware entries in file '/etc/inittab'

CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
2016/12/18 18:47:12 CLSRSC-472: Attempting to export the OCR

2016/12/18 18:47:12 CLSRSC-482: Running command: 'ocrconfig -upgrade oracle oinstall'

2016/12/18 18:47:25 CLSRSC-473: Successfully exported the OCR

2016/12/18 18:47:33 CLSRSC-486:
 At this stage of upgrade, the OCR has changed.
 Any attempt to downgrade the cluster after this point will require a complete cluster outage to restore the OCR.

2016/12/18 18:47:33 CLSRSC-541:
 To downgrade the cluster:
 1. All nodes that have been upgraded must be downgraded.

2016/12/18 18:47:33 CLSRSC-542:
 2. Before downgrading the last node, the Grid Infrastructure stack on all other cluster nodes must be down.

2016/12/18 18:47:34 CLSRSC-543:
 3. The downgrade command must be run on the node sec61-2 with the '-lastnode' option to restore global configuration data.
2016/12/18 18:48:01 CLSRSC-343: Successfully started Oracle Clusterware stack
clscfg: EXISTING configuration version 5 detected.
clscfg: version 5 is 11g 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.
2016/12/18 18:48:28 CLSRSC-474: Initiating upgrade of resource types
2016/12/18 18:48:59 CLSRSC-482: Running command: 'upgrade model  -s 11.2.0.4.0 -d 12.1.0.2.0 -p first'
2016/12/18 18:48:59 CLSRSC-475: Upgrade of resource types successfully initiated.
2016/12/18 18:49:13 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded

11. Now run the script on other node:

root@sec61-2 # /crsapp/app/oracle/product/grid12c/rootupgrade.sh
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /crsapp/app/oracle/product/grid12c

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]: y
   Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) [n]: y
   Copying coraenv to /usr/local/bin ...

Entries will be added to the /var/opt/oracle/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.
Using configuration parameter file: /crsapp/app/oracle/product/grid12c/crs/install/crsconfig_params
2016/12/18 18:52:19 CLSRSC-4015: Performing install or upgrade action for Oracle Trace File Analyzer (TFA) Collector.

2016/12/18 18:52:21 CLSRSC-4003: Successfully patched Oracle Trace File Analyzer (TFA) Collector.

2016/12/18 18:52:24 CLSRSC-464: Starting retrieval of the cluster configuration data

2016/12/18 18:52:38 CLSRSC-465: Retrieval of the cluster configuration data has successfully completed.

2016/12/18 18:52:38 CLSRSC-363: User ignored prerequisites during installation


ASM configuration upgraded in local node successfully.

2016/12/18 18:53:02 CLSRSC-466: Starting shutdown of the current Oracle Grid Infrastructure stack

2016/12/18 18:53:37 CLSRSC-467: Shutdown of the current Oracle Grid Infrastructure stack has successfully completed.

OLR initialization - successful
2016/12/18 18:54:16 CLSRSC-329: Replacing Clusterware entries in file '/etc/inittab'

CRS-4133: Oracle High Availability Services has been stopped.
CRS-4123: Oracle High Availability Services has been started.
2016/12/18 18:57:50 CLSRSC-343: Successfully started Oracle Clusterware stack

clscfg: EXISTING configuration version 5 detected.
clscfg: version 5 is 12c Release 1.
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.
Start upgrade invoked..
2016/12/18 18:58:19 CLSRSC-478: Setting Oracle Clusterware active version on the last node to be upgraded

2016/12/18 18:58:20 CLSRSC-482: Running command: '/crsapp/app/oracle/product/grid12c/bin/crsctl set crs activeversion'

Started to upgrade the Oracle Clusterware. This operation may take a few minutes.
Started to upgrade the OCR.
Started to upgrade the CSS.
The CSS was successfully upgraded.
Started to upgrade Oracle ASM.
Started to upgrade the CRS.
The CRS was successfully upgraded.
Successfully upgraded the Oracle Clusterware.
Oracle Clusterware operating version was successfully set to 12.1.0.2.0
2016/12/18 19:00:15 CLSRSC-479: Successfully set Oracle Clusterware active version

2016/12/18 19:00:23 CLSRSC-476: Finishing upgrade of resource types

2016/12/18 19:00:42 CLSRSC-482: Running command: 'upgrade model  -s 11.2.0.4.0 -d 12.1.0.2.0 -p last'

2016/12/18 19:00:42 CLSRSC-477: Successfully completed upgrade of resource types

2016/12/18 19:01:46 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded

 

grid13

 

12. Check the grid active version:( It shoulde be 12.1.0.2)

[+ASM1@sec60-2]/export/home/oracle# crsctl query crs activeversion
Oracle Clusterware active version on the cluster is [12.1.0.2.0]
[+ASM1@sec60-2]/export/home/oracle# crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online

With this upgrade has been completed successfully.

 

SEE ALSO:

8 thoughts on “Upgrade oracle grid infrastructure from 11g to 12C”

  1. in my case during upgrade when we run rootupgrade.sh script on local node. The node is shut down and cluster is down now. second node was also down and cluster is down. how we can make cluster up and continue upgrade further. Can you advise.

  2. when we run the script at node-1 it suspends the VM node and keep suspended situation and need to to restart the node-1 to come up again. Thus not completing the upgrade.

    [root@pp-ora01-nic grid]# ./rootupgrade.sh
    Performing root user operation.

    The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME= /GRID_HOME_12C/app/12.1.0.2/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 contents of “oraenv” have not changed. No need to overwrite.
    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.
    Using configuration parameter file: /GRID_HOME_12C/app/12.1.0.2/grid/crs/install/crsconfig_params
    2018/11/19 13:33:40 CLSRSC-4015: Performing install or upgrade action for Oracle Trace File Analyzer (TFA) Collector.

    2018/11/19 13:33:40 CLSRSC-4012: Shutting down Oracle Trace File Analyzer (TFA) Collector.

    2018/11/19 13:33:48 CLSRSC-4013: Successfully shut down Oracle Trace File Analyzer (TFA) Collector.

    2018/11/19 13:33:59 CLSRSC-4003: Successfully patched Oracle Trace File Analyzer (TFA) Collector.

    2018/11/19 13:34:01 CLSRSC-464: Starting retrieval of the cluster configuration data

    2018/11/19 13:34:07 CLSRSC-465: Retrieval of the cluster configuration data has successfully completed.

    2018/11/19 13:34:07 CLSRSC-363: User ignored prerequisites during installation

    2018/11/19 13:34:12 CLSRSC-468: Setting Oracle Clusterware and ASM to rolling migration mode

    2018/11/19 13:34:12 CLSRSC-482: Running command: ‘/GRID_HOME_12C/app/12.1.0.2/grid/bin/asmca -silent -upgradeNodeASM -nonRolling false -oldCRSHome /GRID_HOME/app/11.2.0/grid -oldCRSVersion 11.2.0.4.0 -nodeNumber 1 -firstNode true -startRolling true’

    ASM configuration upgraded in local node successfully.

    2018/11/19 13:34:15 CLSRSC-469: Successfully set Oracle Clusterware and ASM to rolling migration mode

    2018/11/19 13:34:16 CLSRSC-466: Starting shutdown of the current Oracle Grid Infrastructure stack

    2018/11/19 13:34:41 CLSRSC-467: Shutdown of the current Oracle Grid Infrastructure stack has successfully completed.

    Write failed: Broken pipe

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.