For a table to participate in replication, it needs to have its DATA CAPTURE CHANGES
flag set. Note that one of the effects of setting this flag is that the space required for DB2 logging will increase.
The flag is set automatically when a Q subscription is created or it can be set manually using the ALTER TABLE
command shown next:
db2 ALTER TABLE <table-name> DATA CAPTURE changes
The DATA CAPTURE
options are:
+-DATA CAPTURE--+-NONE---------------------------------+--- '-CHANGES--+-------------------------+-' '-INCLUDE LONGVAR COLUMNS-'
The INCLUDE LONGVAR COLUMNS
parameter allows data replication utilities to capture changes made to LONG VARCHAR
and LONG VARGRAPHIC
columns. The clause may be specified for tables that do not have any LONG VARCHAR
or LONG VARGRAPHIC
columns since it is possible to ALTER
the table at a later date to include such columns.
We can check if the flag has been set for a table using the following query:
db2 "SELECT SUBSTR(tabschema...