TRUNCATE

Read syntax diagramSkip visual syntax diagram TRUNCATE=RESTRICT_TRIGGERSOFF

Specifies whether CDC for Db2® for z/OS® should support the Db2 for z/OS TRUNCATE command.

When the RESTRICT_TRIGGERS value is enabled, the following behavior by CDC for Db2 for z/OS results:

  • TRUNCATE IMMEDIATE is replicated as a CLEAR message
  • TRUNCATE IMMEDIATE is used to clear tables on the target (with the RESTRICT WHEN DELETE TRIGGERS clause)
Note: The following list indicates situations where the use of TRUNCATE is not possible:
  • The target database is not Db2 version 9.1 or later.
  • The table has a Row ID or Member ID defined.
  • The source has sent an SQL WHERE clause (a partial refresh).
  • The target table has DELETE triggers.
  • The target table (or table space) has outstanding uncommitted changes.
  • The Clear message does not contain the Immediate field or the Immediate field has a value of 0.

In these cases, CDC for Db2 for z/OS will automatically fall back on using DELETE, regardless of the setting of the TRUNCATE keyword.

This keyword is optional.

Default Setting—RESTRICT_TRIGGERS