Daisy chain synchronization
The Data Gate service synchronizes Db2 for z/OS data to Db2 instance on CP4D. Once your data is synchronized on CP4D, you have the option to extend the synchronization to subsequent targets using various synchronization tools.
Achieving Daisy Chain Synchronization
To successfully implement a daisy chain synchronization, it is essential to be aware of the following two points:
- Determine the underlayer target tables name. The Data Gate service only exposes alias names for the target tables, rather than the actual table names. For your daisy chain synchronization, you need to identify the names of the underlying target tables. You can use the
db2lookutility. This tool allows you to generate a dump of all the Data Definition Language (DDL) for the target database, making it easier to locate and identify the specific table names that interest you.oc exec -it ${DB2U_POD_NAME} -n ${PROJECT_CPD_INST_OPERANDS} su - db2inst1 db2look -d bludb -e > db2look.outOpen thedb2look.outfile in a text editor and search for the string of your source table name (for example,TABLE1). The Data Gate service adds theTABLE IDandTABLE VERSIONstrings to the names of all the tables that it creates. You might, for example, find the following strings:"DWAXXX"."TABLE1-ID_182-V1" "DWAXXX"."TABLE1-ID_182-V2"XXXstands for the location name of the table.ID-182is the table ID.V1andV2are the table version. This is the name of the table in the catalog of the target database. Choose the newest version of the table. - Add
DATA CAPTURE CHANGESproperty for target table. It is required for supporting synchronization.- Identify the Data Gate instance identifier,
and assign the value to the variable
DG_INSTANCE_IDby issuing theoc get dginstancecommand. For example:
In this example, the instance ID isoc get dginstance -n ${PROJECT_CPD_INST_OPERANDS} NAME VERSION BUILD STATUS RECONCILED AGE dg1699914520773847 5.0.0 5.0.0.82 Completed 5.0.0 6h58mdg1699914520773847. Set the variableDG_INSTANCE_IDto this instance ID. - Identify the Data Gate instance pod, and
assign the value to the variable
DG_PODby issuing the followingoc get podcommand:DG_POD=$(oc get pod -n ${PROJECT_CPD_INST_OPERANDS} -l icpdsupport/app=dg-instance-server,\ icpdsupport/serviceInstanceId=`echo ${DG_INSTANCE_ID} | sed 's/^dg//'` -o jsonpath='{.items[0].metadata.name}') - Go to the
data-gate-servercontainer of the Data Gate pod on CP4D:oc exec -it ${DG_POD} -n ${PROJECT_CPD_INST_OPERANDS} -c data-gate-server -- bash - Edit the file /head/clone-api/application-prod.properties in the
data-gate-server container. Search
ENABLE_DATA_CAPTURE_CHANGES_ON_BACKEND_TABLESand change it toENABLE_DATA_CAPTURE_CHANGES_ON_BACKEND_TABLES = true. Once this change is made, any newly loaded table is defined with theDATA CAPTURE CHANGESproperty. You can verify it by checking columnDATACAPTURECHARin syscat.tables of the Db2 instance.
- Identify the Data Gate instance identifier,
and assign the value to the variable