Golden Gate Installation Guide

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 15

ONB - Golden Gate Installation and Configuration Guide

Last Update: 12-Aug-2010

Uncontrolled when printed, golden source is Process


Assets Library (PAL)
Version 3.2

Page 1 of 15

ONB - Golden Gate Installation and Configuration Guide

Last Update: 12-Aug-2010

Uncontrolled when printed, golden source is Process


Assets Library (PAL)
Version 3.2

Page 2 of 15

ONB - Golden Gate Installation and Configuration Guide

Last Update: 12-Aug-2010

Golden Gate Installation Guide

Document Version: 3.2


Release date: 18 Aug
201019.08.03 13:02

INTERNAL USE ONLY

Uncontrolled when printed, golden source is Process


Assets Library (PAL)
Version 3.2

Page 3 of 15

ONB - Golden Gate Installation and Configuration Guide

Last Update: 12-Aug-2010

Change History
Release

Date

Author

Reason for Change

0.1

21-July-2010

Agilan Palani

Draft Version

0.2

28-July-2010

Again Palani

Based upon the feed back from DES

0.3

30-July-2010

Agilan Palani

Modified based upon IES guidelines

2.0

18-Aug-2010

Agilan Palani

Modified based on DB Schema standards

3.2

20-Aug-2010

Agilan Palani

Updated the startmanager script

3.3

22-Nov-2011

Anh Vu

Update the MGR parameter to purge old files

Approval & Sign-off


This document has been issued to the following persons for approval and sign-off
Date

Role

Name

Uncontrolled when printed, golden source is Process


Assets Library (PAL)
Version 3.2

Page 4 of 15

ONB - Golden Gate Installation and Configuration Guide

Last Update: 12-Aug-2010

CONTENTS
1.

INTRODUCTION..................................................................................................................................................4
1.1
1.2
1.3
1.4

2.

INSTRUCTIONS....................................................................................................................................................5
2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
2.9
2.10
2.11
2.12
2.13

3.

PURPOSE...........................................................................................................................................................4
INTENDED AUDIENCE.......................................................................................................................................4
SCOPE...............................................................................................................................................................4
REFERENCES.....................................................................................................................................................4
DOWNLOAD......................................................................................................................................................5
SOURCE [CAAA DATA BASE SERVER] - UNIX REQUIREMENTS/SETUP...........................................................5
UNIX USERS GGATE & GGDBA SETUP..............................................................................................................6
TARGET [FX4CASH DATABASE SERVER] UNIX REQUIREMENTS/SETUP.......................................................7
MONITORING REQUIREMENT (BOTH IN SOURCE AND TARGET)......................................................................7
SOURCE [CAAA DATABASE] DATABASE REQUIREMENTS..............................................................................8
TARGET [ FX4CASH DATABASE ] DATABASE REQUIREMENTS.......................................................................8
SOURCE & TARGET - ORACLE CLIENT INSTALLATION....................................................................................8
SOURCE & TARGET - DISK SPACE REQUIREMENTS.........................................................................................9
SOURCE & TARGET - MEMORY REQUIREMENTS.............................................................................................9
DATABASE SETUP SOURCE[CAAA] ON-BOARDING.................................................................................10
DATABASE SETUP - TARGET [FX4CASH] FX4CASH......................................................................................11
INSTALLING GOLDEN GATE SOURCE & TARGET........................................................................................12

APPENDIX...........................................................................................................................................................13
3.1

LIST OF DICTIONARY TABLES WHICH GOLDEN GATE REQUIRES SELECT ACCESS...........................................13

Uncontrolled when printed, golden source is Process


Assets Library (PAL)
Version 3.2

Page 5 of 15

ONB - Golden Gate Installation and Configuration Guide

Last Update: 12-Aug-2010

1. INTRODUCTION
1.1 Purpose
The purpose of this document is to detail the steps involved in installation the golden gate for
On-boarding application

1.2 Intended audience


Intended audiences of this document are as follows:

Infrastructure Team
DBA Team
Relevant Stakeholders of the project

1.3 Scope
Golden gate is a tool, which replicates the data & DDL from one database to another
database. This document explains the steps involved in installation of golden gate for Onboarding application acting as source and the first target application as FX4CASH.

1.4 References
Golden gate Installtion Guide: gg_ora_inst_v104.pdf

Uncontrolled when printed, golden source is Process


Assets Library (PAL)
Version 3.2

Page 6 of 15

ONB - Golden Gate Installation and Configuration Guide

Last Update: 12-Aug-2010

