Data synchronization between Oracle goldengate databases on Heterogeneous OS

Source: Internet
Author: User
OracleGoldenGate (hereinafter referred to as OGG) synchronizes data between databases of the same type on Heterogeneous OS.

Oracle GoldenGate (hereinafter referred to as OGG) synchronizes data between databases of the same type on Heterogeneous OS.

Oracle GoldenGate (hereinafter referred to as OGG) synchronizes data between databases of the same type on Heterogeneous OS.

Functions implemented by ogg:

It can be refined to single-Table synchronization, rows synchronization that meets specific where conditions, and column synchronization.

Competitors of ogg: ibm cdc, dell shareplex, dsg, and dds

Environment Description:
Source: windows 2003x64bit, oracle db 11.2.0.3 x64bit
Destination: SUSE linux, oracle db 11.2.0.3

Prerequisites:
1. Microsoft Visual C ++ 2005 SP1 Redistributable Package
Note: first, the c ++ package distinguishes the number of BITs and must download the sp1 package.
Second, as long as ogg is used on windows, the c ++ package must be installed,
Whether the database is oracle or sqlserver, whether ogg is used for the source database or the target database.

2. oracle db 11.2.0.3 x64bit media in ogg for windows x64bit. --P18794252_1121023_MSWIN-x86-64.zip
3. oracle db 11.2.0.3 x64bit media in ogg for linux x64bit. --P18794252_1121023_Linux-x86-64.zip

Note:
First, the ogg media can be downloaded from,
Subsequent ogg patches can only be downloaded from mos.
Second, the ogg media is divided into OS type, db type, db version, and db bit number.
However, the same ogg media is used in the following scenarios: oracle db 11.2.0.3 x64bit is installed under suse11 and suse 10.

--------------------------------------------------------------------------------

Installing Oracle 12C in Linux-6-64

Install Oracle 11gR2 (x64) in CentOS 6.4)

Steps for installing Oracle 11gR2 in vmwarevm

Install Oracle 11g XE R2 In Debian

--------------------------------------------------------------------------------

Implementation process:
1. Upload the media to the source and destination.
2. implementation process at the source:
2.1 create and authorize a goldengate system user
SQL> create tablespace GGTBS datafile 'd: \ related path \ ggtbs01.dbf' size 1024 M auextend on;
SQL> Create user Goldengate default tablespace ggtbs identified by oracle; (the target database also creates this goldengate user)
SQL> grant dba to goldengate;
2.2 set the database to archive mode-normal production databases are in archive mode.
2.3 additional logs of open-source databases
SQL> alter databse add supplemental log data;
Switch logs to make the additional logs take effect:
SQL> alter system archive log current;
2.4 check additional logs of the source database
SQL> select supplemental_log_data_min from v $ database;
-- If yes is returned, the additional log is enabled.
2.5 open the force logging of the source database:
SQL> alter database force logging;
2.6 execute the check script on the master database to check whether the following conditions exist: Find the column definition of the unique index column that allows null

Select dic. table_owner, dic. table_name, dic. index_name, di. uniqueness, dic. column_name
From dba_ind_columns dic, dba_indexes di, dba_tab_columns dtc
Where dic. table_owner = 'add user' and dtc. OWNER = 'add user'
AND dic. table_owner = di. table_owner and dic. TABLE_NAME = di. table_name
And dic. index_name = di. index_name
And di. uniqueness = 'unique' and dtc. owner = di. table_owner
And dtc. TABLE_NAME = di. table_name and dic. column_name = dtc. COLUMN_NAME and dtc. nullable = 'y'
And dic. TABLE_NAME = dtc. TABLE_NAME

---> To add users manually, use the user to be synchronized instead.
Modify the name of the queried table and unique index: either change to a non-unique index, or set the column definition to not null when the unique index is retained.

2.7 assume that the ogg software is placed in the d: \ ggs directory, and enter d: \ ggs on the cmd interface.
Ggsci> create subdirs --> this command is used to create sub-directories such as dirprm, dirdat, and dirrpt under d: \ ggs.
2.8 ggsci> edit params./GLOBALS
Add the following characters, save and exit
MGRSERVNAME GGSSERVICE
2.9 create a windows service for ogg
D: \ ggs> install addservice autostart

2.10 add supplemental logs to the table
Ggsci> dblogin userid goldengate password oracle
Ggsci> add trandata USER1. * ---> Note: * do not add extra points.
Ggsci> add trandata USER2. * ---> Note: * do not add extra points.
Ggsci> add trandata USER3. * ---> Note: * do not add extra points.

Check whether the Supplemental log of the table has been added:
Select table_name from all_tables
Where owner = 'user1' and table_name not in (select distinct table_name from dba_log_groups where owner = 'user1 ');

2.11 configure DDL Replication
SQL> GRANT EXECUTE ON UTL_FILE TO goldengate;
Ggsci> edit params./GLOBALS Add the following characters, save and exit
GGSCHEMA goldengate

Cd to d: \ ggs directory under cmd
Exit all oracle sessions
Sqlplus/as sysdba
SQL> @ marker_setup. SQL
SQL> @ ddl_setup. SQL
SQL> @ role_setup. SQL
SQL> grant ggs_ggsuser_role to goldengate;
SQL> @ ddl_enable. SQL

2.12 configure sequence synchronization (skip this step if the standby database is a REPORT query requirement)
Cd to d: \ ggs directory under cmd
Sqlplus/as sysdba
SQL> @ sequence. SQL
---> Source execution: SQL> GRANT EXECUTE on goldengate. updateSequence TO goldengate;
---> Target execution: SQL> GRANT EXECUTE on goldengate. replicateSequence TO goldengate;
2.13 source configuration parameter file
Ggsci> edit params mgr
Add the following parameters, save and exit.
Port 7809
Autostart extract *
Autorestart extract *, waitminutes 1, retries 60, RESETMINUTES 60
PURGEOLDEXTRACTS d: \ ggs \ dirdat \ st *, USECHECKPOINTS, MINKEEPHOURS 2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.