If the schema for an existing CDC installation has changed, the CDC configuration must be updated to match the new schema configuration. If this step is not completed, then the correct information will not be extracted from the source tables into the CDC tables.
Schema changes should therefore be performed as follows:
Stop the replicator using trepctl offline:
shell> trepctl offline
Change the schema definition within Oracle.
If multiple tables have been changed, update the
setupCDC.conf
file so that the
delete_publisher
variable is set
to one. This will ensure that the publisher is dropped and recreated
for the entire table set.
To update multiple tables, the entire setup process must be
started again; run the setupCDC.sh command,
using the original configuration file, but with the
delete_publisher
set to
1
:
shell> setupCDC.sh setupCDC.conf
If only one table has changed, or you are adding only a single table, this can be specified on the command-line:
shell> updateCDC.sh setupCDC.conf sampletable
Put the replicator back online with trepctl online:
shell> trepctl online
To add a new table to an existing configuration:
Stop the replicator using trepctl offline:
shell> trepctl offline
Update the configuration using updateCDC.sh, supplying the new table name.
shell> updateCDC.sh setupCDC.conf newtable
If you have used a specific tables file (i.e. with
specific_tables=1
in the
configuration file, make sure that you add the table to the table
file.
Put the replicator back online with trepctl online:
shell> trepctl online