Follow the instructions in this section to prepare the host for Oracle GoldenGate.
Add the users.
Create the user gg on all nodes. Ensure that the gg user is in the same group as the MySQL user mys, because the Oracle GoldenGate user must have access to the MySQL binary log files.
root@psoma1:~# useradd -u 2000 -g dba -m -s /usr/bin/bash -d /export/home/gg gg root@psoma2:~# useradd -u 2000 -g dba -m -s /usr/bin/bash -d /export/home/gg gg
Add the LD_LIBRARY_PATH to the environment of gg on all nodes.
In this example, the /gg entry is the only LD_LIBRARY_PATH entry in the .profile file.
On psoma1 and psoma2:
LD_LIBRARY_PATH=/gg export LD_LIBRARY_PATH
Set the permissions on the Oracle GoldenGate file system.
On Node 1:
root@psoma1:~# chown -R gg:dba/gg
On Node 2:
root@psoma2:~# chown -R gg:dba /gg
Install the Oracle GoldenGate software.
As user gg, untar the Oracle GoldenGate binaries in /gg on psoma1 and psoma2.
gg@psoma1:/gg$ tar xvf /temp/ggs_Solaris_sparc_MySQL_64bit.tar gg@psoma2:/gg$ tar xvf /temp/ggs_Solaris_sparc_MySQL_64bit.tar
Configure the Oracle GoldenGate instances.
As user gg perform the following tasks:
Create the Oracle GoldenGate instance subdirectories.
gg@psoma1:/gg$ ./ggsci GGSCI (psoma1) 1> create subdirs gg@psoma2:/gg$ ./ggsci GGSCI (psoma2) 1> create subdirs
Configure the manager on Node 1.
GGSCI(psoma1) 3> edit params mgr PORT 7809 DYNAMICPORTLIST 7810-7820 AUTORESTART ER *, RETRIES 4, WAITMINUTES 4 STARTUPVALIDATIONDELAY 5 PURGEOLDEXTRACTS /gg/dirdat/mm*, USECHECKPOINTS, MINKEEPHOURS 2 GGSCI (psoma1) 3>
Configure the manager on Node 2.
GGSCI(psoma2) 3> edit params mgr PORT 7909 DYNAMICPORTLIST 7910-7920 AUTORESTART ER *, RETRIES 4, WAITMINUTES 4 STARTUPVALIDATIONDELAY 5 PURGEOLDEXTRACTS /gg/dirdat/mm*, USECHECKPOINTS, MINKEEPHOURS 2 GGSCI(psoma2) 3>
Configure the replicat on Node 1.
GGSCI(psoma1) 11> edit param mysqlrep REPLICAT mysqlrep DBOptions Host psoma1 TargetDB golden USERID gg PASSWORD gg DISCARDFILE /gg1/mysqlrep.dsc, PURGE REPERROR DEFAULT, ABEND AssumeTargetDefsMap Map golden.*, Target golden.*; GGSCI(psoma1) 3>
Add the replicat on Node 1.
GGSCI(psoma1) 11> Add Replicat MySQLREP exttrail /gg1/dirdat/XX nodbcheckpoint
Configure the replicat on Node 2.
GGSCI(psoma2) 11> edit param mysqlrep REPLICAT mysqlrep DBOptions Host psoma2 TargetDB golden USERID gg PASSWORD gg DISCARDFILE /gg1/mysqlrep.dsc, PURGE REPERROR DEFAULT, ABEND AssumeTargetDefsMap Map golden.*, Target golden.*; GGSCI(psoma2) 3>
Add the replicat on Node 2.
GGSCI(psoma2) 11> Add Replicat MySQLREP exttrail /gg1/dirdat/XX nodbcheckpoint
Define the Ipv6 policy on both the nodes.
GGSCI(psoma1) >edit params ./GLOBALS USEIPV6 GGSCI(psoma2) >edit params ./GLOBALS USEIPV6
Start the manager on both the nodes.
GGSCI(psoma1) > start mgr GGSCI(psoma2) >start mgr
Start the replicat processes on both the nodes.
GGSCI(psoma1) > start er * GGSCI(psoma2) > start er *
Check if all the processes are running on both the nodes.
GGSCI(psoma1) > info all GGSCI(psoma2) > info all
Stop the replicat processes on both the clusters
GGSCI(psoma1) > stop er * GGSCI(psoma2) > stop er *
Stop the manager process on both the clusters.
GGSCI(psoma1) > stop mgr ! GGSCI(psoma1) > exit GGSCI(psoma2) > stop mgr ! GGSCI(psoma2) > exit
Kill the server process on the nodes with replicats configured.
psoma1 # pkill -f server psoma2 # pkill -f server
Create the Oracle GoldenGate resources.
psoma1 # clrt register ORCL.GoldenGate psoma1 # clrs create -d -g db1-rg \ -t GoldenGate \ -p user{psoma1}=gg \ -p user{psoma2}=gg \ -p Basepath{psoma1}=/gg \ -p Basepath{psoma2}=/gg -p port{psoma1}=7809 \ -p port{psoma2}=7909 -p parameter_file{psoma1}=/gg/dirprm/mgr.prm \ -p parameter_file{psoma1}=/gg/dirprm/mgr.prm \ -p database_resource{psoma1}=mys-rs \ -p database_resource{psoma2}=mys-rs \ -p resource_dependencies=mys-rs{LOCAL_NODE} \ gg1-rs psoma1# clrs enable gg-rs