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:

...

  1. Pause the apply process (PAUSE APPLY)
  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 APPLY)
Note

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

Therefore, use following 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:

 

Section
Column
width5%

 

Column
width95%
Panel
bgColorCCC
dbvrep>ENGINE SUPPLEMENTAL LOGGING TABLE SCOTT.EMP ENABLE PRIMARY KEY
dbvrep>ENGINE WAIT_SCN_FLIP
dbvrep>PREPARE TABLE SCOTT.EMP

(impdp does not actually compare the SCNs, but timestamp converted using dbms_flashback to SCN and the last_ddl time in dba_objects),

 

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.

...