Making subscriptions persistent

When a subscription has been configured as persistent, the subscription will be restarted when the replication engine is restarted after shut down or after the subscription ends with a recoverable error.

About this task

CDC Replication may initiate a normal shutdown and end mirroring under the following circumstances:
  • Interruptions in network communications
  • DB2® LUW deadlock or timeout errors for subscriptions that target DB2 LUW
  • Interruptions to database connections for DB2 for z/OS®

To automatically restart continuous mirroring of subscriptions after a normal shutdown of CDC Replication due to the preceding scenarios, you can mark the subscriptions as persistent.

When persistency is enabled and network communications terminate, CDC Replication attempts to automatically restart continuous mirroring for persistent subscriptions at regular intervals. Attempts continue until an automatic restart is successful or until the persistent subscription or the CDC Replication Engine for Db2® for z/OS address space is terminated.

In the event of a deadlock or timeout error with subscriptions that target DB2 LUW, an event message will indicate that the error is recoverable and if you mark the subscription as persistent it will restart automatically. When restarted, the subscription will resend the data that has been rolled back as a result of the error and continue.

Subscriptions will not restart automatically if you intentionally end replication for an active subscription by name. For CDC Replication Engine for Db2 for z/OS subscriptions only, automatic restart will still apply if you have ended replication for a group of subscriptions by specifying the wild card character ('*') with the ENDTSMIR command.

Persistency is only relevant to subscriptions that are used for continuous mirroring. If a persistent CDC Replication Engine for Db2 for z/OS subscription is used for Refresh or Scheduled End (Net Change) mirroring and network communications are interrupted, this subscription is restarted according to how the same subscription was terminated the last time it was used for continuous mirroring. For all other CDC Replication replication engines, if a persistent subscription is used for Refresh or Scheduled End (Net Change) mirroring and network communications are interrupted, it will not be restarted automatically.

You can set how often CDC Replication Engine for Db2 for z/OS attempts to automatically restart continuous mirroring for persistent subscriptions by modifying the AUTORESTARTINTERVAL configuration control statement keyword. For more information, see your CDC Replication Engine for Db2 for z/OS documentation. For all other CDC Replication replication engines, you can set how often CDC Replication attempts to automatically restart continuous mirroring for persistent subscriptions by setting a non-zero value for the mirror_auto_restart_interval_minutes system parameter.

This functionality is not available in the following circumstances:

  • Datastores for the CDC Replication Engine for Db2 for i

Procedure

  1. Ensure that the mirror_auto_restart_interval_minutes system parameter has a value greater than zero.

    For a CDC Replication Engine for Db2 for z/OS, ensure that AUTORESTARTINTERVAL configuration control statement keyword has a value greater than zero.

  2. Click Configuration > Subscriptions.
  3. Right-click on a subscription and select Properties.
  4. Click Advanced Settings.
  5. Select the Mark subscription as persistent check box.

    The new persistency setting will not take effect until the subscription starts mirroring.