Summary
1. Download the patch from oracle official wesbite
2. Update OPATCH utility
3. Upgrade OPATCH
4.Verify the Database Current version
5. Rollback Plan
6. Unzip the Patch
7. Stop all Database services
1. Download the patch from Oracle official wesbite:
a.You must go throw the README file
b.Download Patch p34133642_19.16.00_Linux-x86-64
c.Make sure the minimum OPATCH version is 12.2.0.1.30
You must use the OPatch utility version 12.2.0.1.32 or later to apply this patch. Oracle recommends that you use the
latest released OPatch version for 12.2, which is available for download from My Oracle Support patch 6880880 by
selecting ARU link for the 12.2.0.1.0 OPatch release.
2. Update OPATCH utility:
---------------------
** Check OPATCH version:
$cd $ORACLE_HOME/OPatch
$./opatch version
OPatch Version: 12.2.0.1.17
OPatch succeeded.
In my case the OPATCH version is 12.2.o.1.17 and we need the minimum OPATCH version to be 12.2.0.1.32.
$ cd $ORACLE_HOME/
$ cp -r OPatch OPatch_bkp
VERIFY the Patch;
OPatch]$ ./opatch lsinventory
3. Upgrade OPATCH:
---------------
Upgrade the OPATCH utility, just unzip the newly downloaded opatch utility version in ORACLE_HOME directly.
$ cd /home/oracle/patches
$ ls -ltr
$ unzip p6880880_190000_Linux-x86-64.zip -d $ORACLE_HOME/
Once the above command is completed then check the OPATCH version again.
$cd $ORACLE_HOME/OPatch
[oracle@primary OPatch]$ ./opatch version
OPatch Version: 12.2.0.1.39
OPatch succeeded.
4. Verify the Database Current version
-----------------------------------
$ sqlplus / as sysdba
SQL> select BANNER_FULL from v$version;
BANNER_FULL
--------------------------------------------------------------------------------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> select patch_uid,patch_id,SOURCE_VERSION, TARGET_VERSION, action, status,action_time,description
from dba_registry_sqlpatch; 2
PATCH_UID PATCH_ID SOURCE_VERSION TARGET_VERSION ACTION
---------- ---------- --------------- --------------- ---------------
STATUS
-------------------------
ACTION_TIME
---------------------------------------------------------------------------
DESCRIPTION
--------------------------------------------------------------------------------
22862832 29517242 19.1.0.0.0 19.3.0.0.0 APPLY
SUCCESS
11-JUL-23 05.37.38.976783 PM
Database Release Update : 19.3.0.0.190416 (29517242)
SQL> select patch_id, status, Action,Action_time from dba_registry_sqlpatch order by action_time;
PATCH_ID STATUS ACTION
---------- ------------------------- ---------------
ACTION_TIME
---------------------------------------------------------------------------
29517242 SUCCESS APPLY
11-JUL-23 05.37.38.976783 PM
BANNER_FULL
--------------------------------------------------------------------------------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
Check dba_registry status:
col comp_id for a10
col version for a11
col status for a10
col comp_name for a37
select comp_id,comp_name,version,status from dba_registry;
COMP_ID COMP_NAME VERSION STATUS
---------- ------------------------------------- ----------- ----------
CATALOG Oracle Database Catalog Views 19.0.0.0.0 VALID
CATPROC Oracle Database Packages and Types 19.0.0.0.0 VALID
RAC Oracle Real Application Clusters 19.0.0.0.0 OPTION OFF
JAVAVM JServer JAVA Virtual Machine 19.0.0.0.0 VALID
XML Oracle XDK 19.0.0.0.0 VALID
CATJAVA Oracle Database Java Packages 19.0.0.0.0 VALID
APS OLAP Analytic Workspace 19.0.0.0.0 VALID
XDB Oracle XML Database 19.0.0.0.0 VALID
OWM Oracle Workspace Manager 19.0.0.0.0 VALID
CONTEXT Oracle Text 19.0.0.0.0 VALID
ORDIM Oracle Multimedia 19.0.0.0.0 VALID
SDO Spatial 19.0.0.0.0 VALID
XOQ Oracle OLAP API 19.0.0.0.0 VALID
OLS Oracle Label Security 19.0.0.0.0 VALID
DV Oracle Database Vault 19.0.0.0.0 VALID
15 rows selected.
5. Rollback Plan:
-------------
Due to any type of error if patching got failed, then you must have a backup plan.
** 1.Take Oracle Home Backup:
$cd $ORACLE_HOME
$tar -cvf oracle_home_27Mar2023.tar $ORACLE_HOME
2.Full Database RMAN Backup or Create Guaranteed Restore Point.
Rman target /
backup database <>
6. Unzip the Patch:
---------------
$ cd /home/oracle/patches
$ ls -ltr
$ unzip -oq p35320081_190000_Linux-x86-64.zip
Note: Yes, check the prerequisites before applying the patch using the following command
$ cd $ORACLE_HOME/OPatch/
$ ./opatch prereq CheckConflictAgainstOHWithDetail -ph /u02/patches/35320081/
Oracle Interim Patch Installer version 12.2.0.1.36 Copyright (c) 2023, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/oracle/product/19.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/19.0.0/dbhome_1/oraInst.loc
OPatch version: 12.2.0.1.36
OUI version : 12.2.0.7.0
Log file location: /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2023-03-27_13-48-32PM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
OPatch]$ ./opatch prereq checkSystemSpace -ph /u02/patches/35320081/
Oracle Interim Patch Installer version 12.2.0.1.37
Copyright (c) 2023, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/oracle/product/19.0.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/19.0.0/dbhome_1/oraInst.loc
OPatch version : 12.2.0.1.37
OUI version : 12.2.0.7.0
Log file location : /u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/opatch/opatch2023-07-10_11-10-58AM_1.log
Invoking prereq "checksystemspace"
Prereq "checkSystemSpace" passed.
OPatch succeeded.
7. Stop all Database services:
--------------------------
$ ps -ef|grep pmon
oracle 28832 19811 0 13:51 pts/1 00:00:00 grep --color=auto pmon
oracle 32703 1 0 07:07 ? 00:00:01 ora_pmon_primary
$ ps -ef|grep tns
root 16 2 0 00:12 ? 00:00:00 [netns]
oracle 19946 1 0 11:44 ? 00:00:00 /u01/app/oracle/product/19.0.0/dbhome_1/bin/tnslsnr LISTENER -inherit
oracle 28885 19811 0 13:52 pts/1 00:00:00 grep --color=auto tns
$ lsnrctl stop
$ sqlplus / as sysdba
SQL> shutdown immediate;
** Apply Patching 19.3 to 19.17 Using the following command applies the patch.
$ cd $ORACLE_HOME/OPatch/
$ ./opatch apply /u02/patches/35320081
** Start All database services:
$ lsnrctl start
$ sqlplus / as sysdba
SQL> startup
8. Post PATCH steps:
----------------
** Run datapatch -verbose
-----------------------
cd $ORACLE_HOME/OPatch
$ ./datapatch -verbose
Execute utlrp.sql
SQL> @?/rdbms/admin/utlrp.sql
Session altered.
** Verify the PATCH:
OPatch]$ ./opatch lsinventory
** Verify at the Database Level:
SQL> select patch_id,SOURCE_VERSION, TARGET_VERSION, action, status,action_time
from dba_registry_sqlpatch;
** Check Invalid Objects:
SQL> COLUMN object_name FORMAT A30
SQL> SELECT owner,object_type,object_name,status FROM dba_objects
WHERE status = 'INVALID'
ORDER BY owner, object_type, object_name;
no rows selected
** Check dba_registry:
col comp_id for a10
col version for a11
col status for a10
col comp_name for a37
select comp_id,comp_name,version,status from dba_registry;
=====================================================================
Roll back/Patch Deinstallation Instructions for a Non-RAC Environment
=====================================================================
1. Follow these steps:
Shut down all instances and listeners associated with the Oracle home that you are updating. For more information, see Oracle Database Administrator's Guide.
Run the OPatch utility specifying the rollback argument as follows.
$ opatch rollback -id 34419443
SQL> Connect / as sysdba
SQL> Connect / as sysdba
SQL> startup
SQL> startup
SQL> quit
% cd $ORACLE_HOME/OPatch
% ./datapatch -verbose
Upgrade Oracle Recovery Manager Catalog:
If you are using the Oracle Recovery Manager, the catalog needs to be upgraded. Enter the following command to upgrade it.
The UPGRADE CATALOG command must be entered twice to confirm the upgrade.
$ rman catalog username/password@alias
RMAN> UPGRADE CATALOG;
RMAN> UPGRADE CATALOG;
RMAN> EXIT;
0 Comments