Oracle 11G Goldengate enables one-way synchronization between Windows and Windows

Source: Internet
Author: User
Tags dba windows x64 sqlplus

Oracle GoldenGate Implement Windows with the Windows one-way synchronization between

This experiment was conducted in the win environment, with the aim of making a one-way synchronization of Windows and windows to Copy backups of the source library through GoldenGate.

Lab Environment Description

Operating System: Windows R2 ,

Database:Oracle 11.2.0.1.0 ,

GoldenGate:11.2.1.0.3 for Microsoft Windows x64

:http://down.51cto.com/data/2448081

First , the pre-installation environment check (source end and target side installation is the same):

1. Check the configuration of the database

Check the archive mode, additional logs, and force log parameters are turned on.

Sql> select log_mode,supplemental_log_data_min,force_logging from V$database;

By default, the archive mode, additional logs, and force log parameters are turned off.

Start archive mode, attach log, force log. The Open archive mode requires restarting the database, enabling additional logs, forcing the log to restart the database.

sql> shutdown immediate;

sql> startup Mount;

sql> ALTER DATABASE Archivelog;

sql> ALTER DATABASE force logging;

sql> ALTER DATABASE add supplemental log data;

sql> ALTER DATABASE open;

Second, installation GoldenGate

1 First copy the Oracle GoldenGate 11.2.1.0.3 for Microsoft Windows x64 (64-bit) to and extract to D:\app\Administrator\ directory (the path can be selected according to your needs), after extracting the directory name to Ogg.

2 Enter the D:\app\Administrator\ogg\ directory, run the Ggsci, and enter the OGG management Console.

3 Enter the command in the Ogg console:create Subdirs, let Ogg make the directory it needs to use


4 Copy the Category.dll and ggsmsg.dll files in the D:\app\Administrator\ogg directory to the SYSTEM32 directory.

5 Manually create the Discard folder under the Ogg directory :MD Discard

6 Create a GoldenGate dedicated user in Oracle ogg, to create a separate table space for ogg users, or the subsequent installation will be error;

D:\app\administrator\ogg>sqlplus/as SYSDBA

sql> Create tablespace ogg_tbs datafile ' d:\app\administrator\oradata\hwprod\ogg_tbs01.dbf ' size 1024M;

Sql> alter tablespace OGG_TBS add datafile ' d:\app\administrator\oradata\hwprod\ogg_tbs02.dbf ' size 1024m;

Sql> alter tablespace OGG_TBS add datafile ' d:\app\administrator\oradata\hwprod\ogg_tbs03.dbf ' size 1024m;

Sql>create user ogg identified by Oracle default Tablespace OGG_TBS quota unlimited on OGG_TBS;

Sql>grant DBA to Ogg; ( for DDL replication, you need to grant dba Authority )

Sql> Grant execute on utl_file to Ogg;

7 Execute the configuration script for the newly created ogg user. use SYS to log in to Sqlplus in the installation directory of Ogg andexecute markker_setup.sql,ddl_setup.sql,role_setup.sql, Ddl_enable.sql.

(1) marker_setup.sql, the role is to install the DDL support required GoldenGate marker system.

sql>@ Marker_setup

(2) Ddl_setup.sql

Sql> @ddl_setup


(3) role_setup.sql, the role that is required to delete and create DDL synchronization, which authorizes DML operations on DDL objects .

Sql> @role_setup

Sql> Grant Ggs_ggsuser_role to Ogg;

(4) ddl_enable.sql, the function is to enable DDL triggers.

Sql> @ddl_enable

8 Enter The OGG console to test whether the user was created successfully.

Ggsci (hworatest) 1> dblogin userid ogg

The test is successful and the installation is complete!

Third, the configuration GoldenGate

SOURCE End

1. Configure Manager Management process parameters:

Ggsci (hworatest) 1> edit params Mgr

Click " Yes "

Then type the following and save

Port 7809


2. Configure the checkpoint table

Ggsci (hworatest) 3> edit params./global

Click " Yes " and enter the following to save

Ggschema ogg

Checkpointtable Ogg.checkpoint

Add checkpoint table

Ggsci (hworatest) 7> add checkpointtable ogg.checkpoint

Before adding an action, be careful to log in first

3. Configuring the server's extraction process

Ggsci (hworatest) 8> add extract ext_w1,tranlog, begin now

Ggsci (hworatest) 9> add Exttrail d:\app\Administrator\ogg\dirdat\wt, extract EXT_W1

Ggsci (hworatest) 10> edit params ext_w1

Click "Yes " and enter the following to save

DDL include all

Extract EXT_W1

UserID OGG, password Oracle

Exttrail D:\APP\ADMINISTRATOR\OGG\DIRDAT\WT

Table prun.*;

Note that the above is inclusive DDL replication, primarily for all object operations on Prun

4, Configure the server delivery process

Ggsci (hworatest) 11> Add extract pum_w1, Exttrailsource D:\app\Administrator\ogg\dirdat\wt, begin now

Ggsci (hworatest) 12> add Rmttrail D:\app\Administrator\ogg\dirdat\rt, extract PUM_W1

Ggsci (hworatest) 13> edit params pum_w1

Click "Yes " and enter the following to save

Extract PUM_W1

UserID OGG, password Oracle

Rmthost 192.168.10.19, Mgrport 7809

Rmttrail D:\app\Administrator\ogg\dirdat\rt

Table prun.*;

Note that the above IP is the target IP address

at this point, thesoure end configuration is basically complete, you can view the info all :

The target -side configuration is as follows :

1. Configure Manager Management process parameters:

Ggsci (HWOGG01) 2> edit params Mgr

Click "Yes " to enter the following and save

Port 7809

2. Configure the checkpoint table

Ggsci (HWOGG01) 3> edit params./global


Click "Yes "to enter the following and save

Ggschema ogg

Checkpointtable Ogg.checkpoint

Add checkpoint table

Ggsci (HWOGG01) 4> add checkpointtable ogg.checkpoint

3. Configure the replication process for the target server

Ggsci (HWOGG01) 5>add replicat rep_w2, Exttrail d:\app\Administrator\ogg\dirdat\rt, checkpointtable ogg.checkpoint

Ggsci (HWOGG01) 6> edit params rep_w2


Click "Yes "to enter the following and save

Replicat REP_W2

DDL include all

Ddlerror default Ignore RETRYOP maxretries 3 RetryDelay 5

UserID OGG, password Oracle

Assumetargetdefs

Discardfile D:\app\administrator\ogg\dirdat\rep_w2_discard,append

Map prun.*, Target prun.*

ResolveConflict (Updaterowexists, (DEFAULT, OVERWRITE))

ResolveConflict (Insertrowexists, (DEFAULT, OVERWRITE))

ResolveConflict (Deleterowexists, (DEFAULT, OVERWRITE))

ResolveConflict (Updaterowmissing, (DEFAULT, IGNORE))

ResolveConflict (Deleterowmissing, (DEFAULT, IGNORE));

Complete configuration to view relevant information

Iv. Verification Test

finally start both ends of the MGR process and test ( related commands using can type help lookup )

start The source side First

Start Mgr

Start EXT_W1

Start PUM_W1

start the target terminal:

Start Mgr

Start REP_W2

Check to see if the following table exists on the target side, and if not, create the above table on the source side and check to see if it will be copied.

Target End Check:

SOURCE side for table-building operations

Sql>create table Prun. Testogg as SELECT * from Prun.cts_role;

Check the target side again.

Test success!

Reference:http://blog.itpub.net/29485627/viewspace-1766772/


Oracle 11G Goldengate enables one-way synchronization between Windows and Windows

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.