Go to main content

Oracle® Solaris Cluster Data Service for Oracle GoldenGate Guide

Exit Print View

Updated: June 2021
 
 

Host Preparation for Oracle GoldenGate

Follow the instructions in this section to prepare the host for Oracle GoldenGate.

  1. Configure the storage for Oracle GoldenGate.

    On Cluster 1:

    psoma1 # clrs create -t SUNW.HAStoragePlus -g db1-rg -p zpools=gg2 gg-hsp-rs
    psoma1 # clrs enable gg-hsp-rs

    On Cluster 2:

    vzsoma1a # clrs create -t SUNW.HAStoragePlus -g db2-rg -p zpools=gg1 gg-hsp-rs
    vzsoma1a # clrs enable gg-hsp-rs
  2. Add the users.

    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
    root@vzsoma1a:~# useradd -u 2000 -g dba -m -s /usr/bin/bash -d /export/home/gg gg
    root@vzsoma1a:~# useradd -u 2000 -g dba -m -s /usr/bin/bash -d /export/home/gg gg
  3. Add the LD_LIBRARY_PATH to the environment of gg on all nodes.

    In this example, the /gg1 or the /gg2 entry is the only LD_LIBRARY_PATH entry in the .profile file.

    On psoma1 and psoma2:

    LD_LIBRARY_PATH=/gg2
    export LD_LIBRARY_PATH

    On vzsoma1a and vzsoma2a:

    LD_LIBRARY_PATH=/gg1
    export LD_LIBRARY_PATH
  4. Set the permissions on the shared file system.

    On Cluster 1:

    root@psoma1:~# chown -R gg:dba/gg2

    On Cluster 2:

    root@vzsoma1a:~# chown -R gg:dba/gg1
  5. Install the Oracle GoldenGate software.

    As user gg, untar the Oracle GoldenGate binaries in /gg1 on vzsoma1a and /gg2 on psoma1, assuming these are the nodes which own the shared storage.

    gg@psoma1:/gg2$ tar xvf /temp/ggs_Solaris_sparc_MySQL_64bit.tar
    gg@vzsoma1a:/gg1$ tar xvf /temp/ggs_Solaris_sparc_MySQL_64bit.tar
  6. Configure the Oracle GoldenGate instances.

    As user gg perform the following tasks:

    1. Create the Oracle GoldenGate instance subdirectories.

      gg@vzsoma1a:/gg1$ ./ggsci
      GGSCI(vzsoma1a) 1> create subdirs
      gg@psoma1:/gg2$ ./ggsci
      GGSCI(psoma1) 1> create subdirs
    2. Configure the manager on Cluster 1.

      GGSCI(psoma1) 3> edit params mgr
      PORT 7809
      DYNAMICPORTLIST  7810-7820
      AUTORESTART  ER *, RETRIES 4, WAITMINUTES 4
      STARTUPVALIDATIONDELAY  5
      PURGEOLDEXTRACTS  /gg2/dirdat/mm*, USECHECKPOINTS, MINKEEPHOURS 2
      GGSCI (psoma1) 3>
    3. Configure the manager on Cluster 2.

      GGSCI(vzsoma1a) 3> edit params mgr
      PORT 7909
      DYNAMICPORTLIST  7910-7920
      AUTORESTART  ER *, RETRIES 4, WAITMINUTES 4
      STARTUPVALIDATIONDELAY  5
      PURGEOLDEXTRACTS  /gg1/dirdat/mm*, USECHECKPOINTS, MINKEEPHOURS 2
      GGSCI(vzsoma1a) 3>
    4. Configure the extract on Cluster 1.

      GGSCI(psoma1) 9> edit param mysqlext
      EXTRACT  mysqlext
      DBOptions  Host soma-3
      SourceDB  golden UserID gg Password gg
      TranLogOptions  AltLogDest /mys2/data/logs/bin-log.index
      DISCARDFILE  /gg2/mysqlext.dsc, PURGE
      RMTHOST  soma-1, MGRPORT 7909
      RMTTRAIL  /gg1/dirdat/XX
      TABLE  golden.*;
    5. Add the extract on Cluster 1.

      GGSCI(psoma1) > Add Extract MySQLEXT TranLog Begin now
    6. Add the remote trail on Cluster 1.

      GGSCI(psoma1) >Add RmtTrail /gg1/dirdat/XX extract MySQLEXT
    7. Configure the replicat on Cluster 2.

      GGSCI(vzsoma1a) 11> edit param mysqlrep
      REPLICAT  mysqlrep
      DBOptions  Host soma-1
      TargetDB  golden USERID gg PASSWORD gg
      DISCARDFILE  /gg1/mysqlrep.dsc, PURGE
      REPERROR  DEFAULT, ABEND
      AssumeTargetDefsMap  golden.*, Target golden.*;
    8. Add the replicat on Cluster 2.

      GGSCI(vzsoma1a) 11> Add Replicat MySQLREP \
      exttrail /gg1/dirdat/XX  nodbcheckpoint
    9. Define the Ipv6 policy on both the clusters.

      GGSCI(psoma1) >edit params ./GLOBALS
      USEIPV6
      GGSCI(vzsoma1a) >edit params ./GLOBALS
      USEIPV6
    10. Start the manager on both the clusters.

      GGSCI(psoma1) > start mgr
      GGSCI (vzsoma1a) >start mgr
    11. Start the extract and replicat processes on both the clusters.

      GGSCI(psoma1) > start er *
      GGSCI(vzsoma1a) > start er *
    12. Check if all the processes are running on both the clusters.

      GGSCI(psoma1) > info all
      GGSCI(vzsoma1a) > info all
    13. Stop the extract and replicat processes on both the clusters

      GGSCI(psoma1) > stop er *
      GGSCI(vzsoma1a) > stop er *
    14. Stop the manager process on both the clusters.

      GGSCI(psoma1) > stop mgr !
      GGSCI(psoma1) > exit
      GGSCI(vzsoma1a) > stop mgr !
      GGSCI(vzsoma1a) > exit
    15. Kill the server process on the cluster with replicats configured.

      vzsoma1a # pkill -f server
  7. Create the Oracle GoldenGate resources.

    psoma1 # clrt register ORCL.GoldenGate
    psoma1 # clrs create -d -g db1-rg \
    -t GoldenGate \ 
    -p user=gg \
    -p Basepath=/gg2 \
    -p port=7809 \
    -p parameter_file=/gg2/dirprm/mgr.prm \
    -p database_resource=mys-rs \
    -p resource_dependencies=mys-rs,soma-3 \  
    -p resource_dependencies_offline_restart=gg-hsp-rs \ 
    gg2-rs
    psoma1 # clrs enable gg2-rs
           
    
    vzsoma1a # clrt register ORCL.GoldenGate
    vzsoma1a # clrs create -d -g db2-rg \
    -t GoldenGate \
    -p user=gg \
    -p Basepath=/gg1 \
    -p port=7909 \
    -p parameter_file=/gg1/dirprm/mgr.prm \ 
    -p database_resource=mys-rs \
    -p resource_dependencies=mys-rs,soma-1 \
    -p resource_dependencies_offline_restart=gg-hsp-rs \ 
    gg1-rs
    vzsoma1a # clrs enable gg1-rs