Support for Automatic Primary Key and KEYCOLS

The primary key or unique index is created based on the KEY column information in the table metadata. The type of key created on the target table depends on the nullability of the source key columns specified in the source table metadata available in the trail file.

Consider the following for creation of unique index and primary key:

If AUTOSCHEMA functionality is enabled, and if Replicat is processing a source trail that does not contain the pseudo-key flag information (trail written by an older Extract where pseudo-key support was not implemented), then a warning message is displayed to the user and no key is created on the target. Replicat uses all viable columns as key. However, this can be overridden using KEYCOLS in the parameter file.

Note: KEYCOLS will only work in case of an explicit MAP statement, but not when wildcards are used.

Note: Key Column Order on target cannot be maintained as the soruce because the TDR does not have this information.

See the following topics for details on using KEYCOLS to specify a custom key for different databases: Db2 z/OS: Ensure Row Uniqueness for TablesMySQL: Ensure Row Uniqueness for Tables Oracle: Ensure Row Uniqueness for Tables