Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Adding new tables

...

In one-to-many replication, you have to choose replicaiton process which replication process you want the new table to belong to before preparing the table for replication.

Section
Column
width5%

 

Column
width95%
Panel
bgColorCCC
dbvrep> CHOOSE REPLICATION APPLY
dbvrep> PREPARE TABLE schema.table_name
 
dbvrep> CHOOSE REPLICATION APPLY1
dbvrep> PREPARE TABLE schema.table_name

...

When a new table is added to the replication, it is usually necessary to ensure that the historical data is in the target table before the replication starts. This is also called data instantiation. To ensure there is no gap between loading the historical data and starting the replication, we recommend the following steps:

...

Info

The PREPARE commands add supplemental logging to the table if it was not there yet. This can unfortunately sometimes result in the ORA-01466 error while performing step 3.

Therefore, use following If this happens, we recommend using the internal commands to prepare a new table. In following example, scott.emp table is prepared. It first adds the supplemental logging, then waits for the SCN to advance then it does the actual PREPARE: 

dbvrep>ENGINE SUPPLEMENTAL LOGGING TABLE SCOTT.EMP ENABLE PRIMARY KEY
dbvrep>ENGINE WAIT_SCN_FLIP
dbvrep>PREPARE TABLE SCOTT.EMP

Note that the table needs to exist on the target side before the apply process can be resumed. Using datapump in step 3 is a good choice, since the import creates the table automatically if it does not exist.

...

All the tables within the schema including the historical data must be initialized in the same way as described above for the single table preparation. Follow those steps to ensure there is no data missing on the target side before the replication is started. 

Removing tables & schemas

...