This topic describes how to provision a virtual database (VDB) from a DB2 dSource.


  • You will need to have linked a dSource from a staging instance, as described in Linking a Db2 dSource, or have created a VDB from which you want to provision another VDB
  • You should have set up the Db2 target environment with necessary requirements as described in Requirements for Db2 Hosts and Databases
  • Make sure you have the required Instance Owner permissions on the target instance and environment as described in Managing Db2 Users and Instance Owners
  • The method for Database Permissions for Provisioned Db2 VDBs is decided before the provisioning
  • [Optional] Once you have restored the databases into your target environment, If the version of IBM® Db2® in your source environment is at a different fix pack level than the version of Db2 in your target environment, then you need to update the 11.1 version databases with db2updv111 command and 11.5 databases with db2updv115 command utility.
    Run the below command as a Pre-snapshot hook:

    db2updv111 -d <DBNAME> -a
    db2updv115 -d <DBNAME> -a

    The optional pre-requisite is applicable only when the target environment is using a different Db2 fix pack level than the source. If your source environment is using version 11.1.x and your target is using version 11.5.x, you can neglect the above-mentioned point.

    Consider the following scenarios for the optional prerequisite mentioned above:

  • if your source environment uses Db2 version 11.5.5 and your target environment uses Db2 11.5.8 or a later fix pack, you need to update the databases in the target environment.
  • If your databases were created or upgraded to Db2 Version 11.1 GA and you applied Db2 Version 11.1 Fix Pack 1 or later, then running the above command will automatically apply all updates required from Version 11.1 GA up to and including the fix pack level that you are installing.

You can take a new snapshot of the dSource by clicking the Camera icon on the dSource card. Once the snapshot is complete you can provision a new VDB from it.

Please note while creating a VDB on an instance

By default, DB2 Plugin will not allow provisioning a VDB on an instance which contains a database that has an identical name to the source database. 

For e.g.; 

  1. When we are provisioning a VDB from a VDB then source VDB will be treated as the source database. 
  2. When we are provisioning a VDB from a dSource then a staging database will be treated as the source database.

If the user wants to provision a VDB on an instance which contains a source database, then the user needs to follow the below steps :

  1. Check if any config file with name db2_plugin.conf at location <Toolkit directory>/Delphix_COMMON/plugin/<Identifier>/. If it does not exist, then the user should create a file with name db2_plugin.conf at location <Toolkit directory>/Delphix_COMMON/plugin/<Identifier>/. The instance user must have read permission to this file. Once the file is created, user should proceed to step 2. If the file already exists at this location with the required permission, the user should directly proceed to step 2.
  2. Add the below line in this config file.
    1. allowSourceDbOnSameInstance=True
  3. Then create/Refresh the VDB again.


  1. Login to the Delphix Management application.
  2. Click Manage.
  3. Select Datasets.
  4. Select a dSource.
  5. Select a snapshot from which you want to provision.
  6. Click Provision VDB icon to open Provision VDB wizard.
  7. Select a target environment from the left pane.
  8. Select an Installation to use from the dropdown list of available DB2 instances on that environment.
  9. Set the Environment User to be the Instance Owner. Note: The picking of instance owner is only possible if you have multiple environment users set on that host.
  10. Provide VDB Name as database name as parameter.
  11. Optionally, set the database configuration parameters for the VDB.
  12. Click Next.
  13. Select a Target Group for the VDB.
    Click the green Plus icon to add a new group, if necessary.
  14. Select a Snapshot Policy for the VDB.
  15. Click Next.
  16. Specify any desired hook operations. 

  17. Click Next.
  18. Review the Provisioning Configuration and Data Management information.
  19. Click Submit.
    When provisioning starts, you can review the progress of the job in the Databases panel, or in the Job History panel of the Dashboard. When provisioning is complete, the VDB will be included in the group you designated and listed in the Databases panel. If you select the VDB in the Databases panel and click the Open icon, you can view its card, which contains information about the database and its Data Management settings.
    Once the VDB provisioning has successfully completed, if the source and target instance ids are not the same, you may want to grant secadm and dbadm on the database to the target instance id. Refer to Database Permissions for Provisioned Db2 VDBs for more information.

Related Topics