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.
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:
- Log in to the InfoSphere CDC
Management Console as access-server-user in the access-server-host.
- Create an InfoSphere CDC subscription:
- Click , right-click the
project and select New Subscription.
- 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.
- 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.
- In the New Subscription window,
click OK.
- In the message window that appears about specifying
the same data store as the source and target, click Yes to
continue.
- Create a table mapping for each shadow table:
- In the Map Tables window
that appear with the question asking whether you want to map tables
for the subscription, click Yes.
- In the Map Tables window, select and click Next.
- 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.
- On the Select Target Table page,
select the shadow table name and click Next.
- On the Specify Key page, select Use
an Index, choose the primary key index of the shadow table,
and click Next.
- On the Set Replication Method page,
choose Mirror (Change Data Capture) and click Next.
- 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.
- 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.