Patching Oracle 12.2 Grid Infrastructure before setting up a cluster

2017-08-09 Off By Markus Flechtner

One of the first steps after setting up an Oracle cluster is patching the Grid Infrastructure to the most current patchlevel. Usually this has to be done on all cluster nodes separately and requires some time and effort. But what about patching the software before setting up the cluster?

Updated and revised version of the post (31-AUG-2017, 15-JAN-2018)

I’ll show how this works with Oracle Grid Infrastructure 12.2:

Step 1: Prepare the GRID_HOME directory

mkdir -p /u00/app/grid/product/

Step 2: Unzip the image with the base release of the Grid Infrastructure Software

(this is the new installation method with Oracle 12c Release 2)

cd  /u00/app/grid/product/ 
unzip <SW-LOCATION>/software/oracle-software/RDBMS/12.2/

Step 3: Unzip the patch (as the owner of the GI software)

(in this case, I’ll install the Release Update 20170718)

cd /u00/app/oracle/stage
unzip <SW-LOCATION>/software/oracle-software/patches/psu/latest/

Step 4: Apply the patches

Note: Internally, the script uses OPatch. In my case, it worked fine with the version of OPatch which was delivered with the software. However, I got feedback from some readers that newer patches require a newer version of OPatch.

cd /u00/app/grid/product/
./ -silent -applyOneOffs /u00/app/oracle/stage/26133434/25586399/

./ -silent -applyOneOffs /u00/app/oracle/stage/26133434/26002778/

./ -silent -applyOneOffs /u00/app/oracle/stage/26133434/26123830/

Unfortunately, the installer wants to start the setup after installing a patch

grid@node1:/u00/app/grid/product/ [grid12201] ./ -silent -applyOneOffs /u00/app/oracle/stage/26133434/25586399/ -noconfig
Preparing the home to patch...
Applying the patch /u00/app/oracle/stage/26133434/25586399/...
Successfully applied the patch.
The log can be found at: /tmp/GridSetupActions2017-08-09_05-45-33PM/installerPatchActions_2017-08-09_05-45-33PM.log
Launching Oracle Grid Infrastructure Setup Wizard...

[FATAL] [INS-40426] Grid installation option has not been specified.
 ACTION: Specify the valid installation option.

And the “-noconfig” option does not solve this issue. However, you can ignore this message and you can continue with the other patches.

It’s a good idea to create a new “Golden Image” with all patches included for future installations before you continue with the usual setup.
According to you need approximately 22 GB of free disk space in the destination directory.

grid@node1:/u00/app/grid/product/ [grid12201] ./ -createGoldImage -destinationlocation /u00/app/oracle/stage/grid_home_12201_with_RU_20170718 -silent
Launching Oracle Grid Infrastructure Setup Wizard...

[FATAL] [INS-32707] The specified destination location (/u00/app/oracle/stage/grid_home_12201_with_RU_20170718) does not have enough free space.
 ACTION: Provide a destination location path with at least (21,092) MB of free space.

OK, let’s choose another filesystem:

mkdir -p <SW-LOCATION>/temp/grid_home_12201_with_RU_20170718
./ -createGoldImage -destinationlocation <SW-LOCATION>/temp/grid_home_12201_with_RU_20170718 -silent

grid@node1:/u00/app/grid/product/ [grid12201] ./ -createGoldImage -destinationlocation <SW-LOCATION>/temp/grid_home_12201_with_RU_20170718 -silent
Launching Oracle Grid Infrastructure Setup Wizard...

Successfully Setup Software.
Gold Image location: <SW-LOCATION>/temp/grid_home_12201_with_RU_20170718/

grid@node1:/u00/app/grid/product/ [grid12201] ls -l <SW-LOCATION>/temp/grid_home_12201_with_RU_20170718/
-rw-r--r--. 1 500 1000 4010949776 Aug 9 18:22 <SW-LOCATION>/temp/grid_home_12201_with_RU_20170718/

(OK, that’s less than 22 GB)

Step 5: run

After that you can continue with the ususal setup procedure:




./ -silent -responseFile ..


Step 6: Verification

grid@node1:~/ [rdbms12201] +ASM1
grid@node1:~/ [+ASM1] $ORACLE_HOME/OPatch/opatch lspatches
26123830;DATABASE RELEASE UPDATE: (26123830)
26002778;OCW Patch Set Update : (26002778)
25586399;ACFS Patch Set Update : (25586399)

OPatch succeeded.

It works …



Update 30-AUG-2017

I received a mail from my colleague Ludovico Caldara:

I wanted to “add” that the creation of the golden image skips the empty directories, so when I used the golden image for an upgrade I got an error of missing directories.

mkdir -p crs/log crs/init evm/init log/crs racg/dump srvm/log cdata/localhost

I then created them and re-run -> everything OK.

I could not verify this issue so far.



  • How to Apply a Grid Infrastructure Patch Before root script ( or is Executed? (Doc ID 1410202.1) (the note contains instructions for Oracle Database 12c Release 1, too)


Thanks to Christian Gohmann and Mathias Zarick for their valuable input on this topic.

Ad (Amazon Link):