DB2 10.5 for Linux, UNIX, and Windows

Setting up replication for shadow tables with IBM InfoSphere CDC Management Console

Set up replication for shadow tables with IBM® InfoSphere® CDC Management Console by creating one subscription for all shadow tables in your database and one table mapping for each shadow table.

Before you begin

About this task

Creating a subscription defines a container for the set of table mappings that you must define for each shadow table. Creating a table mapping defines the source table for replicating data to the shadow table.

A subscription provides a single point of control for common replication operations such as mirroring and refreshing. Mirroring is the process that replicates changed data from the source table to the shadow table. Refreshing is the process that synchronizes the shadow table with the current contents of the source table.

Be sure to create only one subscription for all shadow tables in the same database so that there is only one synchronization point for all shadow tables in the database.

Procedure

To set up replication for shadow tables:

  1. Log in to the InfoSphere CDC Management Console as access-server-user in the access-server-host.
  2. Create an InfoSphere CDC subscription:
    1. Click Configuration > Subscriptions, right-click the project and select New Subscription.
    2. In the New Subscription window, enter a name for the subscription and select the datastore that you created as both the source and target. Then, click Advanced Settings.
    3. In the Advanced Subscription Settings window, check the Mark subscription as persistent box and click OK. If a subscription is set to persistent, InfoSphere CDC automatically attempts to restart the subscription after certain errors.
    4. In the New Subscription window, click OK.
    5. In the message window that appears about specifying the same data store as the source and target, click Yes to continue.
  3. Create a table mapping for each shadow table:
    1. In the Map Tables window that appear with the question asking whether you want to map tables for the subscription, click Yes.
    2. In the Map Tables window, select Custom Table Mapping > Standard and click Next.
    3. On the Select Source Table page, expand the database, schema, or table in the Source Tables list, select the source table for the shadow table, and click Next.
    4. On the Select Target Table page, select the shadow table name and click Next.
    5. On the Specify Key page, select Use an Index, choose the primary key index of the shadow table, and click Next.
    6. On the Set Replication Method page, choose Mirror (Change Data Capture) and click Next.
    7. On the Review Mappings page, if you want create another table mapping, select Create a new table mapping. Otherwise, select Return to the current view.
    8. Click Finish.

What to do next

After you create all table mappings for shadow tables, start your subscription to begin replicating data to the shadow tables. For more information, see Replicating data to shadow tables with IBM InfoSphere CDC Management Console.