Skip to main content
Skip table of contents

IBM Db2 link operations via CLI

dSource creation from CLI

To create a dSource via CLI, you must create a source configuration first. For more information on creating a source configuration, refer to Add Source Config using CLI.

To create a dSource and perform operations via CLI, log in to the Delphix Continuous Data Engine using the admin user account.

CODE
ssh admin@<CONTINUOUS-DATA-FQDN-or-IP>

Set default linking parameters (This is common for all types of ingestions)

Run the following commands to set the default linking parameters. The following example uses testds source config.

CODE
database link;
set linkData.type=AppDataStagedLinkData;
set name=testds
set group=Untitled
set linkData.config=testds
set linkData.environmentUser=dlpxdb21
set linkData.stagingEnvironment=rh88-stg.dlpxdc.co
set linkData.stagingEnvironmentUser=dlpxdb21
set linkData.syncParameters.parameters={\"resync\":true}

Link parameters for backup only

Run the following commands to link parameters for backup-only ingestion type.

CODE
set linkData.parameters="{\"dbName\":\"R88D115A\",\"backupPath\":\"/db2backup/11_5\",\"stagingPushFlag\":false,\"dpfFlag\":false,\"monitorHADR\":false,\"toolkitHookFlag\":false,\"logIngestionFlag\":false,\"copyToApplyFlag\":false,\"rfPIT\":false}";

For DPF

CODE
set linkData.parameters="{\"dbName\":\"R88D115A\",\"backupPath\":\"/db2backup/11_5\",\"stagingPushFlag\":false,\"dpfFlag\":true,\"monitorHADR\":false,\"toolkitHookFlag\":false,\"logIngestionFlag\":false,\"copyToApplyFlag\":false,\"rfPIT\":false}";

Link parameters for backup with archived logs

Run the following commands to link parameters for backup and archived logs.

CODE
set linkData.parameters="{\"dbName\":\"R88D115A\",\"backupPath\":\"/db2backup/11_5\",\"stagingPushFlag\":false,\"dpfFlag\":false,\"monitorHADR\":false,\"toolkitHookFlag\":false,\"logIngestionFlag\":true,\"logPath\":\"/home/dlpxdb21/logs\",\"copyToApplyFlag\":false,\"rfPIT\":false}";

For DPF

CODE
set linkData.parameters="{\"dbName\":\"R88D115A\",\"backupPath\":\"/db2backup/11_5\",\"stagingPushFlag\":false,\"dpfFlag\":true,\"monitorHADR\":false,\"toolkitHookFlag\":false,\"logIngestionFlag\":true,\"logPath\":\"/home/dlpxdb21/logs\",\"copyToApplyFlag\":false,\"rfPIT\":false}";

Link parameters for backup with archived logs (Using RFPIT option)

Run the following commands to link parameters for backup with archived logs with RFPIT.

CODE
set linkData.parameters="{\"dbName\":\"R88D115A\",\"backupPath\":\"/db2backup/11_5\",\"stagingPushFlag\":false,\"dpfFlag\":false,\"monitorHADR\":false,\"toolkitHookFlag\":false,\"logIngestionFlag\":true,\"logPath\":\"/home/dlpxdb21/logs\",\"copyToApplyFlag\":false,\"rfPIT\":true}";

set linkData.syncParameters.parameters={\"resync\":true,\"rtimestamp\":\"2023-10-25-08.50.00\"}

For DPF

CODE
set linkData.parameters="{\"dbName\":\"R88D115A\",\"backupPath\":\"/db2backup/11_5\",\"stagingPushFlag\":false,\"dpfFlag\":true,\"monitorHADR\":false,\"toolkitHookFlag\":false,\"logIngestionFlag\":true,\"logPath\":\"/home/dlpxdb21/logs\",\"copyToApplyFlag\":false,\"rfPIT\":true}";

set linkData.syncParameters.parameters={\"resync\":true,\"rtimestamp\":\"2023-10-25-08.50.00\"}

Link parameters for HADR

Run the following commands to link parameters for HADR.

CODE
set linkData.parameters="{\"dbName\":\"C78d111A\",\"backupPath\":\"/db2backup/11_1\",\"additionalBackupPath\":[],\"stagingPushFlag\":false,\"dpfFlag\":false,\"monitorHADR\":true,\"toolkitHookFlag\":false,\"logIngestionFlag\":false,\"copyToApplyFlag\":false,\"rfPIT\":false,\"hadrDetails\":{\"hadrPrimaryHostname\":\"c78-s1.dlpxdc.co\",\"hadrPrimarySVC\":\"60055\",\"hadrStandbySVC\":\"60056\",\"hadrTargetList\":\"\",\"configureSSL\":false}}"

Link parameters for HADR with SSL 

Run the following commands to link parameters for HADR with SSL.

CODE
set linkData.parameters="{\"dbName\":\"C78d111A\",\"backupPath\":\"/db2backup/11_1\",\"additionalBackupPath\":[],\"stagingPushFlag\":false,\"dpfFlag\":false,\"monitorHADR\":true,\"toolkitHookFlag\":false,\"logIngestionFlag\":false,\"copyToApplyFlag\":false,\"rfPIT\":false,\"hadrDetails\":{\"hadrPrimaryHostname\":\"c78-s1.dlpxdc.co\",\"hadrPrimarySVC\":\"60055\",\"hadrStandbySVC\":\"60056\",\"hadrTargetList\":\"\",\"configureSSL\":true,\"keyStorePassword\":\"delphix\"
}}"

Link parameters for additional backup path

CODE
set linkData.parameters="{\"dbName\":\"R88D115C\",\"backupPath\":\"/db2backup/11_5/backup_path1\",\"additionalBackupPath\":[{\"bpath\":\"/db2backup/11_5/backup_path2\"}, {\"bpath\":\"/db2backup/11_5/backup_path3\"}],\"stagingPushFlag\":false,\"dpfFlag\":false,\"monitorHADR\":false,\"toolkitHookFlag\":false,\"logIngestionFlag\":true,\"logPath\":\"/home/dlpxdb21/logs\",\"copyToApplyFlag\":false,\"rfPIT\":false}";

For DPF

CODE
set linkData.parameters="{\"dbName\":\"R88D115C\",\"backupPath\":\"/db2backup/11_5/backup_path1\",\"additionalBackupPath\":[{\"bpath\":\"/db2backup/11_5/backup_path2\"}, {\"bpath\":\"/db2backup/11_5/backup_path3\"}],\"stagingPushFlag\":false,\"dpfFlag\":true,\"monitorHADR\":false,\"toolkitHookFlag\":false,\"logIngestionFlag\":true,\"logPath\":\"/home/dlpxdb21/logs\",\"copyToApplyFlag\":false,\"rfPIT\":false}";

Link parameters for staging push

Run the following commands to link parameters for staging push.

CODE
set linkData.parameters="{\"dbName\":\"R88D115A\",\"stagingPushFlag\":true,\"dpfFlag\":false,\"monitorHADR\":false,\"toolkitHookFlag\":false,\"logIngestionFlag\":false,\"copyToApplyFlag\":false,\"rfPIT\":false}";

For DPF

CODE
set linkData.parameters="{\"dbName\":\"R88D115A\",\"stagingPushFlag\":true,\"dpfFlag\":true,\"monitorHADR\":false,\"toolkitHookFlag\":false,\"logIngestionFlag\":false,\"copyToApplyFlag\":false,\"rfPIT\":false}";

Commit

Run the following  command to commit the change

CODE
commit;

Disable

Run the following command to disable the dSource.

CODE
source
select testdb
disable
commit

Enable

Run the following command to enable the dSource.

CODE
source
select testdb
enable
commit
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.