2. INSTRUCTIONS
2.1 Download
For Oracle 10G
Download the goldgate software from the below URL Oracle 10.0.4.0 & Sun Spark
Solaris 10 64 bit. The goldengate version is 10.4.0.19
http://www.oracle.com/technology/software/products/goldengate/index.html
Accept the OTN license.
Download the following.
Oracle GoldenGate v10.4.0.x for Oracle 10g 64bit on Solaris 10 (53 MB)
Solaris-V18148-01.zip

2.2 Source [CAAA Data Base Server] - Unix requirements/Setup


1. Access to the ONB Database Server (Sun Spark Solaris 10 64 bit.) The
following must have the same bit type, either all 32-bit, all 64-bit
GoldenGate version
Oracle library versions
Database versions
2. Create two new UNIX account ggate and ggdba with the following
setup, ggdba should be in the dba group
Account

Requirements

Comments

ggate

uid=1727(ggate) gid=2040(ggate)

Oracle GoldenGate software must be

Home directory /export/home/ggate

installed with this account.


GoldenGate manager process need
to started through su privilege
executing startup shell script as

ggdba

uid=2184(ggdba) gid=1279(gguser),

ggdba account.
ggdba is a special account that

gid=2040(ggate), gid=302 (dba)

would not be accessed by ggate

Home directory /export//home/ggdba

directly other than running script to


start manager process for
GoldenGate. Startup scripts would
be managed by IES support.

3. Assign the proper home directory for ggate and ggdba


4. ggate requires read/execute access to the following resources. Oracles
shared libraries & tnsnames.ora
5. All the binaries, configuration files, custom files and installation will be
owned by ggate account.
6. Create a file system for 20 GB (for Prod), 5 GB (for non prod) owned by
ggate account mounted under the directory as per the standard for
example /app/goldengate/instances/<gg_instance>

Uncontrolled when printed, golden source is Process


Assets Library (PAL)
Version 3.2

Page 7 of 15

ONB - Golden Gate Installation and Configuration Guide


7.
8.

Last Update: 12-Aug-2010

Make sure that the oracle sqlplus client is installed. Sqlplus client should NOT be the instant
sql plus client it should be the standard full Sqlplus client
Open the port 8907

2.3 Unix Users ggate & ggdba setup


1. Create the .profile with the following content for ggate user
sh-ggate> vi $HOME/.profile
set -o vi
export EDITOR=vi
export TIMEOUT=0
export TMOUT=86400
PATH = <path to oracle home>/bin:$PATH
export PATH
GG_INSTANCE_ROOT=<Golden gate instances directory e.g /app/goldengate/instances>
export GG_INSTANCE_ROOT
#If ggate user is shared by Xple environments, use separate profiles for GG_INS
GG_INS=prd
export GG_INS
#If ggate user is shared by Xple environments, use separate profiles for GG_HOME
GG_HOME=$GG_INSTANCE_ROOT/$GG_INS
export $GG_HOME
#If ggate user is shared by Xple environments, use separate profiles for the
#ORACLE_HOME
ORACLE_HOME=<Oracle Home, Get it from DBA>
export ORACLE_HOME
#If ggate user is shared by Xple environments, use separate profiles for
#LD_LIBRARY_PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$GG_HOME:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
TNS_ADMIN=<path to tns admin>
export TNS_ADMIN

2. Create additional profiles for each environment for ggate user


There would be one ggdba and ggate unix users per database server machine. If the
database server is shared with multiple test environments, GG_INS variable should
not be set in the .profile of ggate. Instead use separate .profile_<env>.sh for each
environment and set up the following variables appropriately.

sh-ggate> vi $HOME/ profile-prod.sh


GG_INS=prd
export GG_INS
LD_LIBRARY_PATH=<path to oracle home>/lib:$GG_HOME:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

GG_HOME=$GG_INSTANCE_ROOT/$GG_INS
export $GG_HOME

Uncontrolled when printed, golden source is Process


Assets Library (PAL)
Version 3.2

Page 8 of 15

ONB - Golden Gate Installation and Configuration Guide

3.

Last Update: 12-Aug-2010

ggdba setup: Sudo script and start manager script setup

ggdba unix id should used to start the Golden Gate Manager. It has to be done
by performing UNIX SUDO from ggate id. Do the necessary set up for this using the
following instructions
a. Create the startmgr file with the following content content to start the
Golden Gate Manager Process
Ggdba> /export/home/ggdba/startmgr.sh

startmanager.txt

b. Set the proper Ownership and Permission


chown root:ggdba /export/home/ggdba/startmgr.sh
chmod 750 /export/home/ggdba/startmgr.sh
c. Add the following to sudoers file with visudo
ggate ALL= (ggdba) NOPASSWD: /export/home/ggdba/startmgr.sh

