IBM Books

Replication Guide and Reference


Stopping the Capture Program with a Trigger

In some situations, you might want to trigger the stop of the Capture program. For example, you might want to stop it at a specific time, or after all transactions for a particular application have been committed. The simplest way to set up this trigger is to create a table (or use an existing table), define it as a replication source, and identify a particular column whose update, when captured, triggers shutdown.

To stop the Capture program with a trigger:

Use the following example as a guideline.

  1. Create a table with a column named STOPCAP or another unique identifier.

  2. Define the table as a replication source.

  3. Create an application that periodically reads the change data table associated with this replication source table to search for STOPCAP.

  4. Schedule the application to start before your Apply programs.

When your application encounters STOPCAP in the change data table, it should issue the command to stop the Capture program.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]