In Oracle 12c, Patching is performed to correct discovered bugs and close security vulnerabilities. Oracle provides four types of Patches:
Interim Patches – single/collection of bug fixes or one-offs.
Diagnostic Patches – Diagnose or verify a fix.
Patch Set Updates (PSU) – Collection of high impact, low risk, proven fixes for products and components
Critical Patch Updates (CPU) – Collection of patches for security vulnerabilities.
Patching of the RDBMS can be done with two methods: Manually or EM Cloud Control Patch Wizard. Additionally, the patching processes have added: Online Patching and Queryable Inventories. This article will give a brief overview of these Features.
Step in manually patching are:
- Logon to oracle support https://support.oracle.com
- Click Patches & Updates tab.
- Enter the patch number you are looking for on Patches % Updates page.
- Click download on patch for your OS
- Click download Patch Metadata.
- Review the documentation for specific installation instructions.
- Use the OPatch utility to install all patches.
EM Cloud Control Patch Wizard
The EM Cloud Control Patch Wizard has the following benefits over Manual Patching:
- Integrate Patch work with Oracle support and provides single view to determine patch needs.
- End to End workflow of patching, resolving patch conflicts.
- Easy determination of Patch needs for single system.
- Patch plans can be saved as templates.
- Out of place patching is possible for support of RAC and GRID infrastructure.
- EM Cloud allows you create a patch plan to apply patches to one or more targets. A patch can be added to plan only if it’s for same release and OS.
EM Cloud can apply patches with two methods:
- Online Mode – EM connects to Oracle Support, searches for necessary patches, resolves any conflicts and adds them to patch plan.
- Offline Mode – Used when EM cannot connect to Oracle Support. EM searches for patches manually uploaded to software library and adds them to patch plan.
Before 11g all patches require relink of RDBMS libraries and a shutdown of system. Now a large number of Patches can be done online, they contain .so files and do not require relink of RDBMS.
Benefit of Online Patches:
- No downtime.
- persistent across shutdown
- Allow rolling patches in RAC
- Fast install.
Downside of Online Patches:
- Require more memory
- Online patches not available for all OS
- Not all patches are hot patches.
Queryable Patch Inventory
Queryable Patch inventory is new 12c, implemented with DBMS_QOPATCH package and provides view of patches installed just as OPATCH lsinventory command. DBMS_QOPATCH queries the OUI Oracle Universal Installer inventory to gather this metadata.
It provides the following:
- Query patches installed from SQL prompt.
- Creates reports and provides validation across many installs.
- Checks patches on RAC from single node.
GET_OPTACH_BUGS – Provides list of bug fixes per patch number.
GET_OPATCH_COUNT – Provides total number of patches installed.
GET_OPATCH_DATA – Provides top level patch info – number, creation date.
GET_OPATCH_FILES – Provides list of files updated by patch number.
GET_OPATCH_INSTALL_INFO – Provides info such as ORACLE_HOME, patch, inventory_location
GET_OPATCH_LIST – List of Patches installed.
GET_OPATCH_LSINVENTORY – Whole patch inventory
GET_OPATCH_OLAYS –Overlay for specific patch
GET_OPATCH_PREQS – Provides prerequisites for a patch
GET_OPATCH_XSLT – Provides style sheet for opatch XML inventory
GET_PENDING_ACTIVITY – Provides SQL patches applied to single inventory from binaries.
GET_SQLPATCH_STATUS – Patch status from SQL patch registry.
IS_PATCH_INSTALLED – Patches applied info from XML inventory
PATCH_CONFLICT_DETETION – Patch in conflict for give file.
SET_CURRENT_OPINST – inventory information for specific node in RAC.