The implementation of UDB (Db2/LUW) change data capture frequently requires the initial load of the target datastores in order for replication to achieve full synchronization of the source and target.
Connect CDC (SQData) provides the ability to refresh an entire table during replication. This allows for loading small to medium sized tables within the replication flow vs having to perform an utility unload/load. Larger tables may still require a utility unload/load.
Refresh works automatically with no-map replication scripts. Other apply scripts that perform mapping, transformation, filtering, etc. are not supported automatically. If a refresh is initiated and the records are published to a non-replicate engine, the engine will fail unless you provide for the special refresh CDC records in the apply script. Please contact Precisely https://www.precisely.com/support for assistance.
If you have a table that is published to both a no-map replication engine and another type of apply engine, you can disable the refresh for the 2nd apply engine as described below.
- Before you can refresh a table during replication, you must create the Connect CDC (SQData) refresh control table (SQDATA.REFRESH_REQUEST_LOG) on the source system. The following SQL can be used to create this control table:
CREATE TABLE SQDATA.REFRESH_REQUEST_LOG ( STCK_START CHAR(18) NOT NULL ,STCK_END CHAR(18) NOT NULL ,STATUS CHAR NOT NULL ,TABLE_TO_REFRESH VARCHAR(514) NOT NULL ,COMMENT VARCHAR(256) NOT NULL ) IN SQDATADB.SQDATATS DATA CAPTURE CHANGES
- The refresh event is tracked in the refresh control table and you can browse this table to see your scheduled table refresh activity.
- The capture must be running in order to perform a refresh.
- The refresh is treated as a single transaction or unit-of-work (UOW), so consideration must be given to any restrictions that the target database may have with regard to large units-of-work.
- A large refresh transaction will impact the throughput of other changes for the table that are occurring.
- The current release of Connect CDC (SQData) only supports table refresh for no-map replication engines
The table refresh can be accomplished with a the sqdconf Utility.
sqdconf --refresh --key=<TABLENAME> <cab_file_name>
Keyword | Description |
---|---|
--key= <TABLE_NAME> | Specifies Source object UDB table name. In our example the first table is SQDATA.EMP |
<cab_file_name>= | Must be specified and must match the name specified in a previous create command. |
Example 1
sqdconf --refresh --key=SQDATA.EMP /home/sqdata/udbcdc/udbcdc.cab
/*