This article outlines the Oracle Database 12c Patching New Features Queryable Patch Inventory and Datapatch.
The upcoming Advisor Webcast 'Oracle Database 12c Patching New Features ' scheduled on Dec 17, 2014 will include a live demo as well as troubleshooting and known issues. Time schedule and registration details are available via
- Document 1456176.1 Oracle Database Advisor Webcast Schedule and Archive recordings
Topic: Oracle Database 12c Patching New Features
Database 12c Queryable Patch Inventory
This feature provides the list of patches applied to a particular Oracle_Home from the Database. It stores the Opatch inventory in the Database tables, hence it is a more secure way of storing information. In Oracle Database 12c, Opatch offers XML support for binary inventory and XML table support in the database, therefore the patch information is supplied in XML format to the Database.The Queryable Patch Interface interprets it and then simulates a SQL table structure which can be used to perform select statements on the xml file.
Queryable Patch Inventory contains the following components:
- External Table (OPATCH_XML_INV)
- Oracle Loader (Access Driver for External Table)
- Preprocessor (Program qopiprep.bat converts the data feed)
- Internal Tables (User can query these tables to create customized queries, functions and reports)
Workflow of QOPatch:
Following API interface provides access to the patch data through the package dbms_qopatch
- GET_OPATCH_LIST
Provides list of patches installed as an XML element from the XML inventory
- GET_OPATCH_INSTALL_INFO
Returns the XML element containing the ORACLE_HOME details such as patch and inventory location
- GET_OPATCH_LSINVENTORY
Returns whole opatch inventory as XML instance document.
The interface and syntax example below displays a patch list: SQL> select xmltransform(DBMS_QOPATCH.GET_OPATCH_LIST, DBMS_QOPATCH.GET_OPATCH_XSLT) from dual; Patch Details: Patch(sqlpatch) 19303936: applied on 2014-10-23T23:52:59+05:30 Unique Patch ID: 18116864 Patch Description: Database Patch Set Update : 12.1.0.2.1 (19303936)
Database 12c Datapatch
Database 12c Datapatch is another new tool in Oracle Database 12c that automates post-patch SQL actions for database patches. Datapatch determines the requisite apply/rollback actions by matching an internal repository with the patch inventory. Datapatch resides in the opatch directory i.e $ORACLE_HOME/OPatch folder (On Windows platforms : %ORACLE_HOME%\OPatch). Database 12c Datapatch supports Oracle Mutitenant and simplifies and speeds up the patching process for multiple databases.
Which Patching Tools uses Datapatch ?
- Opatchauto
OPatchAuto calls datapatch automatically to complete post patch actions upon installation of the binary patch and restart of the database.
- Enterprise Manager Cloud Control
Starting version 12.1 EMCC now calls datapatch to complete post patch actions upon any 12c or later database restart
- Upgrade
Catctl.pl and DBUA now call Datapatch during the upgrade process
- OPatch
Datapatch integration with OPatch is not possible as OPatch is executed when the database is down and datapatch requires the database to be open to complete its activity.
SQL Patch Registry Table
This table contains information about which SQL patch was applied and/or rolled back in a given Database. Each Database has one SQL patch registry table, hence, if there are multiple databases running in the same Oracle Home, each Database has its own SQL Patch Registry table. To check datapatch entries in the registry table use the following command from Sql prompt:
select * from dba_registry_sqlpatch;
Database 12.1.0.2 enhancements The following enhancements are introduced with DB 12c patchset 12.1.0.2:
- dba_registry_history is no longer used for patch information
- datapatch -rollbackall option is available to rollback all SQL patches currently installed
- Catbundle is integrated into datapatch
Patch Types supported by Datapatch:
- "Napply" Patch
- Composite Patches
- One-off Patches
Reference Documents :
For more information, refer to the following information:
Join the Oracle Database Advisor Webcast on 17th December 2014 to learn more about these new Oracle Database 12c Patching New Features. For registration details and advisor time, please refer to
Also, join this community discussion on this topic to share your thought, ask questions etc.
|