Start ,status and configure the Replicat process of Golden Gate in Oracle
You can start the Replicat to apply the changes that were captured by the Extract Process while the load was running.
You can make GoldenGate try to resolve these errors automatically by adding the HANDLECOLLISIONS parameter to the Replicat
Configuring the Replicat Process:
GGSCI (targetserver) 1> edit params RHREMD1
Replicat RHREMD1
-------------------------------------------------------------------
-- Replicat for HR Schema
-------------------------------------------------------------------
SETENV (NLS_LANG = AMERICAN_AMERICA.AL32UTF8)
USERID GGER@TargetDB, PASSWORD userpw
HandleCollisions
AssumeTargetDefs
Map HR.*, Target HR.* ;
Replicat: parameter to define the GoldenGate ongoing changeReplicat group
USERID: Specify the GoldenGate database user ID and password to connect to the target database.
HANDLECOLLISIONS parameter to have the Replicat attempt to resolve data errors or collisions when applying changes on the target.
ASSUMETARGETDEFS parameter when your source and target tables are identical
MAP parameter to specify the mapping from your source tables to the target tables
Starting and Stopping the Replicat
start rhremd1
Verify the Replicat process
--Check the replicat process is running
GGSCI (targetserver) 2> info replicat RHREMD1
REPLICAT RHREMD1 Last Started 2011-01-22 22:40 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:09 ago)
Log Read Checkpoint File dirdat/l2000003
2011-01-20 14:04:28.998416 RBA 3695
--Check with detail information
GGSCI (targetserver) 3> info replicat RHREMD1, detail
REPLICAT RHREMD1 Last Started 2011-01-22 22:40 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:07 ago)
Log Read Checkpoint File dirdat/l2000003
2011-01-20 14:04:28.998416 RBA 3695
Extract Source Begin End
dirdat/l2000003 2011-01-20 13:57 2011-01-20 14:04
dirdat/l2000003 2011-01-20 13:57 2011-01-20 13:57
dirdat/l2000003 2011-01-20 13:57 2011-01-20 13:57
dirdat/l2000003 2011-01-12 10:59 2011-01-20 13:57
dirdat/l2000001 2011-01-07 08:38 2011-01-12 10:59
dirdat/l2000000 * Initialized * 2011-01-07 08:38
dirdat/l2000000 * Initialized * First Record
dirdat/l2000000 * Initialized * First Record
Current directory /gger/ggs
Report file /gger/ggs/dirrpt/RHREMD1.rpt
Parameter file /gger/ggs/dirprm/RHREMD1.prm
Checkpoint file /gger/ggs/dirchk/RHREMD1.cpr
Process file /gger/ggs/dirpcs/RHREMD1.pcr
Stdout file /gger/ggs/dirout/RHREMD1.out
Error log /gger/ggs/ggserr.log
--Check insert update operation
GGSCI (targetserver) 2> stats rep RHREMD1
Sending STATS request to REPLICAT RHREMD1 ...
Start of Statistics at 2011-01-18 18:50:38.
Replicating from HR.EMPLOYEES to HR.EMPLOYEES:
*** Total statistics since 2011-01-15 13:54:52 ***
Total inserts 4.00
Total updates 0.00
Total deletes 2.00
Total discards 0.00
Total operations 6.00
Total insert collisions 2.00
Note:
1. For SQL Server:
you can use the SOURCEDB parameter with the USERID option.
2. NOHANDLECOLLISIONS
You can do this by removing the HANDLECOLLISIONS parameter in the Replicat parameter file (or adding the NOHANDLECOLLISIONS parameter)
GGSCI (targetserver)> send replicat RHREMD1 NOHANDLECOLLISIONS HR.*
Sending NOHANDLECOLLISIONS request to REPLICAT RHREMD1
RHREMD1 NOHANDLECOLLISIONS set for 1 tables and 1 wildcard entries