Friday, November 18, 2016

RDBMS-- Applying DB PSU and OJVM PSU to a Single Instance Oracle Database

In this blog post, I will show you the way and methodology for installing DB PSU and OJVM PSU to a Single Instance 11.2.0.4 Oracle Database.

First let's see how we can find PSU and OJVM patches.
Again, this post is only for 11.2.0.4 , but the method and the logic is the same for almost all the releases.

In order to find the patches, we use Oracle support .
We choose Patch  Search > Recommended Patch Advisor. Then we choose our platform , release and Product, which is the Oracle Database bytheway, and click the search button ,as depicted in the following screenshot;



That's all we need to do, as the advisor will list DB PSU, CPU(SPU) and the OJVM PSU for our database release.
Note that, SPU was Formerly known as Critical Patch Update. The program name which delivers SPUs will still be called Critical Patch Update,

The only thing that we need to do at this point is to download the patches and apply them by following their readme files.

Note that, if we apply PSU, we can't apply CPU(SPU) and we don't need to actually. (CPU can be though as a subset of PSU.)


Well, after learning how to find our PSU and CPU patches, let's take a look at the process of installing them.

Note that, I recommend applying DB PSU and OJVM PSU . These two are enough if we are on a stable and supported release. In addition, always apply DB PSU and OJVM PSU after a release upgrade. If there are fixes for your newly upgraded release, you should apply them , why not upgrading to a better state , right?

So, the following procedure is written for 11.2.0.4 Oracle Databases which are running on Linux x86-64 platform.

Patch 24006111 - Database Patch Set Update 11.2.0.4.161018 (Includes CPUOct2016) ***PSU
-------------------------------------------------------------------------------------
*Shutdown listener and Databases running from target ORACLE HOME
*Add opatch to the path ($PATH env variable)
export PATH=$PATH:$ORACLE_HOME/OPatch

*CD INTO PATCH DIRECTORY
/home/oracle/oracle_11204/psu/24006111

*PREREQ & CONFLICT CHECK
[oracle@coinactdbtst 24006111]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/app/oracle/product/11.2.0.4/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0.4/db_1/oraInst.loc
OPatch version    : 11.2.0.3.4
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0.4/db_1/cfgtoollogs/opatch/opatch2016-11-18_09-34-37AM_1.log

Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.

--check readme if conflicts are reported, the action plan (what to do) is in the read me.

*DOWNLOAD LATEST OPATCH and install in to the target ORACLE_HOME

The patch number of Opatch is 6880880
We download it, we delete the old OPatch directory in ORACLE_HOME and then unzip the downloaded zip in to the ORACLE_HOME.. That's all for installing new version of OPatch.
OPatch Version: 11.2.0.3.15 is enough for this work.

*WE APPLY PSU using Opatch apply
export PATH=$PATH:$ORACLE_HOME/OPatch
cd /home/oracle/oracle_11204/psu/24006111
opatch apply

The opatch should complete with the following messages:

Composite patch 24006111 successfully applied.
OPatch succeeded.

*RUN CAT BUNDLE & UTLRP IN THE DATABASES WHICH SUPPOSE TO RUN FROM THE UPGRADED ORACLE HOME

cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> @utlrp.sql
SQL> QUIT

*CHECK PSU VERSION

select *
from sys.registry$history
where bundle_series = 'PSU'
order by action_time;

opatch lsinventory -bugs_fixed | egrep -i 'PSU|DATABASE PATCH SET UPDATE|APPLIED'

Patch 24433711 - Database Security Patch Update 11.2.0.4.161018 (CPUOct2016)  ***SPU
-------------------------------------------------------------------------------------
No need for this patch, as 24006111 fix the same issues.

Patch 24315821 - Oracle JavaVM Component 11.2.0.4.161018 Database PSU (Oct2016)
-------------------------------------------------------------------------------------
*CD INTO PATCH DIRECTORY
/home/oracle/oracle_11204/ojvm_psu/24315821

*PREREQ & CONFLICT CHECK
[oracle@coinactdbtst 24315821]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 11.2.0.3.15
Copyright (c) 2016, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/app/oracle/product/11.2.0.4/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0.4/db_1/oraInst.loc
OPatch version    : 11.2.0.3.15
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0.4/db_1/cfgtoollogs/opatch/opatch2016-11-18_10-56-25AM_1.log

Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.

--check readme if conflicts are reported, the action plan (what to do) is in the read me.

*WE APPLY PSU using Opatch apply
export PATH=$PATH:$ORACLE_HOME/OPatch
cd /home/oracle/oracle_11204/ojvm_psu/24315821
opatch apply

*RUN SQL PORTION OF THE PATCH & UTLRP IN THE DATABASES WHICH SUPPOSE TO RUN FROM THE UPGRADED ORACLE HOME

cd $ORACLE_HOME/sqlpatch/24315821
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> startup upgrade  (shutdown first, if the database is already started)
SQL> @postinstall.sql
SQL> shutdown
SQL> startup
SQL> exit
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql

*CHECK PSU VERSION

select * from sys.registry$history
where version like '%OJVM%'
order by action_time;

opatch lsinventory -bugs_fixed | egrep -i 'PSU|DATABASE PATCH SET UPDATE|APPLIED'

No comments :

Post a Comment

If you will ask a question, please don't comment here..

For your questions, please create an issue into my forum.

Forum Link: http://ermanarslan.blogspot.com.tr/p/forum.html

Register and create an issue in the related category.
I will support you from there.