Upgrade Grid Infrastructure to 12.2

*** Upgrade GRID 12.1 to 12.2 (Standalone)

References:
Patches to apply before upgrading Oracle GI and DB to 12.2.0.1 (Doc ID 2180188.1)
http://docs.oracle.com/database/122/CWLIN/running-oui-to-upgrade-grid-infrastructure-from-an-earlier-release.htm#GUID-3BE36DF3-EB62-4CD1-B53A-850A3E2129E3
http://docs.oracle.com/database/122/CWLIN/checks-to-complete-before-upgrading-oracle-clusterware.htm#GUID-19947AC8-213B-4104-8D79-E462C7C364EC

Environment:

ORACLE_BASE: /opt/oracle

ORACLE_HOME: grid 12.1
/opt/oracle/grid_1

ORACLE_HOME: grid 12.2
/opt/oracle/grid_2

GRID Binary: linuxx64_12201_grid_home.zip

1.) Check the status for your current HAS

crsctl stat res -t

——————————————————————————–
Name Target State Server State details
——————————————————————————–
Local Resources
——————————————————————————–
ora.ons
OFFLINE OFFLINE vddl-ocm-odg-01 STABLE
——————————————————————————–
Cluster Resources
——————————————————————————–
ora.cssd
1 OFFLINE OFFLINE STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE vddl-ocm-odg-01 STABLE
——————————————————————————–

2.) CSSD must be online, during the upgrade process there is a check
regarding this.
This will avoid issues during the rootupgrade.sh

–> Start the CSSD if it’s not started:

crsctl start res ora.cssd -init

CRS-2672: Attempting to start ‘ora.cssd’ on ‘vddl-ocm-odg-01’
CRS-2672: Attempting to start ‘ora.diskmon’ on ‘vddl-ocm-odg-01’
CRS-2676: Start of ‘ora.diskmon’ on ‘vddl-ocm-odg-01’ succeeded
CRS-2676: Start of ‘ora.cssd’ on ‘vddl-ocm-odg-01’ succeeded

3.) Change the status for the AUTO_START attribute:

With the “normal” way at this time i could not change the attribute value
[oracle@vddl-ocm-odg-01 network]$ crsctl modify resource “ora.cssd” -attr “AUTO_START=always” -f
CRS-4995: The command ‘Modify resource’ is invalid in crsctl. Use srvctl for this command.

So i had to use “-unsuported” parameter, please note that this parameter should be
always used with permission of Oracle Support:

[oracle@vddl-ocm-odg-01 network]$ crsctl modify resource “ora.cssd” -attr “AUTO_START=always” -f -unsupported

4.) A listener must exists:

srvctl add listener
srvctl start listener

[oracle@vddl-ocm-odg-01 admin]$ crsctl stat res -t
——————————————————————————–
Name Target State Server State details
——————————————————————————–
Local Resources
——————————————————————————–
ora.LISTENER.lsnr
ONLINE ONLINE vddl-ocm-odg-01 STABLE
ora.ons
OFFLINE OFFLINE vddl-ocm-odg-01 STABLE
——————————————————————————–
Cluster Resources
——————————————————————————–
ora.cssd
1 ONLINE ONLINE vddl-ocm-odg-01 STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE vddl-ocm-odg-01 STABLE
——————————————————————————–

5.) Apply Latest PSU on the grid home, be sure after the PSU that
CSSD is UP

Patch 24917825: GRID INFRASTRUCTURE PATCH SET UPDATE 12.1.0.2.170117

6.) Pre tasks as GRID OWNER:

unset ORACLE_HOME
unset ORACLE_SID
unset ORACLE_BASE
unset ORA_NLS10
unset ORA_CRS_HOME
unset TNS_ADMIN

* Check to ensure that the user profile for the installation user,
for example, .profile or .cshrc,
does not set any of these environment variables.

Ensure that the $ORACLE_HOME/bin path is removed from your
PATH environment variable.

export PATH=.:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oracle/bin

7.) Directories

mkdir -p /opt/oracle/grid_2
chown oracle:oinstall /opt/oracle/grid_2
cd /opt/oracle/grid_2

Please copy the binary to /opt/oracle/grid_2

unzip linuxx64_12201_grid_home.zip

8.) Upgrade process:
as Grid owner, on my case “oracle”
/opt/oracle/grid_2/gridSetup.sh

9.) During the process the Setup will ask to execute rootupgrade.sh

10.) After the upgrade you should see the info below executing the commands:

–> Change the ORATAB

[oracle@vddl-ocm-odg-01 grid_2]$ cat /etc/oratab
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.

# A colon, ‘:’, is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, ‘#’, are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third field indicates
# to the dbstart utility that the database should , “Y”, or should not,
# “N”, be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
GRID:/opt/oracle/grid_2:N

–> . oraenv
GRID

[oracle@vddl-ocm-odg-01 ~]$ crsctl query has softwareversion
Oracle High Availability Services version on the local node is [12.2.0.1.0]

[oracle@vddl-ocm-odg-01 ~]$ crsctl query has releaseversion
Oracle High Availability Services release version on the local node is
[12.2.0.1.0]

[oracle@vddl-ocm-odg-01 ~]$ crsctl query has softwarepatch
Oracle Clusterware patch level on node vddl-ocm-odg-01 is [0].

11.) Deinstall GRID 12.1

as GRID owner:

cd $HOME

export ORACLE_HOME=/opt/oracle/grid_1
/opt/oracle/grid_1/deinstall/deinstall

## [START] Oracle install clean ##

Clean install operation removing temporary directory ‘/tmp/deinstall2017-04-07_08-50-29PM’ on node ‘vddl-ocm-odg-01’

## [END] Oracle install clean ##
######################### DEINSTALL CLEAN OPERATION END #########################
####################### DEINSTALL CLEAN OPERATION SUMMARY #######################
Successfully detached Oracle home ‘/opt/oracle/grid_1’ from the central inventory on the local node.
Oracle Universal Installer cleanup was successful.

Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################
12.) Check the status

. oraenv
GRID

[oracle@vddl-ocm-odg-01 grid_1]$ crsctl stat res -t
——————————————————————————–
Name Target State Server State details
——————————————————————————–
Local Resources
——————————————————————————–
ora.LISTENER.lsnr
ONLINE ONLINE vddl-ocm-odg-01 STABLE
ora.ons
OFFLINE OFFLINE vddl-ocm-odg-01 STABLE
——————————————————————————–
Cluster Resources
——————————————————————————–
ora.cssd
1 ONLINE ONLINE vddl-ocm-odg-01 STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE vddl-ocm-odg-01 STABLE
——————————————————————————–
[oracle@vddl-ocm-odg-01 grid_1]$ which crsctl
/opt/oracle/grid_2/bin/crsctl

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s