This documentation site is no longer maintained. For the latest Delphix product documentation, please visit help.delphix.com
Continuous Data

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.

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.

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}

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

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

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

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

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

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}";

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

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

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\"}

Run the following commands to link parameters for HADR.

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}}"

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

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\"
}}"
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

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}";

Run the following commands to link parameters for staging push.

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

For DPF

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

commit;

Disable

Run the following command to disable the dSource.

source
select testdb
disable
commit

Enable

Run the following command to enable the dSource.

source
select testdb
enable
commit