Patch Oracle GI and DB Software Only And Create Gold Image

At work I had to install (but not fully) Oracle Software (GI and DB) for AMI (Amazon Machine Image). Downloading and unzipping software is easy but we wanted to have Oracle Software patched. So every time AMI is deployed, we won’t have to patch it. With 19c we can even create a gold image of patched software.

In this post I’ll be sharing steps to patch manually Oracle Software only. The Oracle Software is not completely installed, just unzipped. These steps use 19.5 RU but same steps can be followed for latest RU.

To apply patch manually, you have to look into README file for the patch number and figure out which patch will be applied to GI and which one to DB home.

Before we start, here are my GI home and DB home location. Also the location of 19.5 RU.

GI Home: /grid/product/19/grid_1
DB Home: /oracle/product/19/dbhome_1
Patch location: /oradata/19.5

Download the 19.5 Combo RU with GI.

Patch 30133178 - Combo of OJVM Component Release Update 19.5.0.0.191015 + Grid Infrastructure Oct 2019 Release Update 19.5.0.0.191015

Following information is from 19.5 GI RU readme file.

Patch 30116789 - GI Release Update 19.5.0.0.191015
Patch NumberDescriptionApplicable Homes
30125133Database Release Update 19.5.0.0.191015Only DB Home for non-Oracle RAC setup. Both DB Homes and Grid Home for Oracle RAC setup.
30122149OCW Release Update 19.5.0.0.191015Both DB Homes and Grid Home
30122167ACFS Release Update 19.5.0.0.191015Only Grid Home
29401763Tomcat Release Update 19.0.0.0.0Only Grid Home

Patch GI HOME

From the table above we can see that all four patches need to be applied to GI. So lets apply them as owner of software (i.e. oracle)

/grid/product/19/grid_1/OPatch/opatch apply -oh /grid/product/19/grid_1 -local /oradata/19.5/30133178/30116789/30122149

/grid/product/19/grid_1/OPatch/opatch apply -oh /grid/product/19/grid_1 -local /oradata/19.5/30133178/30116789/30122167

/grid/product/19/grid_1/OPatch/opatch apply -oh /grid/product/19/grid_1 -local /oradata/19.5/30133178/30116789/30125133

/grid/product/19/grid_1/OPatch/opatch apply -oh /grid/product/19/grid_1 -local /oradata/19.5/30133178/30116789/29401763

JVM

Now we need to apply the JVM patch.

/grid/product/19/grid_1/OPatch/opatch apply -oh /grid/product/19/grid_1 -local /oradata/19.5/30133178/30128191

 Patch DB HOME

Only two patches are needed for Database home.

/oracle/product/19/dbhome_1/OPatch/opatch apply -oh /oracle/product/19/dbhome_1 -local /oradata/19.5/30133178/30116789/30125133

/oracle/product/19/dbhome_1/OPatch/opatch apply -oh /oracle/product/19/dbhome_1 -local /oradata/19.5/30133178/30116789/30122149

JVM

Now we need to apply JVM patch to Database home.

/oracle/product/19/dbhome_1/OPatch/opatch apply -oh /oracle/product/19/dbhome_1 -local /oradata/19.5/30133178/30128191

Create Gold Image

Once patches have been applied, we can now create the gold image of patched software.

GI Gold Image

cd /grid/product/19/grid_1
./gridSetup.sh -creategoldimage -destinationlocation /oradata/19.5 -silent
Launching Oracle Grid Infrastructure Setup Wizard...

Successfully Setup Software.
Gold Image location: /oradata/19.5/grid_home_2019-12-20_12-05-06PM.zip

DB Gold Image

cd /oracle/product/19/dbhome_1
./runInstaller -createGoldImage -destinationLocation /oradata/19.5 -silent
Launching Oracle Database Setup Wizard...

Successfully Setup Software.
Gold Image location: /oradata/19.5/db_home_2019-12-20_12-13-00PM.zip

Gold image can now be used to install existing servers or in AMI.

Cheers 😀

Related Posts

One thought on “Patch Oracle GI and DB Software Only And Create Gold Image

Leave a Reply

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