4. Using ggate user, the startmanager script is executed using sudo to ggdba
a. Make sure that ggdba user is part of the ggate user group
uid=2184(ggdba) gid=1279(gguser)

b. Start the manager from ggate as follows


ggate> sudo u ggdba /export/home/ggdba/startmgr.sh start
manager $GG_HOME $ORACLE_HOME $TNS_ADMIN
c. Stop the manager from ggate as follows (NOTE: This will stop all
extracts/replicats).
ggate> sudo u ggdba /export/home/ggdba/startmgr.sh stop
manager $GG_HOME $ORACLE_HOME $TNS_ADMIN

2.4 Target [Fx4cash Database Server] Unix Requirements/Setup


Follow exactly what is specified for Source, UNIX requirements

2.5 Monitoring Requirement (Both in Source and Target)


1. Write a monitoring script to monitor the goldengate process. Configure the script as a
Cron Job for Test environments and in Tivoli for the Production. The script should be
invoked every 5 minutes. The logic is as follows
$GG_HOME/scripts-<appname>/cron-mon-mgr.sh
a. Redirect the output of the startup to a log file

Uncontrolled when printed, golden source is Process


Assets Library (PAL)
Version 3.2

Page 9 of 15

ONB - Golden Gate Installation and Configuration Guide

Last Update: 12-Aug-2010

sudo u ggdba /export/home/ggdba/startmgr.sh start manager $GG_HOME


$ORACLE_HOME $TNS_ADMIN > strmgr.log

b. If the manager is already running you will get the following message in the
strmgr.log file
Oracle GoldenGate Command Interpreter for Oracle Version 10.4.0.19
Build 002 Solaris, sparc, 64bit (optimized), Oracle 10 on Sep 23 2009
15:19:42 Copyright (C) 1995, 2009, Oracle and/or its affiliates. All
rights reserved. GGSCI (dbdid4z1) 1> MGR is already running. GGSCI
(dbdid4z1) 2>

c. Start All the extracts


sudo u ggdba /export/home/ggdba/startmgr.sh start extract * $GG_HOME
$ORACLE_HOME $TNS_ADMIN > strmgr.log

d. Start All the replicats


sudo u ggdba /export/home/ggdba/startmgr.sh start replicat * $GG_HOME
$ORACLE_HOME $TNS_ADMIN > strmgr.log

e. Grep for the MGR is already running in the log, if the grepped text is found do
nothing. If the grepped text is NOT found, send an email to the support with
the following message.
To: <to_list>
Subject: Goldengate Notification: user@hostname
Body:
Date: <date & time>
HostName: <hostname>
Goldengate Manager was down. It is started now.
Golden gate home: $GG_HOME

Note: You can get the host, port & pid from
$GG_HOME/dirpcs/MGR.pcm file
Sample File with above logic is attached below
cron-mon-mgr.sh.txt

2.6 Source [CAAA Database] Database requirements


1. Get the DBA and SYSDBA access to the CAAA database for the one time
setup
2. The character set of the target database must be a superset of the character
set of the source database
3. Make sure the archive log files are retained for at least one week. This is
applicable only in production. In order to retain one week of archive log 60 GB

Uncontrolled when printed, golden source is Process


Assets Library (PAL)
Version 3.2

Page 10 of 15

ONB - Golden Gate Installation and Configuration Guide

Last Update: 12-Aug-2010

of storage should be additionally allocated. Also the respective shell script


should be changed to retain the one week archive log file

2.7 Target [ FX4CASH Database ] Database Requirements


1. Get the DBA access to the FX4CASH database for the one time setup
2. The character set of the target database must be a superset of the character
set of the source database

2.8 Source & Target - Oracle Client Installation


Source and Target should have proper Oracle Client installation. Instance Client
should not be used for installation. The golden gate shares the libraries from the full
oracle client.

2.9 Source & Target - Disk Space Requirements


The following are the Disk Space Requirements for Installation of GoldenGate
Software:

2.10

50 MB for the GoldenGate installation files


40 MB for the working directories
Additional disk space of 20 GB (for Production) and 5 GB (for non production)
on source & target systems.

Source & Target - Memory Requirements

The following are the Memory Requirements for Installation of GoldenGate Software:
Each Extract/Replicat process needs approximately 25-55 MB of memory, or
more depending on the size of the transactions and the number of concurrent
transactions. To start with the Source has 2 extract processes and the target
has 1 replicat processes. So 100 MB on source and 50 MB on the target

Uncontrolled when printed, golden source is Process


