This article will demonstrate how to perform a OGG Initial Load using the Trail to Replicat technique. You can see part 1 here . In this article, we get by the bug since we are on a version higher than 188.8.131.52.1.
Using this method, there is no limit on the amount of data that can be loaded initially. This particular run created 117 2GB trail files on the target to be loaded by the initial load replicat.
Other Initial Load techniques and their advantages and disadvantages can be found here .
OGG is installed on source and target systems
The source database is DB2 on z/OS mainframe with OGG 184.108.40.206.5.
The target database is Oracle:
OGG : 220.127.116.11.7
Database : 18.104.22.168
Linux : OEL 6 ( 64 bit )
Trail to Replicat Steps
1. Configure the initial-load processes
extract ildb2 sourceistable sourcedb db2t, userid ggcap, password ggcap rmthost target_server, mgrport 7809, tcpbufsize 1048576, tcpflushbytes 1048576 rmtfile ./dirdat/la, megabytes 2048, maxfiles 999 TABLE user.table1;
replicat ilrdb2 END RUNTIME SETENV(ORACLE_HOME="/u01/app/oracle/product/22.214.171.124/dbhome_1") SETENV(ORACLE_SID="ORA11G") SETENV(NLS_LANG="AMERICAN_AMERICA.AL32UTF8") UserID ggrep, Password ggrep SOURCEDEFS ./dirdef/db2t_source_tabs.def DISCARDFILE ./dirrpt/ilrdb2.dsc, Purge MAP user.table1, TARGET user.table1;
2. Configure the change-synchronization processes
This is the normal replication methods, so I will not cover them here to keep things short. You can see example of this in some of my other posts.
3. Start the change-synchronization Extract
GGSCI> start extract cdb2
4. Start the initial-load extract
GGSCI> add extract ildb2 , sourceistable GGSCI> start extract ildb2
You should observe the following:
* the collector starting on target as seen in the ggserr.log
* the trail files in dirdat directory on target ( $GG_HOME/dirdat/rt* )
* report file in dirrpt directory on source
Monitor the ildb2.rpt report file for any errors.
5. Start the initial-load replicat on the target environment
Since we are using normal trail files here, the replicat can be started w/o having to wait on the initial-load extract to complete. We are also using the checkpoint table here so the process can be restarted if necessary.
GGSCI> DBLogin UserID ggrep, Password ggrep GGSCI> add replicat ilrdb2, ExtTrail ./dirdat/aa, CheckPointTable ggrep.ggs_checkpoint GGSCI> start replicat ilrdb2
Monitor the report file for the initial-load replicat and wait until it the intiial-load extract is complete and the replicat is at the EOF with no more records to process. If there are no errors, then you can continue on to the next step.
6. Start the change-synchronization Replicat
GGSCI> start replicat rdb2
7. Turn off HANDLECOLLISIONS
SEND REPLICAT rdb2, NOHANDLECOLLISIONS
Lastly, edit the replicat parameter file and remove HANDLECOLLISIONS so that it is not enabled next time the replicat restarts.