To perform an unsupported table operation on a source table
that has a shadow table, you must drop the shadow table and performing
the appropriate actions to quickly restart replication.
Before you begin
- Ensure that you can log in to the InfoSphere
CDC Management Console as access-server-user.
- Ensure that you have access to the datastore for your shadow tables.
Procedure
To perform an unsupported table operation on a source
table that has a shadow table:
- Log in to the InfoSphere
CDC Management Console as access-server-user.
- Stop replication:
- Click .
- Right-click the subscription, and select End
Replication.
- Select Normal and click OK.
- Drop the table mapping for the shadow table:
- Click .
- Right-click the table mapping for the shadow table,
select Delete, and click Yes.
- Drop the shadow table.
In the following example,
the source table is DTW.TRADE and the shadow table is DTW.TRADE_SHADOW.
$ db2 drop db DTW.TRADE_SHADOW
- Complete the table operation on the source table.
For
example:
$ db2 alter table DTW.TRADE alter column i1 set data type bigint
- Reorganize the source table:
$ db2 reorg table DTW.TRADE
- Re-create the shadow table:
$ db2 "create table DTW.TRADE_SHADOW as
(select * from DTW.TRADE)
data initially deferred
refresh deferred
maintained by replication
organize by column"
$ db2 "set integrity for DTW.TRADE_SHADOW all immediate unchecked"
$ db2 "alter table DTW.TRADE_SHADOW
add constraint DTW.TRADE_SHADOW_pk primary key (pk)"
- Re-create the table mapping for the shadow
table.
- Start mirroring:
- Click .
- Right-click the subscription, and select Start
Mirroring.
- Select Continuous and click OK.