Home » Oracle » Oracle Ebuisness Suite » How to rollback the Oracle patch

How to rollback the Oracle patch

We apply lot of patches to Oracle product to add new feature, to rectify bugs. Sometime the patch do not work as expected and we need to rollback the oracle patch. I am presenting here the rollback cases for different type of Oracle patches

Rollback of Database patches

Database patches are applied using opatch. Each database patch readme consists of the steps to deinstall the patch.
General steps to apply
opatch apply

General steps to rollback
opatch rollback -id <patch no>

Rollback of application server patches

Application server patches like for 10.1.2/10.1.3 are also opatches. Each application server readme consists of the steps to deinstall the patch.

General steps to apply
opatch apply

General steps to rollback
opatch rollback -id <patch no>

Rollback of Oracle Application 11i/R12.0/R12.1 patches

Backout of Oracle Application patches depends on the complexity and type of the patch.Every patch makes a backup directory of files which it is going to modify.we can check the backup directory to find out what all files get changed by the patches.

We need to analyze both the adpatch log and lgi files and u driver,readme.txt file to ascertian what all things patch has done to the system.

In general patch application does following things to database and application filesystem

1)Copy files into installation area
2)Forcecopy files into installation area
3)Archive object modules in the product libraries
4)Create directories if required
5)Relink executables of modules
6)Perform second half of mirrored copies
7)Update Oracle Applications java Files
8)Run SQL and EXEC scripts in parallel
9)Generate Forms library files
10)Generate Forms Menu files
11)Generate Forms executables
12)Generate Report libraries
13)Generate Reports
14)Generate Graphics libraries
15)Generate Graphics
16)Generate Messages
17)Generate Workflow resource files
18)Update Patch History database

See also  What is voting disks in RAC

We need to see which all things it has done.Depending on the actions.we need to find out backout plan.

Following are the  backup out plan for different types of files.
1 pls files:We can revert back them from backup directory and apply them to the database
2 fmb , pll,rdf,msb files: We can revert back them from backup directory and generate them from adadmin.
3 java files: We can revert back them from backup directory and do force generation of jar files through adadmin.
4 object modules:We can revert back them from backup directory and archive them and then relink the executables.
5. image files: we can replace them from the backup directory
6) if any new index is created, we can drop it

This is a limited set of things. Things will change with each patch. So we need to check the patch and analyze and then decide about the rollback plan.

There are lot of database action which cannot be backouts like addition of new object or adding a column to a table using an odf file,update to the column, changing architecture,adding new rows,uploading some data,plsql procedure executions etc.

For complex patches like Rollups, Minipacks,Maintenance pack,Family pack which does lot of updates to the database.,there might be no way to rollback  the oracle patch.In those it is better to restore from system backup

It is always advisable to have backup of system before application of patches

Some important to consider for rollback of application patches

  1.  Backing out of patch should be taken in same order as application of patch i.e Applying first the C part then D part and then G part.
  2. It should be mentioned that various oracle database tables will still show the patch was applied. ad_bugs, ad_applied_patches, ad_patch_drivers, etc.
  3. If multiples patches are applied  and you are doing rollback of few patches only, then consideration should be to files common to the patch which are not getting rollback.
See also  How to work with date Functions in Oracle sql

I hope you like this post on  How to rollback the oracle patch. Please do provide feedback to improve

Leave a Comment

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

Scroll to Top