Applying Database Patch manually to a Database Home -DBSystem


In the procedure example, the database home directory is /u01/app/oracle/product/19.0.0.0/dbhome_1 Obtain the applicable interim update from My Oracle Support.

  1. Review the information in the update README.txt file. This file might contain additional and/or custom instructions to follow to apply the update successfully.
  2. Use SCP or SFTP to place the update on your target database.
  3. Shut down each database that is running in the database home.
  4. Set the Oracle home environment variable to point to the target Oracle home.

sudo su – oracle

export ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_1

UPDATE THE OPATCH VERSION AS PER PATCH PREREQUISITE – Down load the patch from MOS

Unzip p6880880_190000_Linux-x86-64.zip -d $ORACLE_HOME

[oracle@swcdrdb PATCH_TOP]$ /u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch version

OPatch Version: 12.2.0.1.36

OPatch succeeded.

  1. Change to the directory where you placed the update, and unzip the update.

 

[oracle@swcdrdb 34765931]$ /u01/app/oracle/product/19.0.0.0/dbhome_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./

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.0/dbhome_1

Central Inventory : /u01/app/oraInventory

   from           : /u01/app/oracle/product/19.0.0.0/dbhome_1/oraInst.loc

OPatch version    : 12.2.0.1.36

OUI version       : 12.2.0.7.0

.

.

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

 

  1. Apply the update.

[oracle@swcdrdb 34765931]$ $ORACLE_HOME/OPatch/opatch apply

Oracle Interim Patch Installer version 12.2.0.1.36

Copyright (c) 2023, Oracle Corporation.  All rights reserved.

 

Oracle Home       : /u01/app/oracle/product/19.0.0.0/dbhome_1

Central Inventory : /u01/app/oraInventory

   from           : /u01/app/oracle/product/19.0.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.0/dbhome_1/cfgtoollogs/opatch/opatch2023-04-05_19-37-35PM_1.log

 

Verifying environment and performing prerequisite checks...

.

.

.

.

Patching component oracle.precomp.lang, 19.0.0.0.0...

 

Patching component oracle.precomp.common, 19.0.0.0.0...

 

Patching component oracle.jdk, 1.8.0.201.0...

 

Patch 34765931 successfully applied.

 

 

  1. Verify that the update was applied successfully.

[oracle@swcdrdb$ $ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME

 

  1. If the database home contains databases, restart them.

[oracle@swcdrdb 34786990]$ sqlplus / as sysdba

 

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Apr 5 20:20:07 2023

Version 19.18.0.0.0

 

Copyright (c) 1982, 2022, Oracle.  All rights reserved.

 

 

Connected to:

Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production

Version 19.18.0.0.0

 

SQL> sho pdbs

 

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED

---------- ------------------------------ ---------- ----------

         2 PDB$SEED                       READ ONLY  NO

         3 SWCPRDDB_PDB1                  READ WRITE NO

SQL>

 

  1. If the readme indicates that the update has a sqlpatch component, run the datapatch command against each database.
  2. Before you run datapatch, ensure that all pluggable databases (PDBs) are open. To open a PDB, you can use SQL*Plus to execute ALTER PLUGGABLE DATABASE <pdb_name> OPEN READ WRITE against the PDB.

ORACLE_HOME/OPatch/datapatch


No comments:

Post a Comment