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

You May Also Like

Oswatcher tool for collecting server diagnostic information
Oracle database Security Assessment Tool
Hive Installation with derby
Flashback primary database in dataguard environment
Purge AUD$ table using DBMS_AUDIT_MGMT
Steps for changing public hostname for a standalone grid infrastructure
sec_case_sensitive_logon parameter in oracle
How to get the execution plan for a SQL between two AWR snapshots
ESTIMATE REQUIRED DISK SPACE FOR EXPORT USING estimate_only
Script to get cpu usage and wait event information in oracle database

From This Website

Shared Pool Advisory in oracle
Shell script to report failed login attempt in oracle
How to flashback a RAC database
How to use oratop tool for oracle database monitoring
How to install postgres database on mac os/linux
sec_case_sensitive_logon parameter in oracle
resumable_timeout parameter in oracle database
Oswatcher tool for collecting server diagnostic information
Ansible script to run script on remote server and fetch the output
How to generate AWR report in RAC