Modifying Data Virtualization control data to support differences in environments

After you download the exported TAR file from the export cpd-cli job, you can modify the connection details that are found in the control data.

About this task

The control data contains nonsensitive information (i.e. no passwords, privileges, secrets, or GRANT statements) including details about connections and objects, and the statuses for export, import, GRANTs, and statistics (if you specified includeStatistics=TRUE during export).
  • The connections component includes connection details and fields that you can modify.
  • The objects component includes exported objects including schema, schema name, and schema type (T, N,V). These are non-modifiable fields.
You might want to modify the connection details for the following reasons:
  • You want to use a different remote agent from what was used in the exported instance.
  • You want to change the connection owner (DB2INST1 by default).
  • You want to use the same CCID and CCDEFINER between instances for the specified connections.
  • You want to manually set the CID number.

For more information on CID, CCID, and CCDEFINER, see Adding data source connections to Data Virtualization to connect with personal credentials.

Procedure

  1. Extract the TAR file you downloaded from step 4 of exporting your data, and then extract the .tar file with tar -vxf. Replace <export-import-file-name> with the export file name.
    tar -xvf <export-import-file-name>

    Example:

    tar -xvf export-20250502144654.tar

    A directory is created. Take a note of the directory name.

  2. Enter the directory. Replace <directory_name> with the name of the directory from the previous step. The example directory name is export-20250502144654.
    cd <directory_name>

    Example:

    cd export-20250502144654
  3. Open the file export-20250502144654/20250502144700/dv/data/dv_engine_controldata.json in an editor.
    open export-20250502144654/20250502144700/dv/data/dv_engine_controldata.json
  4. Modify any of these fields.
    • targetConnectionOwner (default is DB2INST1): Specify the action that occurs when you import the connection.
    • targetConnectionAction: Specify the owner of the connection when the connection is imported to the target instance.
      Note: Only one targetConnectionAction per connection is permitted.
      • create (default): Create a brand-new connection with connection details from the exported data.
      • import: Specify a new connection asset ID to import the connection from Platform connections. Ensure that you add the field importConnectionsAssetID below it and then specify the CCID to import the connection to.
      • <CID>: Specify the connection ID for the imported connection to use. This action does not work if the same CID exists on the cluster, or if an existing CID is higher than the one you want to specify. For example: you can't specify DB210001 if DB210005 exists.

    Example:

    {
    ...
        "connections": [
            {
                "sourceConnectionID": "ORACL10000",
                "sourceConnectionOwner": "DV_AD_ADMIN2",
                "targetConnectionAction": "import",  
                "importConnectionsAssetID": "aa26b8a2-0a16-43eb-b7c6-c7860fdd3d69",  
                "targetConnectionOwner": "DV_AD_ADMIN2",  
                "connection_properties": {
    ...
  5. Save the export-20250502144654/20250502144700/dv/data/dv_engine_controldata.json file, and then re-compress the TAR file by using tar -cvf. Replace <custom_file_name> with a new file name for the export data. Replace <directory_name> with the name of the directory from the first step.
    tar -cvf <custom_file_name>.tar <directory_name>
    Example:
    tar -cvf export-20250502144654-updated.tar export-20250502144654
  6. Upload the TAR file by using the export upload cpd-cli command in step 2 of importing your data, and then continue the rest of the steps. Ensure that you replace <export-import-file-name> with the new name of your TAR file.
    --file=<export-import-file-name>
    Example:
    --file=export-20250502144654-updated.tar