Skip to main content
Delphix

FAQ: Datapatch and Delphix(KBA10360)

 

 

KBA

KBA# 10360

 

What is Datapatch

Datapatch is an Oracle patching tool to complete the post-patch SQL actions for RDBMS patches, it needs to be run while the database is in open read write mode.

For more detailed information, please refer to Oracle Datapatch User Guide.

Is it possible to invoke Datapatch with Delphix for a linked DB, PDB or CDB?

No, Delphix only supports to run Datapatch against Delphix-managed virtual databases (i.e. VDB, vPDB and vCDB).

For non-Delphix-managed databases, customers can patch them by invoking the Datapatch tool without Delphix. 

 

When to invoke Datapatch with Delphix?

Customers can enable Invoke Datapatch for a virtual database in a provision, refresh, rewind, start or enable workflow as described in Datapatch and Delphix, Delphix runs Datapatch against the database in the workflows. Customers can enable/disable Invoke Datapatch for these workflows any time as described in Configuration Settings for Oracle Virtual Databases.

This feature is available from Delphix Version 15 and above.

 

What to do if Datapatch invocation has failed?

When the Invoke Datapatch option is checked for a virtual database, Delphix invokes the Datapatch tool (which is provided by Oracle) to patch your database, as long as the Datapatch command has been invoked on the target host, Delphix’s job is done. If the Datapatch fails to patch the DB, it may be caused by environment issues (e.g. the target host Oracle home was not patched properly) or Oracle software bugs. All these issues are not Delphix issues. You need to check the information provided by the error or fault posted against the related job/object or the Datapatch command line output on the target host, fix the issues and re-run the operation. You may need to contact your DBA or Oracle support for help.

 

How do I know if Delphix has invoked Datapatch successfully?

Delphix can invoke Datapatch with different workflows. You may refer to the job events or errors presented by the workflows to determine if Datapatch is invoked successfully

Provisioning, refreshing and rewinding a VDB or vPDB
  • There is a job event called “Invoking Datapatch” which indicates Datapatch has been invoked by the job:

  • If Datapatch fails, the job fails with error exception.oracle.targetscripts.datapatch.invocation.failed as follows:

    • You can find the Datapatch command output in Command Output, which provides the log file location as well as why Datapatch invocation failed. 

      If you don’t see such an error, Datapatch has been invoked successfully.

Starting or enabling a vPDB

Delphix invokes Datapatch against the vPDB if the vPDB has a different SQL patch level than the CDB where the vPDB is running. If the vPDB and CDB have the same SQL patch level, Datapatch is not invoked. 

 

  • If Datapatch is invoked, there is an event “Resolving Oracle pluggable database plugin violation: SQL Patch.” posted against the job: 
  • If the Datapatch invocation fails, the starting/enabling job is successful and the vPDB is open in restricted mode (this causes the following SnapSync job for the vPDB fails). A fault is posted against the vPDB: 
  • You may look into the Datapatch invocation log,  resolve the issues and start or enable the vPDB again.
Starting or enabling a VDB (non-multitenant DB) or vCDB

If Invoke Datapatch is checked for the VDB or vCDB source, Delphix always invokes Datapatch during starting or enabling even if the VDB/vCDB has the same patch level as the Oracle home (in such case, invoking Datapatch is has no effect).

 

  • There is a job event called “Invoking Datapatch” which indicates Datapatch has been invoked: 
  • If Datapatch invocation is failed, the start/enable job is still successful, and the VDB and vCDB is started/enabled. A fault is posted against the VDB/vCDB which includes information explaining why Datapatch invocation failed. You may resolve the issues and start/enable the VDB or vCDB again.

What happens if the environment user does not have permission to execute Datapatch command?

If you have the Invoke Datapatch option checked for your Oracle virtual databases, but the environment user used for related Delphix workflows does not have permission to execute Datapatch command, Delphix prompts an error as follows: 

To resolve this, you need to grant sudo privileges to the environment user on the target environment as described in Sudo Privilege Requirements for Oracle Environments. If the target environment is a RAC environment, this change should be done for all nodes.

 

What to do if Datapatch invocation failed with error “CDB$ROOT is not in the PDBs to be processed but needs to be bootstrapped” when provisioning, starting or enabling a vPDB?

 

If Datapatch invocation is failed with error: 

Bootstrapping registry and package to current versions...
Error: prereq checks failed!
CDB$ROOT is not in the PDBs to be processed but needs to be bootstrappedPrereq check failed, exiting without installing any patches.

 

This is not a Delphix bug. It’s expected as described in Oracle Documentation (Doc ID 2538591.1).

To fix this, if the CDB is a linked CDB, you can invoke Datapatch against the CDB without Delphix and then provision, start or enable the vPDB again with Delphix.

If the CDB is a vCDB, you can check the option Invoke Datapatch for the vCDB source,  stop/start the vCDB via Delphix and provision, start or enable the vPDB again with Delphix.

 

What to do if Datapatch has been invoked successfully for a vPDB, but the following SnapSync job against the vPDB still fails because of a SQL Patch plugin violation?

 

This can be caused by the target Oracle Home was not patched properly prior to invoking Datapatch or by various Oracle bugs. 

A fault is posted against the vPDB as follows: 

You may check the Datapatch command output in the datapatch innocation log on the target host if there is useful information and search if it’s a known Oracle issue.

After resolving the issue, you may provision, start or enable the vPDB again with Delphix.

 

Does Delphix invoke Datapatch on all nodes in a RAC environment?

When provisioning, refreshing or rewinding a VDB (non-multitenant DB) or vPDB in a RAC environment, Delphix only invokes Datapatch on one node (i.e. the node used for recovery).

When starting or enabling a VDB (non-multitenant DB) or vCDB in a RAC environment, Delphix only invokes Datapatch on one node (i.e. the first node started).

When starting or enabling a vPDB in a RAC environment, Delphix only invokes Datapatch on the node where the vPDB is plugged in and opened. 

 

 


Related Articles

The following articles may provide more information or related information to this article:

 

  • Was this article helpful?