Upgrading Oracle Grid Infrastructure 12cR2 to Oracle Grid Infrastructure 18cR1 – With Little Hack (Including how you can get it).

Upgrading Oracle Grid Infrastructure 12cR2 to Oracle Grid Infrastructure 18cR1 – With Little Hack (Including how you can get it).

Though 18c is not yet officially available for On-Premises except for Exadata, we will going to do it with little hack, and let’s see if it works.


1. Download Oracle Grid Infrastructure 18c setup from Oracle e-Delivery.


  • Enter your credentials and Sign In or Create an Account if you don’t have any.


  • Search for Oracle Database (Exadata as shown in the below screenshot and click on highlighted result.


  • From the search result, Click on Oracle Database Grid Infrastructure (Exadata and SuperCluster) 18.0.0.0 and add it to cart. after adding it click on Selected Software as shown in the screenshot.


  • Select Architecture from the drop-down menu and click on Continue.


  • Accept EULA and click on Continue.


  • Tick the checkbox and click on Download.


  • Click on Save.
  • And it will start downloading in a separate window.


2. Once it is downloaded, copy it into the directory which you want as your 18c grid home.

[oracle@dbnode1 18.0.0]$ pwd
/u02/app/grid/product/18.0.0/gihome_1
[oracle@dbnode1 18.0.0]$ ls -lrth | grep grid
-rwxr-x---. 1 oracle oinstall 3.3K Mar 8 2017 gridSetup.sh

Now, we have grid setup in directory /u02/app/grid/product/18.0.0/gihome_1 , before proceed with the installation. let’s check current Grid Infrastructure version.

[oracle@dbnode1 ~]$ crsctl query has releaseversion
Oracle High Availability Services release version on the local node is [12.2.0.1.0]
[oracle@dbnode1 ~]$ crsctl query has softwareversion
Oracle High Availability Services version on the local node is [12.2.0.1.0]

As we can see, the current version of Grid Infrastructure is 12.2.0.1.0 that is 12cR2.


  • Let’s initiate installation wizard by running below command.
[oracle@dbnode1 ~]$ /u02/app/grid/product/18.0.0/gihome_1/./gridSetup.sh
Launching Oracle Grid Infrastructure Setup Wizard...


  • Make sure you bring down your all database instance(s) before initiating upgrade. If you are trying to upgrade grid without bringing down database instance, you will get below prompt.

So now bring down all the database instance(s) and then click on Yes.


  • Select Upgrade Oracle Gird Infrastructure, and click NEXT


  • Select if you’ve configured EM(Cloud Control) agent on you server, else without selecting any option click NEXT.


  • As we can see, our Grid Infrastructure Home is by default the location where we’ve copied grid setup, verify Oracle base for Grid Infrastructure and click NEXT.


  • Here you can provide your root credentials which will automatically run root script during installation, optionally you can use sudo as well.


  • Here we get warning for Physical Memory in prerequisite check, as Oracle recommends 8 GB of minimum physical memory for Grid Infrastructure. Here we’ll ignore this, let’s ignore and click NEXT.

  • Click on Yes to ignore.


  • Summary screen, verify your selections and modify if needed, then click NEXT.


  • Installation has began now.


  • Here we get the prompt to run root script with using the credentials which we’ve provided earlier, let’s click Yes.


  • Installation wizard is now running the root script.


  • And here installation finished.

Grid Upgrade 12c to 18c


3. Login to Oracle Grid Infrastructure 18cR1.

  • Set new ORACLE_HOME path in .bash_profile_ASM
[oracle@dbnode1 ~]$ vi .bash_profile_ASM
  • Change ORACLE_HOME pointing to new 18c binaries and save and exit.
#ASM Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_HOSTNAME=dbnode1.demunix.com; export ORACLE_HOSTNAME
ORACLE_BASE=/u02/app/grid; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/18.0.0/gihome_1; export ORACLE_HOME
ORACLE_SID=+ASM; export ORACLE_SID

PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
echo "ASM PROFILE LOADED"

[ESC] > :wq > Enter (to save and exit)

  • Load .bash_profile_ASM to load new changes.
[oracle@dbnode1 ~]$ . .bash_profile_ASM
ASM PROFILE LOADED
  • Check if new ORACLE_HOME is set or not.
[oracle@dbnode1 ~]$ echo $ORACLE_HOME
/u02/app/grid/product/18.0.0/gihome_1

Cool, our new bash_profile is now pointing to new ORACLE_HOME


  • Let’s check Grid Infrastructure version after upgrade.
[oracle@dbnode1 ~]$ crsctl query has releaseversion
Oracle High Availability Services release version on the local node is [18.0.0.0.0]
[oracle@dbnode1 ~]$ crsctl query has softwareversion
Oracle High Availability Services version on the local node is [18.0.0.0.0]

Cool, as we can see, it’s showing now version 18.0.0.0 i.e. 18cR1


  • Let’s now invoke SQL*Plus and check if we can login to Oracle Grid Infrastructure 18cR1.
[oracle@dbnode1 ~]$ sqlplus / as sysasm

SQL*Plus: Release 18.0.0.0.0 Production on Wed Mar 14 02:57:27 2018
Version 18.1.0.0.0

Copyright (c) 1982, 2017, Oracle. All rights reserved.

Connected to an idle instance.

Great! we’re connected to Grid Infrastructure 18c.

  • Let’s startup the instance.
SQL> startup
ORA-12754: Feature 'startup' is disabled due to missing capability 'Runtime Environment'.

Oops! ORA-12754, Here hack comes. as we know Oracle 18c is not yet offcially available for On-Premises system except Exadata. Oracle will not allow us to start the instance, though we have installed it.

  • Need not panic, I have a trick which can let us Startup the instance anyway. To get this done we need to add one parameter in our parameter file. i.e. init+ASM.ora.
[oracle@dbnode1 ~]$ vi init+ASM.ora
  • Add hidden parameter “_exadata_feature_on=true” in parameter file and then save and exit.
+ASM.__oracle_base='/u02/app/grid'#ORACLE_BASE set from in memory value
+ASM.asm_diskgroups='FRA1'#Manual Mount
*.asm_diskstring='/dev/oracleasm/disks/*'
*.asm_power_limit=1
*.large_pool_size=12M
*.remote_login_passwordfile='EXCLUSIVE'
_exadata_feature_on=true

[ESC] > :wq > Enter (to save and exit)

  • Let’s now again invoke SQL*Plus and check if we can start the instance using modified parameter file.
SQL> startup pfile='/home/oracle/init+ASM.ora';
ASM instance started

Total System Global Area 1136934472 bytes
Fixed Size 8666696 bytes
Variable Size 1103101952 bytes
ASM Cache 25165824 bytes

Note : If your startup or shutdown command hungs, set proceeses=1000 with below command.

SQL>alter system set processes=1000;

Here you go. Instance started now. We have successfully upgraded Oracle Grid Infrastructure 12cR2 to Oracle Grid Infrastructure 18cR1 on our On-Premises database.

 

Peace 🙂