...
Section | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
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.
For 2-way replication this process is slightly more complicated. One cannot simply take a source data as of given SCN and move it to the target server, as these data would be replicated back to the source as soon as the apply process is resumed (which would cause replication conflicts on the source server). It is necessary to label the data for the apply process to recognize it and ignore it.
To ensure data is synchronized correctly and there is no gap between loading the historical data and starting the replication, follow these steps:
1. Pause the apply processes
It is necessary to pause the apply process for both replication directions. To do so choose one replication, pause the first apply process and then choose the second replication a pause the second apply process:
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 APPLY)
Note that the table needs to exist on the target side before the apply process can be resumed. Using a datapump in step 3 is a good choice, since the import creates table automatically if it does not exist.