DB2 Version 9.7 for Linux, UNIX, and Windows

Data replication source tables can be compressed

With this release, you can enable row compression on tables that are source tables for replication. This means that the COMPRESS YES and DATA CAPTURE CHANGES options for the CREATE TABLE and ALTER TABLE statements can be specified together.

When you create or alter a table, you can specify both the DATA CAPTURE CHANGES and the COMPRESS YES clauses to have information regarding SQL changes about the table written to the log and to use data row compression. With these options enabled, as a result of REORG operations, the table can have two dictionaries: a current data compression dictionary and a historical compression dictionary.

The historical dictionary is kept (if it already exists) for data replication purposes. It is utilized whenever a log reader is delayed behind current activity, and the compression dictionary for the table or table partition has been replaced with a new dictionary using the RESETDICTIONARY option on a REORG or LOAD operation. This allows the db2ReadLog API to extract the row contents in the log records, which were written prior to the creation of the new compression dictionary.

Note: To have log readers return the data within log records in an uncompressed format, instead of a raw compressed format, you must set the iFilterOption parameter of the db2ReadLog API to DB2READLOG_FILTER_ON.