Assets Library (PAL)
Version 3.2

Page 11 of 15

ONB - Golden Gate Installation and Configuration Guide

Last Update: 12-Aug-2010

2.11Database Setup Source[CAAA] On-boarding


DML Replication Setup
1. Go to the $GG_INSTANCE_ROOT/$GG_INS directory
2. Launch the sqlplus from $GG_INSTANCE_ROOT/$GG_INS directory and connect to
CAAA Database with appropriate user to do the following.
3. Enable Archive Logging
SQL > Get the syntax from DBA
4. Enable Supplementary Logging
SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
5. To start the supplemental logging, switch the log files.
SQL> ALTER SYSTEM SWITCH LOGFILE;
6. Verify that supplemental logging is enabled at the database level with this command:
SQL> SELECT SUPPLEMENTAL_LOG_DATA_MIN FROM V$DATABASE;
For Oracle 10g, the output of the query must be YES or IMPLICIT.
7. Create GGATE_USER Oracle Account
8. GGATE_USER Setup (Note: the extracts will use this account)
a. Create the database role GGATE_ACCESS_ROLE
b. Create the database role GGATE_OWNER_ROLE
c. Grant database system privilege to the role
grant CREATE SESSION, SELECT ANY DICTIONARY to GGATE_OWNER_ROLE
(OR)
If select any dictionary is not possible. Grant select on the
Golden Gate required dictionary tables specified in the Appendix
3.1
d. Grant privileges to the CAAA objects
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT

SELECT ON <CAAA.GC_* tables> TO GGATE_ACCESS_ROLE


SELECT ON <CAAA.GR_* tables> TO GGATE_ACCESS_ROLE
SELECT ON <CAAA.branch> TO GGATE_ACCESS_ROLE
select on <CAAA.GR_* sequences> TO GGATE_ACCESS_ROLE
execute on <CAAA.GR_* packages> TO GGATE_ACCESS_ROLE
execute on <CAAA.GRU_FXC> TO GGATE_ACCESS_ROLE
FLASHBACK ON <CAAA.GC_* tables > TO GGATE_ACCESS_ROLE
FLASHBACK ON <CAAA.GR_* tables > TO GGATE_ACCESS_ROLE
FLASHBACK ON <CAAA.branch > TO GGATE_ACCESS_ROLE
SELECT ON <CAAA.GA_COMPANY> TO GGATE_ACCESS_ROLE
SELECT ON <CAAA.GA_MANDATE> TO GGATE_ACCESS_ROLE
SELECT ON <CAAA.GA_PERSON> TO GGATE_ACCESS_ROLE

e. Grant DBMS_FLASHBACK to the role


Grant Execute on DBMS_FLASHBACK package to GGATE_ACCESS_ROLE
f. Grant the Role to GGATE
GRANT GGATE_ACCESS_ROLE to GGATE

Uncontrolled when printed, golden source is Process


Assets Library (PAL)
Version 3.2

Page 12 of 15

ONB - Golden Gate Installation and Configuration Guide

2.12

Last Update: 12-Aug-2010

Database Setup - Target [Fx4Cash] - Fx4Cash

1. Go to the $GG_INSTANCE_ROOT/$GG_INS directory


2. Launch the sqlplus from $GG_INSTANCE_ROOT/$GG_INS directory and connect to
Fx4cash Database with appropriate user to do the following.
3. Create GES Schema
a. GES_OWNER
b. Execute the DDL Scripts (The SQL folder in the FXC.zip contains ALL the DDL
statements required to setup the GES_OWNER schema)
Note: The ONB team will provide the FXC.zip to the Fx4Cash team.
Fx4cash team will check-in the FXC.zip as part of their code base.
4. Create GGATE_USER Schema
5. GGATE_USER Setup (Note: the replicats will use this account)
a. Create the following database role GGATE_ACCESS_ROLE
b. Create the following database role GGATE_OWNER_ROLE
c. Grant database system privilege to the role
i. grant CREATE SESSION, SELECT ANY DICTIONARY to GGATE_OWNER_ROLE

