Practices for Lesson 13: Overview
TKN-SRC-DBNAME = @GETENV ( 'DBENVIRONMENT' , 'DBNAME' ),
TKN-SRC-DBVERSION = @GETENV ( 'DBENVIRONMENT' , 'DBVERSION' ), TKN-TXN-CSN = @GETENV ( 'TRANSACTION' , 'CSN' )
);
Save and close the file.
6. On the source server AMER_WEST_GGSCI tab, add the Extract group and two local Extract Trails by executing the following GGSCI commands:
GGSCI (AMER)> DBLogin UserIDAlias gguamer
Successfully logged into database.
GGSCI (AMER)> Add Extract efuncs, TranLog, Begin Now
EXTRACT added.
Oracle Internal & Oracle
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Practices for Lesson 13: Configuration Options
Chapter 13 - Page 8
Setting Up the First GoldenGate Extract Data Pump (pfuncs)
7. On the source server AMER_WEST_GGSCI tab, configure the first Extract Data Pump to read from the local Extract Trail ./dirdat/ex, transmit the data to the target server, and write it to the Remote Trail ./dirdat/px:
GGSCI (AMER) > Edit Param pfuncs
Your text editor opens the empty pfuncs.prm file. Add the following runtime parameters to the text file:
Extract pfuncs
RmtHost easthost, MgrPort 15001, Compress RmtTrail ./dirdat/px
Passthru Table WEST.*;
Save and close the file.
8. On the source server AMER_WEST_GGSCI tab, add the Extract group by executing the following commands:
GGSCI (AMER)> Add Extract pfuncs, ExtTrailsource ./dirdat/ex
EXTRACT added.
GGSCI (AMER)> Add RmtTrail ./dirdat/px, Extract pfuncs
RMTTRAIL added.
GGSCI (AMER) >
Oracle Internal & Oracle
Setting Up the Second Oracle GoldenGate Extract Data Pump (pfunca)
9. On the source server AMER_WEST_GGSCI tab, configure the second Extract Data Pump to read from the local Extract Trail ./dirdat/ec, transmit the data to the target server, and write it to the Remote Trail ./dirdat/pc:
GGSCI (AMER) > Edit Param pfunca
The text editor of your choice opens the empty pfunca.prm file. Add the following runtime parameters to the text file:
Extract pfunca
RmtHost easthost, MgrPort 15001, Compress RmtTrail ./dirdat/pc
Passthru Table WEST.*;
10. On the source server AMER_WEST_GGSCI tab, add the Extract group by executing the following commands:
GGSCI (AMER)> Add Extract pfunca, ExtTrailsource ./dirdat/ec GGSCI (AMER)> Add RmtTrail ./dirdat/pc, Extract pfunca
Creating the Oracle GoldenGate Checkpoint Table
On the target server, Replicat checkpoints to a special table created in the database. This checkpoint table ensures that the Replicat checkpoint is part of the transaction and is used to ensure data integrity. If it does not already exist, create the checkpoint table:
11. On the target server EURO_EAST_GGSCI tab, start GGSCI and execute the following startup commands. If you are still logged in to GGSCI from a previous lab, skip this task and just continue with the next task.
[OS_prompt gg_euro] rlggsci
GGSCI (EURO) 1> DBLogin UserIDAlias ggueuro
Successfully logged into database.
GGSCI (EURO) 2> Info CheckpointTable
No checkpoint table specified, using GLOBALS specification (GGS_CHECKPOINT)... Checkpoint table GGS_CHECKPOINT does not exist.
GGSCI (EURO) 3> Add CheckpointTable
No checkpoint table specified, using GLOBALS specification (GGS_CHECKPOINT)... Successfully created checkpoint table GGS_CHECKPOINT.
Oracle Internal & Oracle
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Practices for Lesson 13: Configuration Options
Chapter 13 - Page 10
Setting Up Oracle GoldenGate Delivery (Two Replicats: rfunca and rfunc)
12. On the target server EURO_EAST_GGSCI tab, configure the Replicat Delivery components: GGSCI (EURO) > Edit Param rfunca
The editor of your choice opens the empty rfunca.prm file. Add the following runtime parameters to the text file:
NoList Include ./dirmac/macrolib.mac List Replicat rfunca #dbconnect () SourceDefs ./dirdef/section13.defs DiscardFile ./dirrpt/rfunca.dsc, Purge #bpsettings ()
#funcsmap (WEST.WSHOP_FUNCS, EAST.WSHOP_FUNCS) Map WEST.CUST_ZIP, TARGET EAST.CUST_CITY_STATE, SQLEXEC (ID ZIPLKUP,
QUERY ' SELECT zip_city, zip_state FROM east.zip_lookup WHERE zip = :vzip ',
PARAMS (vzip = cust_zip)), ColMap (usedefaults,
cust_city = @GETVAL (ZIPLKUP.zip_city), cust_state = @GETVAL (ZIPLKUP.zip_state) );
Note the QUERY has 'single, straight' quotes. Save and close the file. 13. On the EURO_EAST_GGSCI tab, execute the command:
GGSCI (EURO) > Edit Param rfunc
The text editor of your choice opens the empty rfunc.prm file. Add the following runtime parameters to the text file:
Replicat rfunc UserIDAlias ggueuro AssumeTargetDefs
DiscardFile ./dirrpt/rfunc.dsc, Purge
DecryptTrail AES256 KeyName MyKey3
Map WEST.*, Target EAST.*;
Save and close the file.
14. On the EURO_EAST_GGSCI tab, add the Replicats by executing the following commands: GGSCI (EURO)> Add Replicat rfunc, ExtTrail ./dirdat/px
GGSCI (EURO)> Add Replicat rfunca, ExtTrail ./dirdat/pc
15. Ensure on both systems that the manager is up and running (if not, start the Manager): GGSCI (both)> Info mgr
GGSCI (both)> Start mgr
Oracle Internal & Oracle
16. In the GG_AMER_HOME window, start all the extracts: GGSCI (AMER)> Start ER ef*
Sending START request to MANAGER ... EXTRACT EFUNCS starting
GGSCI (AMER)> Start ER pf*
Sending START request to MANAGER ... EXTRACT PFUNCA starting
Sending START request to MANAGER ... EXTRACT PFUNCS starting
GGSCI (AMER)>
Verify that all process from this practice are running by executing the Info ER *
command. You do not care if other processes from previous labs (such as erange*) are stopped.
17. In the GG_EURO_HOME window, start all the Replicats: GGSCI (EURO) > Start ER rf*
Sending START request to MANAGER ... REPLICAT RFUNC starting
Sending START request to MANAGER ... REPLICAT RFUNCA starting
GGSCI (EURO) >
Verify that all process are running by executing the Info ER * command. You do not care if other processes from previous labs (such as rrange*) are stopped.
Note: The Replicats may already be running if the mgr.prm was not deleted in an earlier
lab.
This completes Practice 13-2. Continue now with Practice 13-3.
Oracle Internal & Oracle
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Practices for Lesson 13: Configuration Options
Chapter 13 - Page 12