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:
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:
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.
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:
- Pause the replication (PAUSE MINE)
- PREPARE the new table. Dbvisit Replicate will give the SCN of where the table will be replicated from.
- Use the SCN from step 2 to load the historical data (Example use datapump with flashback_scn=xxx)
- Resume the replication (RESUME MINE)
Adding new schemas
Removing tables & schemas
To manually remove a table from the replication:
dbvrep> UNPREPARE TABLE schema.table_name
UNPREPARE will only take affect after a restart of the mine process.
Use UNPREPARE SCHEMA command to manually remove the whole schema.