In this article , we will provide steps for rolling back a patch in non-rac standalone database.

PATCH TO BE ROLLED BACK - 27105253 - Database Jan 2018 Release Update (DB RU) 12.2.0.1.180116

 

1. Check the existence of patch in oracle home inventory.

$ORACLE_HOME/OPatch/opatch lsinventory | grep 27105253
Patch  27105253     : applied on Thu Apr 05 10:04:50 AST 2018
Patch description:  "Database Release Update : 12.2.0.1.180116 (27105253)"

2. Shutdown services running from oracle_home(database , listener)

shutdown immediate;

lsnrctl stop LISTENER_TEST

3. Rollback the patch.

$ORACLE_HOME/OPatch/opatch rollback -id 27105253

$ORACLE_HOME/OPatch/opatch rollback -id 27105253

Oracle Interim Patch Installer version 12.2.0.1.12
Copyright (c) 2018, Oracle Corporation.  All rights reserved.


Oracle Home       : /oracle/app/oracle/product/12.2.0/dbhome_3
Central Inventory : /oracle/app/oraInventory
   from           : /oracle/app/oracle/product/12.2.0/dbhome_3/oraInst.loc
OPatch version    : 12.2.0.1.12
OUI version       : 12.2.0.1.4
Log file location : /oracle/app/oracle/product/12.2.0/dbhome_3/cfgtoollogs/opatch/opatch2018-04-05_12-03-38PM_1.log


Patches will be rolled back in the following order:
   27105253
The following patch(es) will be rolled back: 27105253

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/oracle/app/oracle/product/12.2.0/dbhome_3')


Is the local system ready for patching? [y|n]
y
User Responded with: Y

Rolling back patch 27105253...

RollbackSession rolling back interim patch '27105253' from OH '/oracle/app/oracle/product/12.2.0/dbhome_3'

Patching component oracle.network.rsf, 12.2.0.1.0...

Patching component oracle.rdbms.deconfig, 12.2.0.1.0...

Patching component oracle.tfa, 12.2.0.1.0...

Patching component oracle.rdbms, 12.2.0.1.0...



Patching component oracle.rdbms.util, 12.2.0.1.0...

Patching component oracle.rdbms.dbscripts, 12.2.0.1.0...

Patching component oracle.xdk.parser.java, 12.2.0.1.0...

Patching component oracle.has.deconfig, 12.2.0.1.0...

Patching component oracle.xdk.rsf, 12.2.0.1.0...

Patching component oracle.ctx.rsf, 12.2.0.1.0...

Patching component oracle.rdbms.rman, 12.2.0.1.0...

Patching component oracle.rdbms.dv, 12.2.0.1.0...

Patching component oracle.rdbms.oci, 12.2.0.1.0...

Patching component oracle.rdbms.crs, 12.2.0.1.0...

Patching component oracle.precomp.common, 12.2.0.1.0...

Patching component oracle.oracore.rsf, 12.2.0.1.0...

Patching component oracle.ctx, 12.2.0.1.0...

Patching component oracle.xdk, 12.2.0.1.0...

Patching component oracle.nlsrtl.rsf, 12.2.0.1.0...

Patching component oracle.rdbms.rsf, 12.2.0.1.0...
Deleting "kgcs.o" from archive "/oracle/app/oracle/product/12.2.0/dbhome_3/lib/libgeneric12.a"

Patching component oracle.ons, 12.2.0.1.0...

Patching component oracle.rdbms.lbac, 12.2.0.1.0...

Patching component oracle.precomp.lang, 12.2.0.1.0...

Patching component oracle.rdbms.rsf.ic, 12.2.0.1.0...

Patching component oracle.sdo, 12.2.0.1.0...
RollbackSession removing interim patch '27105253' from inventory
Log file location: /oracle/app/oracle/product/12.2.0/dbhome_3/cfgtoollogs/opatch/opatch2018-04-05_12-03-38PM_1.log

OPatch succeeded.


4. Now start the database:

startup 

lsnrctl start LISTENER_TEST


5. Now run the post rollback script.

cd $ORACLE_HOME/OPatch

./datapatch -verbose

./datapatch -verbose


SQL Patching tool version 12.2.0.1.0 Production on Thu Apr  5 12:08:00 2018
Copyright (c) 2012, 2017, Oracle.  All rights reserved.

Log file for this invocation: /oracle/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_18582_2018_04_05_12_08_00/sqlpatch_invocation.log

Connecting to database...OK
Bootstrapping registry and package to current versions...done
Determining current state...done

Current state of SQL patches:
Bundle series DBRU:
  Not installed in the binary registry and ID 180116 in the SQL registry

Adding patches to installation queue and performing prereq checks...
Installation queue:
  The following patches will be rolled back:
    27105253 (DATABASE RELEASE UPDATE 12.2.0.1.180116)
  Nothing to apply

Installing patches...
Patch installation complete.  Total patches installed: 1

Validating logfiles...
Patch 27105253 rollback: SUCCESS
  logfile: /oracle/app/oracle/cfgtoollogs/sqlpatch/27105253/21862380/27105253_rollback_POCD_2018Apr05_12_08_15.log (no errors)
SQL Patching tool complete on Thu Apr  5 12:10:33 2018

6. Check the registry table for the status:

SQL> select patch_id,status,action,description from dba_registry_sqlpatch;

  PATCH_ID STATUS          ACTION
---------- --------------- ---------------
DESCRIPTION
--------------------------------------------------------------------------------
  27105253 SUCCESS         APPLY
DATABASE RELEASE UPDATE 12.2.0.1.180116

  27105253 SUCCESS         ROLLBACK
DATABASE RELEASE UPDATE 12.2.0.1.180116


Rollback is successful.:)

datapatchOPATCHrollback ORACLE 12C


Related Topics

How to flashback a Pluggable database ( PDB) in oracle 12.2
Perform Flashback in pluggable database(PDB) in oracle 12.2
How to create encrypted tablespace in PDB( oracle 12c)
Rollback database patch in oracle 12c
ENABLE_PARALLEL_DML hint in oracle 12c
OUTBOUND_DBLINK_PROTOCOLS in oracle 12.2
How to run expdp in pluggable database(PDB)
TRUST_EXISTING_TABLE_PARTITIONS in oracle 12.2 datapump
Apply patch on oracle 12.2 database ( Release update)

You May Also Like

How to flashback a Pluggable database ( PDB) in oracle 12.2
How to find cpu and memory information of oracle database server
Steps for upgrading weblogic 12.1.2 to 12.1.3
Shell script to delete old archives using RMAN
Clone a database using dbca command in oracle 19c -New feature
ENABLE_DDL_LOGGING in oracle 12c
How to get the execution plan for a SQL between two AWR snapshots
COLS & COLSEXCEPT FILTER in goldengate
OGG-01028 partial record at sequence extract abended
orapwd tool for password file in oracle

From This Website

how to Print execution time of tasks in ansible
TNS-01106: Listener using listener name has already been started
DEFERRED_SEGMENT_CREATION parameter in oracle
How to stop MySQL on Linux and Windows
ORA-32774: more than one file was specified for bigfile tablespace
Shell script to monitor lag in standby datbase using dgmgrl
How to install oracle client in silent mode using response file
ERROR: No checkpoint table specified for ADD REPLICAT
how to change archivelog destination in oracle
Shell script for monitoring blocking sessions