Professional Documents
Culture Documents
How To Add New Tables For OGG Replication in The Current Running Extract and Replicat
How To Add New Tables For OGG Replication in The Current Running Extract and Replicat
How To Add New Tables For OGG Replication in The Current Running Extract and Replicat
i)using handlecollisions
----------------------------
1)stop the extract,pump and replicat
once the extract is stopped, wait for the pump to catch up before stopping it.
once the pump is stopped, wait for the replicat to catch up before stopping it.
2)Enable Supplemental Logging at Table Level on source side
GGSCI> dblogin userid xxxxx password xxxxxx
3)include the tables that you need to add into the extract parameter file and save it
4)start the extract
5)include the tables that you need to add into the extract pump parameter file and save
it
6)start the pump
7)do the initial load for the the new tables( ie you can take the export and import of the
new tables that need to to added for replication from source the target database)
8)Wait for the initial load(export and import) to be completed and then include the
tables that you need to add into the replicat parameter file with HANDLECOLLISIONS
parameter
eg: MAP hr.dep, TARGET hr.dep, HANDLECOLLISIONS;
MAP hr.country, TARGET hr.country, HANDLECOLLISIONS;
note:- 4 and 5th step can be skipped if the pump is not configured.
CURRENT_SCN
------------------------
5343407
8) Check that there are no open DML transactions against the table. If there are open
transactions, make sure that their starting SCN is higher than the one obtained in step
4) , i.e. 5343407
9)re-sync the the newly added table from source to target(using normal export/import).
Make sure to use FLASHBACK_SCN parameter for the export.
10) Add the table in the replicat parameter file including the below option till 11g
( FILTER ( @GETENV ("TRANSACTION", "CSN") > <scn_number obtained from source
db>) ) and for 12c onwards it will be like ( FILTER ( @GETENV ('TRANSACTION', 'CSN')
> <scn_number obtained from source db>) ) as shown in the below example
eg:-
till OGG 11g
MAP source.test1, TARGET target.test1 ,FILTER ( @GETENV ("TRANSACTION", "CSN")
> 5343407);
MAP source.test2, TARGET target.test2 ,FILTER ( @GETENV ("TRANSACTION", "CSN")
> 5343407);
for OGG 12c ownward the staement will be like below:
MAP source.test1, TARGET target.test1 ,FILTER ( @GETENV ('TRANSACTION', 'CSN') >
5343407);
12)verify the tables on source and table and once the lag is zero remove the filter
parameter from the replicat parameter file and restart.