Last year we did Grid Infrastructure upgrade activity for RAC database as well as Single Instance ASM database server. We were upgrading 12c GI to 19c GI. Here we will discuss how to upgrade GI for Single Instance ASM (Oracle Restart) using GUI with complete slides.
If you are looking for how to upgrade oracle grid infrastructure from 12c to 19c in rolling fashion check following post – https://www.oracledbworld.com/upgrade/how-to-upgrade-oracle-grid-infrastructure-from-12c-to-19c-rac-in-rolling-fashion/
For instance here – We were upgrading the GI on Sun Solaris system. Commands are with respective of sun solaris. It’s always better to check for your OS version Certification against Oracle 19c so you will have a clear idea if you can go ahead with same OS version or you need to upgrade it before upgrading the GI to 19c.
https://support.oracle.com >certification tab > chose the product and chose the version > select any platform and hit search. This way you will have clear picture about OS.
Please note this activity requires complete downtime
Lets start with backup of inventory,ocr and pointing of ohasd files
Table of Contents
Prechecks – Before upgrade from 12c to 19c
export BKUPDIR=/GRIDHOME/grid/app/product/BACKUP_12c
cp -pr /var/opt/oracle/oraInst.loc /GRIDHOME/grid/app/product/BACKUP_12c
./ocrconfig -export /GRIDHOME/grid/Backup/ocrbackup
./ocrconfig -local -manualbackup
./ocrconfig -local -showbackup
./ocrconfig -manualbackup
./ocrconfig -showbackup
cp -rp /opt/oracle .
cp -p /etc/init.d/init.ohasd $BKUPDIR
cp -p /etc/init.d/ohasd $BKUPDIR
cp -p /etc/inittab $BKUPDIR
find /etc | grep ohas > $BKUPDIR/initlinks.out
cp -pr /var/opt/oracle $BKUPDIR/varoptoracle
cp -pr /opt/oracle $BKUPDIR/optoracle
cp -pr /DBHOME/oracle/oraInventory $BKUPDIR
cp -pr /opt/ORCLcluster $BKUPDIR
Here we have to download the 19c binaries for GI home, unzip it in new location. Run pre installation cluvfy for the server to understand all necessary prechecks are met.
grid@HOSTNAME-01-LD01:~/app/product/grid/19.3.0$ ./runcluvfy.sh stage -pre hacfg
Verifying Physical Memory ...PASSED
Verifying Available Physical Memory ...PASSED
Verifying Swap Size ...PASSED
Verifying Free Space: HOSTNAME-01-LD01:/usr,HOSTNAME-01-LD01:/etc,HOSTNAME-01-LD01:/sbin ...PASSED
Verifying Free Space: HOSTNAME-01-LD01:/var ...PASSED
Verifying Free Space: HOSTNAME-01-LD01:/tmp ...PASSED
Verifying User Existence: grid ...
Verifying Users With Same UID: 104 ...PASSED
Verifying User Existence: grid ...PASSED
Verifying Group Existence: dba ...PASSED
Verifying Group Existence: oinstall ...PASSED
Verifying Group Membership: dba ...PASSED
Verifying Group Membership: oinstall(Primary) ...PASSED
Verifying Run Level ...PASSED
Verifying Architecture ...PASSED
Verifying OS Kernel Version ...PASSED
Verifying OS Kernel Parameter: project.max-sem-ids ...PASSED
Verifying OS Kernel Parameter: process.max-sem-nsems ...PASSED
Verifying OS Kernel Parameter: project.max-shm-memory ...PASSED
Verifying OS Kernel Parameter: project.max-shm-ids ...PASSED
Verifying OS Kernel Parameter: tcp_smallest_anon_port ...PASSED
Verifying OS Kernel Parameter: tcp_largest_anon_port ...PASSED
Verifying OS Kernel Parameter: udp_smallest_anon_port ...PASSED
Verifying OS Kernel Parameter: udp_largest_anon_port ...PASSED
Verifying Package: make-0.5.11 ...PASSED
Verifying Package: assembler-0.5.11 ...PASSED
Verifying Package: xcu4-0.5.11 ...PASSED
Verifying Package: x11-info-clients ...PASSED
Verifying Package: dtrace ...PASSED
Verifying Package: openmp ...PASSED
Verifying Package: unzip ...PASSED
Verifying Package: header ...PASSED
Verifying Package: library ...PASSED
Verifying Package: linker ...PASSED
Verifying Package: oracka ...PASSED
Verifying Users With Same UID: 0 ...PASSED
Verifying Current Group ID ...PASSED
Verifying Root user consistency ...PASSED
Pre-check for Oracle Restart configuration was successful.
CVU operation performed: stage -pre hacfg
Date: Aug 21, 2020 11:37:56 AM
CVU home: /GRIDHOME/grid/app/product/grid/19.3.0/
User: grid
Take down the current software version and release version
-bash-5.0# ./crsctl query has softwareversion
Oracle High Availability Services version on the local node is [12.1.0.2.0]
-bash-5.0# ./crsctl query has releaseversion
Oracle High Availability Services release version on the local node is [12.1.0.2.0]
-bash-5.0#
We will check for current cluster status and note it down for comparison.
-bash-5.0# ./crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE HOSTNAME-01-LD01 STABLE
ora.ARCH_01.dg
ONLINE ONLINE HOSTNAME-01-LD01 STABLE
ora.DATA.dg
ONLINE ONLINE HOSTNAME-01-LD01 STABLE
ora.DATA_01.dg
ONLINE ONLINE HOSTNAME-01-LD01 STABLE
ora.DATA_02.dg
ONLINE ONLINE HOSTNAME-01-LD01 STABLE
ora.LISTENER.lsnr
ONLINE ONLINE HOSTNAME-01-LD01 STABLE
ora.REDO.dg
ONLINE ONLINE HOSTNAME-01-LD01 STABLE
ora.asm
ONLINE ONLINE HOSTNAME-01-LD01 Started,STABLE
ora.ons
OFFLINE OFFLINE HOSTNAME-01-LD01 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE HOSTNAME-01-LD01 STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE HOSTNAME-01-LD01 STABLE
--------------------------------------------------------------------------------
I make a note of where I am planning to keep new ORACLE BASE and what is my new GI HOME and current OraInventory.
oracle base ---> /GRIDHOME/grid/app/orabase
/GRIDHOME/grid/app/orabase
oracle home --> /GRIDHOME/grid/app/product/grid/19.3.0
orainventory ---> /GRIDHOME/oracle/oraInventory
28553832 and 27006180 where the pre-requite patches which need to be available on 12c GI home before we can go ahead with upgradation, hence we check that here –
grid@HOSTNAME-01-LD01:~$ opatch lsinventory | grep 28553832
21694632, 27309269, 23095976, 20115586, 28553832, 20883009, 21678268
grid@HOSTNAME-01-LD01:~$ opatch lsinventory | grep 27006180
18893463, 19514085, 25496699, 20758997, 27738131, 27006180, 27096108
grid@HOSTNAME-01-LD01:~$
Upgrade of GI from 12c to 19c – Activity Starts Here
Take down the details of all the databases which are running on the server and shutdown the databases.
ps -ef | grep pmon
ps -ef | grep tns
ps -ef | grep d.bin
df -kh
sqlplus / as sysdba @shutdown.sql;
We have used xming to take the session (you can use mobixterm ) to take GUI for installation. Unset all the Oracle related environmental variable.
grid@HOSTNAME-01-LD01:~/app/product/grid/19.3.0$ pwd
/GRIDHOME/grid/app/product/grid/19.3.0
grid@HOSTNAME-01-LD01:~/app/product/grid/19.3.0$ unset ORACLE_HOME
grid@HOSTNAME-01-LD01:~/app/product/grid/19.3.0$ unset ORACLE_BASE
grid@HOSTNAME-01-LD01:~/app/product/grid/19.3.0$ unset ORACLE_SID
grid@HOSTNAME-01-LD01:~/app/product/grid/19.3.0$
Go to New Oracle home -> And run ./gridSetup.sh
grid@HOSTNAME-01-LD01:~/app/product/grid/19.3.0$ ./gridSetup.sh
Launching Oracle Grid Infrastructure Setup Wizard...
The response file for this session can be found at:
/GRIDHOME/grid/app/product/grid/19.3.0/install/response/grid_2020-08-21_12-54-21PM.rsp
You can find the log of this install session at:
/GRIDHOME/oracle/oraInventory/logs/GridSetupActions2020-08-21_12-54-21PM/gridSetupActions2020-08-21_12-54-21PM.log
You can find the log of this install session at:
/GRIDHOME/oracle/oraInventory/logs/UpdateNodeList2020-08-21_12-54-21PM.log
You can find the log of this install session at:
/GRIDHOME/oracle/oraInventory/logs/UpdateNodeList2020-08-21_12-54-21PM.log
grid@HOSTNAME-01-LD01:~/app/product/grid/19.3.0$
Select Upgrade Oracle Grid Infrastructure and Press Next
Press Next
Here you have to put ORACLE_BASE and the ORACLE_HOME will be location where you have unzip the binaries.
If you know the ROOT password then you can provide in the script then GUI will take care of root scripts as well. I most of clients they will not provide root password to you, they will ask either go to their desk to fire the command or they will ask us to send an email to execute the root scripts. Press Next
Here it will do prechecks ( you can give –ignorePrereq to ignore this step )
Verification result shows what pre-requisite are not met and is it fixable or not. Here I ignored the checks as I have created 2 user with root id. Press Next
Here it complete the binary installation.
It will provide you rootupgrade.sh script to be executed.
If you have root you have to execute the script provided. Once script is executed and completed successfully, go back to the GUI and press OK
-bash-5.0# sh /GRIDHOME/grid/app/product/grid/19.3.0/rootupgrade.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /GRIDHOME/grid/app/product/grid/19.3.0
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: /GRIDHOME/grid/app/product/grid/19.3.0/crs/install/crsconfig_params
The log of current session can be found at:
/GRIDHOME/grid/app/orabase/crsdata/HOSTNAME-01-LD01/crsconfig/roothas_2020-08-21_01-05-59PM.log
2020/08/21 13:06:08 CLSRSC-595: Executing upgrade step 1 of 12: 'UpgPrechecks'.
2020/08/21 13:06:17 CLSRSC-595: Executing upgrade step 2 of 12: 'GetOldConfig'.
2020/08/21 13:06:27 CLSRSC-595: Executing upgrade step 3 of 12: 'GenSiteGUIDs'.
2020/08/21 13:06:27 CLSRSC-595: Executing upgrade step 4 of 12: 'SetupOSD'.
2020/08/21 13:06:28 CLSRSC-595: Executing upgrade step 5 of 12: 'PreUpgrade'.
ASM has been upgraded and started successfully.
2020/08/21 13:07:09 CLSRSC-595: Executing upgrade step 6 of 12: 'UpgradeAFD'.
2020/08/21 13:07:09 CLSRSC-595: Executing upgrade step 7 of 12: 'UpgradeOLR'.
clscfg: EXISTING configuration version 0 detected.
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
2020/08/21 13:07:21 CLSRSC-595: Executing upgrade step 8 of 12: 'UpgradeOCR'.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node HOSTNAME-01-LD01 successfully pinned.
2020/08/21 13:07:28 CLSRSC-595: Executing upgrade step 9 of 12: 'CreateOHASD'.
2020/08/21 13:07:32 CLSRSC-595: Executing upgrade step 10 of 12: 'ConfigOHASD'.
2020/08/21 13:07:33 CLSRSC-329: Replacing Clusterware entries in file '/etc/inittab'
2020/08/21 13:08:32 CLSRSC-595: Executing upgrade step 11 of 12: 'UpgradeSIHA'.
HOSTNAME-01-LD01 2020/08/21 13:10:22 /GRIDHOME/grid/app/orabase/crsdata/HOSTNAME-01-LD01/olr/backup_20200821_131022.olr 2676783881
HOSTNAME-01-LD01 2020/08/21 12:17:48 /GRIDHOME/grid/app/12.1.0.2/gridhome_1/cdata/HOSTNAME-01-LD01/backup_20200821_121748.olr 197228736
HOSTNAME-01-LD01 2016/02/05 17:02:52 /GRIDHOME/grid/app/12.1.0.2/gridhome_1/cdata/HOSTNAME-01-LD01/backup_20160205_170252.olr 0
2020/08/21 13:10:23 CLSRSC-595: Executing upgrade step 12 of 12: 'InstallACFS'.
2020/08/21 13:12:58 CLSRSC-327: Successfully configured Oracle Restart for a standalone server
-bash-5.0#
Once you press OK it will move to Post upgrade activity, where it will update Inventory, post cluster verification etc.
Final Screen 🙂
Post Checks
Once it is completed close the session. Do all the post checks for the cluster and check if resource are online.
grid@HOSTNAME-01-LD01:~/app/product/grid/19.3.0/bin$ ./crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE HOSTNAME-01-LD01 STABLE
ora.ARCH_QFC.dg
ONLINE ONLINE HOSTNAME-01-LD01 STABLE
ora.DATA.dg
ONLINE ONLINE HOSTNAME-01-LD01 STABLE
ora.DATA_BAH.dg
ONLINE ONLINE HOSTNAME-01-LD01 STABLE
ora.DATA_QFC.dg
ONLINE ONLINE HOSTNAME-01-LD01 STABLE
ora.LISTENER.lsnr
ONLINE ONLINE HOSTNAME-01-LD01 STABLE
ora.REDO.dg
ONLINE ONLINE HOSTNAME-01-LD01 STABLE
ora.asm
ONLINE ONLINE HOSTNAME-01-LD01 Started,STABLE
ora.ons
OFFLINE OFFLINE HOSTNAME-01-LD01 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE HOSTNAME-01-LD01 STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE HOSTNAME-01-LD01 STABLE
--------------------------------------------------------------------------------
grid@HOSTNAME-01-LD01:~/app/product/grid/19.3.0/bin$ ./crsctl query has softwareversion
Oracle High Availability Services version on the local node is [19.0.0.0.0]
grid@HOSTNAME-01-LD01:~/app/product/grid/19.3.0/bin$ ./crsctl query has releaseversion
Oracle High Availability Services release version on the local node is [19.0.0.0.0]
grid@HOSTNAME-01-LD01:~/app/product/grid/19.3.0/bin$
Now bring the database, listener and ask application to check the connectivity.