Versions Compared

Key

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

 Adding new tables

Once the replication has been configured and is running, new objects can be added to the replication. 
New tables can be replicated with the command*:

Section
Column
width5%

 

Column
width95%
Panel
bgColorCCC
dbvrep> PREPARE TABLE schema.table_name

The table needs to exist on both the source and target before this command can be given. If the table was created recently, make sure that mine has already parsed the logs beyond the time of the table creation, so it learned that the table exists. Ensure that the appropriate privileges are given to the Dbvisit Replicate owner on both the source and target. The privileges are:

Section
Column
width5%

 

Column
width95%
Panel
bgColorCCC
SQL> grant select, update, insert, delete to dbvrep;

If a DDL replication was enabled during the Setup Wizard (Step 2 - Replication pairs), the Dbvisit Replicate owner on the target database already has SELECT/INSERT/UPDATE/DELETE ANY privileges. No other grants should be necessary.

* Note: If a whole schema is replicated, then new tables in the source database will automatically be created in the target database (Oracle target databases only). 

Loading data before table is added to replication

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. To ensure there is no gap between loading the historical data and starting the replication, we recommend the following steps:

  1. Pause the replication (PAUSE MINE)
  2. PREPARE the new table. Dbvisit Replicate will give the SCN of where the table will be replicated from.
  3. Use the SCN from step 2 to load the historical data (Example use datapump with flashback_scn=xxx)
  4. Resume the replication (RESUME MINE)

Removing tables

To manually remove a table from the replication:

Section
Column
width5%

 

Column
width95%
Panel
bgColorCCC
dbvrep> UNPREPARE TABLE schema.table_name

UNPREPARE will only take affect after a restart of the mine process.

Adding new schema