Oracle Patches apply update-22


Oracle Patches

Patches are used to correct the bugs. It will change the last number of the version. to – PSU


10g - version – alter system flush shared_pool/buffer_cache will not work

11g - version – $nid DB newid will not work. (Changing DB ID)


Types of Patch:

  1. Opatch – Oracle patch (It will fix only one bug)
  2. CPU – Critical patch update (Every quarter once)
  3. PSU – Patch set update (Bundle patch) to


Opatch CPU PSU
One off patch Security patch Bundle patch
Size will be in KB Size will be min 80 MB to Max 150 MB Size will be min 250 MB to Max 280 MB
Released every quarter  once
It will change the no to –

11 – Major Database release number

2 – Database maintenance

0 – Application server

3 – Component specific

0 – platform specific

Note: To apply a patch we need downtime. Best practice PSU patch apply will be good, since it has O+CPU.

There is one more called “Migration patch” – It is a JDBC driver related one – no downtime needed for this.





For all patches apply and command will be same.


Go to oracle website MOS — Choose type as patches  — Search and download.

Download the patch from oracle site – (Need a licensed credential)

Go to — patches update — product family — RDBMS servers –Enter Version –Platform

Choose the type –Patches. Search & download

If you know the patch number  — Go to — patches update — product number —p1234

It will download & unzip two files. P6880880 – is OPatch patch, default it will come.

The patch always applied in both places.

  1. Oracle binaries/ software
  2. Database

Find out any existing patch or oracle version is equal and higher with the  OPatch.

Generally, we need an equal or higher version of OPatch.

$ export ORACLE_HOME =/opt/oracle/product/ –If you have a right bash_profile skip it.

$ /opt/oracle/product/  lsinventory

Oracle version :

OPatch version:

Apply a patch for binaries

$ cd /opt

$ unzip

$ ls

$ cd /opt/oracle/product/

$ mv OPatch OPatch_old – Rename the OH folder

$ cd /opt

$ cp –r Opatch /opt/oracle/product/

Now check the OPatch version

$ /opt/oracle/product/   lsinventory

OPatch version:


$ cd /opt

$ unzip

$ ls

$ cd to that patch folder

Shutdown the DB

$ /opt/oracle/product/ apply  – local

Y: — enter — Y: — OPatch applied susscefully.

Local – It’s mainly for RAC. But do it as a best practice. – Optional

Apply – For single patch & napply – For subset of patch

For PSU – napply

Now check version

$ /opt/oracle/product/   lsinventory

Patch number 1234

Date : Today date



Apply a patch for Databases

We need to apply per database, if it has more than one.

$ export ORACLE_SID = Muthu

Sql> conn sys/sys as sysdba

Sql> startup

Sql> @?/sqlpatch/1234/catpostinstall.sql – normal

Sql> @?/sqlpatch/1234/catpostinstall.sql – PSU

Sql> @?/sqlpatch/1234/catCPU.sql – CPU

@ – to  run ? – Oracle_Home

Then remaining databases …

Verify the patch

Sql> select * from dba_registry_history;

Bundel – Psu etc

Data – Today date


Rollback Patch

For Database

Sql> @?/sqlpatch/1234/catpostdeinstall.sql – normal

Sql> @?/sqlpatch/1234/catpostdeinstall.sql – PSU

Sql> @?/sqlpatch/1234/catCPUdeinstall.sql – CPU


For Binaries

$ /opt/…(OH)/OPatch/opatch   rollback 1234

:Y–enter –Y:

I’m currently working as a SQL server DBA in one of the top MNC. I’m passionate about SQL Server And I’m specialized in Administration and Performance tuning. I’m an active member of SQL server Central and MSDN forum. I also write articles in SQL server Central. For more Click here

Leave a Reply

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

+ 34 = 42