In this Blog you can learn database, networking and cloud skills that will help you to understand Oracle Database and Non Oracle Database with extra key skill

Patching in Oracle Databases using Opatch Utility

No comments :
Image result for oracle opatch


  • OPatch is an Oracle-supplied utility that assists you with the process of applying interim patches to Oracle's software and rolling back interim patches from Oracle's software. 
  • Patches are a small collection of files copied over to an existing installation and associated with particular versions of Oracle products.
  • Interim patches are bug fixes available to customers in response to specific bugs and They require a particular base release or patchset to be installed before you can apply them, generally address specific bugs for a particular customer.
  • OPatch also supports silent operation. This mode allows you to run the software without any user interaction.
  • OPatch has various levels of logging and tracing mechanisms. It also has a debug option that helps to easily diagnose software problems.



OPatch supports the following tasks
1- Applying an interim patch.
2- Rolling back the application of an interim patch.
3- Detecting a conflict when applying an interim patch after previous interim patches have been applied. It also suggests the best options to resolve a conflict.
4- Reporting on installed products and interim patches.

OPatch uses the following environment variables
ORACLE_HOME — Oracle home location.
export ORACLE_HOME=/u04/oracle/product/database/12102
PATH — Path information.
export PATH=$ORACLE_HOME/OPatch:$PATH

Required:
Oracle Home must to set to valid location
Java commands for Windows, and ar, cp, fuser, and make commands for UNIX must be made available

Prerequisite Checks for OPatch
1- Check ORACLE_HOME and Environment Variable
2- Check for JRE
3- Check for Oracle Universal Installer and OPatch Version Compatibility
4- Check for OPatch Lsinventory : OPatch lsinventory -detail

Note: It is highly recommended before applying the patch , database must be down and back up the ORACLE_HOME before any patch operation

[oracle@dgprim2 ~]$ opatch lsinventory
Oracle Interim Patch Installer version 12.2.0.1.13
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u04/oracle/product/database/12102
Central Inventory : /u03/app/oracle/oraInventory
   from           : /u04/oracle/product/database/12102/oraInst.loc
OPatch version    : 12.2.0.1.13
OUI version       : 12.1.0.2.0
Log file location : /u04/oracle/product/database/12102/cfgtoollogs/opatch/opatch2019-04-02_11-47-29AM_1.log

Lsinventory Output file location : /u04/oracle/product/database/12102/cfgtoollogs/opatch/lsinv/lsinventory2019-04-02_11-47-29AM.txt

--------------------------------------------------------------------------------
Local Machine Information::
Hostname: dgprim2.transappdata.com
ARU platform id: 226
ARU platform description:: Linux x86-64

Installed Top-level Products (1):

Oracle Database 12c                                                  12.1.0.2.0
There are 1 products installed in this Oracle Home.

There are no Interim patches installed in this Oracle Home.
--------------------------------------------------------------------------------
OPatch succeeded.

Location of Opatch Utility: $ORACLE_HOME/OPatch

syntax: opatch [-help] [command] [-option]

help — Displays the help message for the command.
$ opatch -help

Apply Command for OUI-based Oracle Homes
opatch napply Command for OUI-based Oracle Homes
opatch napply <patch_location>
opatch napply <patch_location> -id 1,2,3
opatch napply <patch_location> -skip_subset -skip_duplicate
opatch napply <patch_location> -id 1,2,3 -skip_subset -skip_duplicate

u

No comments :

Post a Comment