Step by Step Golden Gate Configuration
Step by Step Golden Gate Configuration
GoldenGate enables us to extract and replicate data across a variety of topologies as shown the diagram below as
well as the exchange and manipulation of data at the transactional level between a variety of database platforms
like Oracle, DB2, SQL Server, Ingres, MySQL etc.
Manager
Extract
Replicat
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 1/26
11/2/21, 9:52 AM Step By Step Golden Gate Configuration |
The Replicat process runs on the target system and reads transactional data changes as well as DDL changes and
replicates then to the target database. Like the Extract process, the Replicat process can also be configured for
Initial Load as well as Change Synchronization.
Collector
The Collector is a background process which runs on the target system and is started automatically by the
Manager (Dynamic Collector) or it can be configured to stsrt manually (Static Collector). It receives extracted data
changes that are sent via TCP/IP and writes then to the trail files from where they are processed by the Replicat
process.
Trails
Trails are series of files that GoldenGate temporarily stores on disks and these files are written to and read from
by the Extract and Replicat processes as the case may be. Depending on the configuration chosen, these trail files
can exist on the source as well as on the target systems. If it exists on the local system, it will be known an Extract
Trail or as an Remote Trail if it exists on the target system.
Data Pumps
Data Pumps are secondary extract mechanisms which exist in the source configuration. This is optional
component and if Data Pump is not used then Extract sends data via TCP/IP to the remote trail on the target.
When Data Pump is configured, the Primary Extract process will write to the Local Trail and then this trail is read
by the Data Pump and data is sent over the network to Remote Trails on the target system.
In the absence of Data Pump, the data that the Extract process extracts resides in memory alone and there is no
storage of this data anywhere on the source system. In case of network of target failures, there could be cases
where the primary extract process can abort or abend. Data Pump can also be useful in those cases where we are
doing complex filtering and transformation of data as well as when we are consolidating data from many sources
to a central target.
Data source
When processing transactional data changes, the Extract process can obtain data directly from the database
transaction logs (Oracle, DB2, SQL Server, MySQL etc) or from a GoldenGate Vendor Access Module (VAM)
where the database vendor (for example Teradata) will provide the required components that will be used by
Extract to extract the data changes.
Groups
To differentiate between the number of different Extract and Replicat groups which can potentially co-exist on a
system, we can define processing groups. For instance, if we want to replicate different sets of data in parallel, we
can create two Replicat groups.
A processing group consists of a process which could be either a Extract or Replicat process, a corresponding
parameter file, checkpoint file or checkpoint table (for Replicat) and other files which could be associated with the
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 2/26
11/2/21, 9:52 AM Step By Step Golden Gate Configuration |
process.
Steps :-
SOURCE Database
TARGET Database
1. mkdir /u01/soft/
1. $unzip ogg112101_fbo_ggs_Linux_x86_ora11g_32bit.zip
Archive: ogg112101_fbo_ggs_Linux_x86_ora11g_32bit.zip
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 3/26
11/2/21, 9:52 AM Step By Step Golden Gate Configuration |
inflating: fbo_ggs_Linux_x86_ora11g_32bit.tar
1. export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/oradata/gg
1. [oracle@VM1 soft]$ ls
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 4/26
11/2/21, 9:52 AM Step By Step Golden Gate Configuration |
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
Configure Schema
create tablespace
create user
Give Grants
grant connect, resource to ggs_owner;
grant select any dictionary, select any table to ggs_owner;
grant create table to ggs_owner;
grant flashback any table to ggs_owner;
grant execute on dbms_flashback to ggs_owner;
grant execute on utl_file to ggs_owner;
grant create any table to ggs_owner;
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 5/26
11/2/21, 9:52 AM Step By Step Golden Gate Configuration |
Script :
SQL> startup
Database mounted.
Database opened.
SQL>
System altered.
Database closed.
Database dismounted.
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 6/26
11/2/21, 9:52 AM Step By Step Golden Gate Configuration |
Database altered.
Database altered.
tablespace created
SQL> create user ggs_owner identified by ggs_owner default tablespace ggs_data temporary tablespace temp;
User created.
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 7/26
11/2/21, 9:52 AM Step By Step Golden Gate Configuration |
System altered.
Database altered.
Database closed.
Database dismounted.
SQL> startup
Database mounted.
Database opened.
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 8/26
11/2/21, 9:52 AM Step By Step Golden Gate Configuration |
INITIAL DATALOAD :-
EXPORT: @ SOURCE
IMPORT: @ TARGET
Execute following script at Source by connecting SYS user which will create required object for
golden gate.
Run scripts for creating all necessary objects for support DDL replication
Connected to:
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> @marker_setup.sql
You will be prompted for the name of a schema for the Oracle GoldenGate database objects.
Please enter the name of a schema for the GoldenGate database objects:
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 9/26
11/2/21, 9:52 AM Step By Step Golden Gate Configuration |
MARKER TABLE
——————————-
OK
MARKER SEQUENCE
——————————-
OK
Script complete.
SQL> @ddl_setup.sql
You will be prompted for the name of a schema for the Oracle GoldenGate database objects.
NOTE: For an Oracle 10g source, the system recycle bin must be disabled. For Oracle 11g and later, it can be
enabled.
Checking for sessions that are holding locks on Oracle Golden Gate metadata tables …
Check complete.
Please enter the name of a schema for the GoldenGate database objects:
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 10/26
11/2/21, 9:52 AM Step By Step Golden Gate Configuration |
CLEAR_TRACE STATUS:
Line/pos Error
———- —————————————————————–
No errors No errors
CREATE_TRACE STATUS:
Line/pos Error
———- —————————————————————–
No errors No errors
TRACE_PUT_LINE STATUS:
Line/pos Error
———- —————————————————————–
No errors No errors
INITIAL_SETUP STATUS:
Line/pos Error
———- —————————————————————–
No errors No errors
Line/pos Error
———- —————————————————————–
No errors No errors
Line/pos Error
———- —————————————————————–
No errors No errors
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 11/26
11/2/21, 9:52 AM Step By Step Golden Gate Configuration |
Line/pos Error
———- —————————————————————–
No errors No errors
———————————–
OK
———————————–
OK
Line/pos Error
———- —————————————————————–
No errors No errors
Line/pos Error
———- —————————————————————–
No errors No errors
Line/pos Error
———- —————————————————————–
No errors No errors
Line/pos Error
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 12/26
11/2/21, 9:52 AM Step By Step Golden Gate Configuration |
———- —————————————————————–
No errors No errors
———————————–
OK
———————————–
OK
———————————–
OK
———————————–
OK
———————————–
OK
———————————–
OK
———————————–
OK
DDL SEQUENCE
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 13/26
11/2/21, 9:52 AM Step By Step Golden Gate Configuration |
———————————–
OK
GGS_TEMP_COLS
———————————–
OK
GGS_TEMP_UK
———————————–
OK
Line/pos Error
———- —————————————————————–
No errors No errors
———————————–
OK
———————————–
ENABLED
STAYMETADATA IN TRIGGER
———————————–
OFF
———————————–
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 14/26
11/2/21, 9:52 AM Step By Step Golden Gate Configuration |
———————————–
————————————————————————————————————————
/u01/app/oracle/diag/rdbms/src/SRC/trace/ggs_ddl_trace.log
————————————————————————————————————————
Script complete.
SQL> @role_setup.sql
To use a different role name, quit this script and then edit the params.sql script to change the gg_role parameter
to the preferred name. (Do not run the script.)
You will be prompted for the name of a schema for the GoldenGate database objects.
Grant this role to each user assigned to the Extract, GGSCI, and Manager processes, by using the following SQL
command:
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 15/26
11/2/21, 9:52 AM Step By Step Golden Gate Configuration |
SQL>
Grant succeeded.
SQL> @ddl_enable
Trigger altered.
Configure Source :-
1. Add Trandata
SQL> select ‘add trandata ‘||owner||’.’||object_name||’;’ from dba_objects where owner=’GGTEST’ and
object_type=’TABLE’;
‘ADDTRANDATA’||OWNER||’.’||OBJECT_NAME||’;’
——————————————————————————–
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 16/26
11/2/21, 9:52 AM Step By Step Golden Gate Configuration |
PORT 7809
–If an abend occurs, try to restart with maximum of 20 times delaying 2 minutes between start attempts
–,RETRIES 20 ,WAITMINUTES 2
–Delete GG trails if it is older than 3 days and there are no GG process with a checkpoint to it
–Report any lag every 60 Minutes. anytimes lag exceeds 20 Minutes immediately generate a critical message
LAGREPORTMINUTES 60
LAGCRITICALMINUTES 20
i. Create Obey file if required and put below code into that or directly execute it on gg prompt.
— TARGET DATABASE
DELETE GGEC01G1
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 17/26
11/2/21, 9:52 AM Step By Step Golden Gate Configuration |
–, MEGABYTES 5
ii. Create parameter file by “edit params” command and put below code in the parameter file.
— CHECKPARAMS
EXTRACT GGEC01G1
–Source Database
–FORMATSQL
–TRANLOGOPTIONS MANAGESECONDARYTRUNCATIONPOINT
EXTTRAIL /u01/soft/dirdat/g1
–To check the parameter syntax, uncomment the below 2 lines and comment out “WILDCARDRESOLVE
DYNAMIC” parameter. start the group
–CHECKPARAMS
–NODYNAMICRESOLUTION
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 18/26
11/2/21, 9:52 AM Step By Step Golden Gate Configuration |
–NOCOMPRESSDELETES
–NOCOMPRESSUPDATES
— IGNOREDELETES
–IGNOREUPDATES
–IGNOREINSERTS
–CHECKPARAMS
–NODYNAMICRESOLUTION
— Runtime parameters
STATOPTIONS RESETREPORTSTATS
REPORTROLLOVER AT 00:01
WILDCARDRESOLVE DYNAMIC
TABLE GGS_OWNER.EMP;
i. Create Obey file if required and put below code into that or directly execute it on gg prompt.
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 19/26
11/2/21, 9:52 AM Step By Step Golden Gate Configuration |
— TARGET DATABASE
— EXTRACT PUMP
DELETE GGPC01G1
ii. Create parameter file by “edit params” command and put below code in the parameter file.
— CHECKPARAMS
EXTRACT GGPC01G1
PASSTHRU
— Control Parameters
RMTTRAIL /u01/soft/dirdat/1g
–To check the parameter syntax, uncomment the below 2 lines and comment out “WILDCARDRESOLVE
DYNAMIC” parameter. start the group
–CHECKPARAMS
–NODYNAMICRESOLUTION
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 20/26
11/2/21, 9:52 AM Step By Step Golden Gate Configuration |
WILDCARDRESOLVE DYNAMIC
TABLE GGS_OWNER.EMP;
Configure Target :-
GGSCHEMA ggs_owner
Configure Manager
PORT 7809
–If an abend occurs, try to restart with maximum of 20 times delaying 2 minutes between start attempts
–,RETRIES 20 ,WAITMINUTES 2
–Delete GG trails if it is older than 3 days and there are no GG process with a checkpoint to it
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 21/26
11/2/21, 9:52 AM Step By Step Golden Gate Configuration |
–Report any lag every 60 Minutes. anytimes lag exceeds 20 Minutes immediately generate a critical message
LAGREPORTMINUTES 60
LAGCRITICALMINUTES 20
Configure Replicat
i. Create Obey file if required and put below code into that or directly execute it on gg prompt.
— Add replicat
DELETE GGRC01G1
ii. Create parameter file by “edit params” command and put below code in the parameter file.
–SHOWSYNTAX
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 22/26
11/2/21, 9:52 AM Step By Step Golden Gate Configuration |
–NODYNSQL
–NOBINARYCHARS
REPLICAT GGRC01G1
HANDLECOLLISIONS
— TARGET DATABASE
–#DB_Connect()
ASSUMETARGETDEFS
–SOURCEDEFS C:\GG\DIRSQL\MYTABLES.SQL
–To check the parameter syntax, uncomment the below 2 lines and comment out “WILDCARDRESOLVE
DYNAMIC” parameter.
–CHECKPARAMS
–NODYNAMICRESOLUTION
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 23/26
11/2/21, 9:52 AM Step By Step Golden Gate Configuration |
–#generate_stats()
STATOPTIONS RESETREPORTSTATS
REPORTROLLOVER AT 00:01
WILDCARDRESOLVE DYNAMIC
TRANSACTIONTIMEOUT 5 S
–ddl support
1. START MGR
2. START EXTRACT GG*
1. START MGR
2. START replicat GG*
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 24/26
11/2/21, 9:52 AM Step By Step Golden Gate Configuration |
Advertisements
Share this:
Tweet
Share 0
Like this:
Like
Be the first to like this.
Related
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 25/26
11/2/21, 9:52 AM Step By Step Golden Gate Configuration |
Hi Sachin. Helpful document. Any Idea what needs to done on second node of RAC on source and target. I have 2 node RAC
cluster. OGG 12c is successfully running on node1. I do not know what to configure on the second node? do i have start the
processes on second node too? Any help would be appreciated.
Thank you.
Reply
Blog at WordPress.com.
Follow
sachinichake.wordpress.com
Customize
Follow
Sign up
Log in
Copy shortlink
Report this content
Manage subscriptions
Collapse this bar
Follow
sachinichake.wordpress.com
Customize
Follow
Sign up
Log in
Copy shortlink
Report this content
Manage subscriptions
Collapse this bar
file:///D:/DATA KERJA/Oracle/Oracle Databases/11g/Golden Gate/Step By Step Golden Gate Configuration _.html 26/26