(OR)
ii. If select any dictionary is not possible. Grant select on the
Golden Gate required dictionary tables specified in the Appendix
3.1
d. Grant privileges to the GGATE_ACCESS_ROLE
GRANT SELECT,insert,delete,update ON <GES_OWNER.GC_* tables> TO
GGATE_ACCESS_ROLE
GRANT SELECT,insert,delete,update ON <GES_OWNER.GR_* tables> TO
GGATE_ACCESS_ROLE
GRANT SELECT,insert,delete,update ON <GES_OWNER.branch> TO
GGATE_ACCESS_ROLE
GRANT select on <GES_OWNER.GR_* sequences> TO GGATE_ACCESS_ROLE
GRANT execute on <GES_OWNER.GR_* packages> TO GGATE_ACCESS_ROLE
e. Grant read/write access to the check point table created in the GES_OWNER
schema (NOTE: Check point table will be available only after the activity
in the section 2.11 and point 6 is completed)
GRANT SELECT,INSERT,UPDATE,DELETE ON GES_OWNER.GR_CHKPOINT TO
GGATE_ACCESS_ROLE
f. Grant the role to the GGATE
GRANT GGATE_ACCESS_ROLE to GGATE
6. Create the schema Fx4Cash_USER/Fx4Cash_READ and setup as per instructions from
Fx4Cash. Grant the following privileges.

a. Create the GES_READONLY role and grant the following privileges


Grant
Grant
Grant
Grant

select
select
select
select

on
on
on
on

<GES_OWNER.GC_* tables> to GES_READONLY


<GES_OWNER.branch> to GES_READONLY
<GES_OWNER.GR_* tables> to GES_READONLY
<GES_OWNER.GR_* sequences> to GES_READONLY

b. Assign the GES_READONLY role to Fx4cash_READ

Uncontrolled when printed, golden source is Process


Assets Library (PAL)
Version 3.2

Page 13 of 15

ONB - Golden Gate Installation and Configuration Guide

Last Update: 12-Aug-2010

GRANT GES_READONLY to fx4cash_READ

c. Create the GES_UPDATE role and grant the following privileges


Grant select,update,insert,delete on <GES_OWNER.GR_* tables> to
GES_UPDATE
Grant select on <GES_OWNER.GR_* sequences> to GES_UPDATE
Grant execute on <GES_OWNER.GR_* packages> to GES_UPDATE

d. Create the GES_APPLICATION role and Assign the following roles


Grant GES_READONLY to GES_APPLICATION
Grant GES_UPDATE
to GES_APPLICATION

e. Assign the GES_APPLICATION role to fx4cash_USER


f. Assign the GES_READONLY role to fx4cash_USER
2.13

Installing Golden Gate Source & Target

1. FTP the zip file, which is provided by oracle or downloaded from oracle website to the
source/target environment. Extract the Zip file. Inside the Zip the file, you will find a
tar file for solaris installation.
2. Extract the contents of the tar file under $GG_HOME directory.
3. From the GoldenGate home directory, run the GGSCI program.
./ggsci

4. In GGSCI, issue the following command to create the GoldenGate working directories.
GGSCI> CREATE SUBDIRS
5. Configure manager to add port.
GGSCI> EDIT PARAMS MGR
This will create a new mgr.prm file in the dirprm directory. Type the following
contents, and save the file.
On the Source Side
PORT 7809
DOWNREPORTMINUTES 1
LAGREPORTMINUTES 1
PURGEOLDEXTRACTS dirdat/fs*, MINKEEPFILES 10
On the Target Side
PORT 7809
DOWNREPORTMINUTES 1
LAGREPORTMINUTES 1
PURGEOLDEXTRACTS dirdat/fs*, MINKEEPFILES 10
6. Add Checkpoint table : Perform this step ONLY in the Target (fx4cash)

Uncontrolled when printed, golden source is Process


Assets Library (PAL)
Version 3.2

Page 14 of 15

ONB - Golden Gate Installation and Configuration Guide

Last Update: 12-Aug-2010

In GGSCI login to the GES_OWNER databsae


GGSCI> dblogin userid ges_owner@<fx4cash-dbhost>:<fx4cashdbport>/<fx4cash sid> , password <password>
Successfully logged into database
GGSCI> ADD CHECKPOINTTABLE GR_CHKPOINT
Checkpoint table added
7. Start & Verify manager is running
GGSCI> start manager
GGSCI> info all

Program
MANAGER

Status
RUNNING

Group

Lag

Time Since Chkpt

3. APPENDIX
3.1 List of dictionary tables which Golden gate requires select access
v$database
v$parameter
v$instance
v$database_incarnation
v$log
v$archive_dest
v$logfile
gv$database
gv$parameter
gv$instance
gv$database_incarnation
gv$log
gv$archive_dest
gv$logfile

dba_objects
dba_constraints
dba_tablespaces
dba_tab_partitions
dba_log_groups
all_users
all_tables
all_log_group_columns
all_cons_columns

seg$
tab$
props$
obj$
user$
tab$
col$
cdef$
con$

Uncontrolled when printed, golden source is Process


Assets Library (PAL)
Version 3.2

Page 15 of 15

You might also like