Run the Initial Load in Golden Gate for start replication in Oracle
Prerequisites for the Golden Gate before the Initial Load:
Before starting the GoldenGate initial load, make sure the following tasks have been completed:
• You must disable any foreign-key constraints on the target tables to prevent errors. Also disable check constraints to speed up performance.
• Disable any triggers on the target tables.
Configure Initial Load
GGSCI (sourceserver) 1> edit params IHREMD1
Extract IHREMD1
-------------------------------------------------------------------
-- Initial Load extract for HR schema
-------------------------------------------------------------------
SETENV (NLS_LANG = AMERICAN_AMERICA.AL32UTF8)
USERID GGER@SourceDB, PASSWORD userpw
RmtHost targetserver, mgrport 7840
RmtTask Replicat, Group DHREMD1
Table HR.*;
Adding the Initial-Load Extract
GGSCI (sourceserver) > ADD EXTRACT IHREMD1, SOURCEISTABLE
Note:
SOURCEISTABLE Parameter: specify that this Extract is used only for initial loading and to capture all the records from the source database for loading into the target database
Configuring the Initial-Load Replicat
GGSCI (targetserver) 1> edit params DHREMD1
Replicat DHREMD1
-------------------------------------------------------------------
-- Initial load replicat for HR schema
-------------------------------------------------------------------
SETENV (NLS_LANG = AMERICAN_AMERICA.AL32UTF8)
USERID GGER@TargetDB, PASSWORD userpw
AssumeTargetDefs
Map HR.*, Target HR.* ;
Note:
REPLICAT parameter to define the GoldenGate initial-load Replicat group.You can use naming standard for your reference.
ASSUMETARGETDEFS parameter when the source and target tables are identical. In the example, the HR schema on the source and target is identical.
MAP parameter to specify the mapping from your source tables to the target tables
Adding the Initial-Load Replicat
GGSCI (targetserver) > ADD REPLICAT DHREMD1, SPECIALRUN
Starting the Golden Gate Initial Load
GGSCI (sourceserver) > START EXTRACT IHREMD1
GGSCI (sourceserver) > STOP EXTRACT IHREMD1
Verifying the Initial Load
GGSCI (targetserver) > VIEW REPORT DHREMD1