Oracle's OGG one-way replication configuration

Source: Internet
Author: User
Tags dba log resource oracle database

Experimental environment:

SOURCE End:

ip:192.168.40.10

Database:oracle 11.2.0.1.0 ORCL

os:oel5.6

Ogg:fbo_ggs_linux_x86_ora11g_32bit

Target side:

ip:192.168.40.128

database:10.2.0.1.0 ORCL

os:oel5.6

Ogg:fbo_ggs_linux_x86_ora11g_32bit

First configure the environment variables on two machines, adding the following and making them effective:

Export ggate= $ORACLE _base/ogg

Export ld_library_path= $ORACLE _home/lib:/lib:/usr/lib: $GGATE

And all the paths are established:

mkdir $ORACLE _base/ogg

Source-side configuration:

[Oracle@badly9 ~]$ Sqlplus/as SYSDBA

Sql*plus:release 11.2.0.1.0 Production on Sat June 7 17:23:51 2014

Copyright (c) 1982, 2009, Oracle. All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition release 11.2.0.1.0-production

With the partitioning, OLAP, Data Mining and real application testing options

Sys@orcl>archive Log List

Database Log Mode Archive mode

Automatic Archival Enabled

Archive Destination Use_db_recovery_file_dest

Oldest online log sequence 5

Next Log sequence to archive 7

Current Log Sequence 7

Sys@orcl>select supplemental_log_data_min from V$database;

Suppleme

--------

NO

Sys@orcl>alter database add supplemental log data;

Database altered.

Sys@orcl>select supplemental_log_data_min from V$database;

Suppleme

--------

YES

Sys@orcl>alter database force logging;

Database altered.

Sys@orcl>create tablespace Tbs_ogg

2 datafile '/u01/app/oracle/oradata/orcl/datafile/tbs_ogg01.dbf ' size 200M

3 autoextend on;

Tablespace created.

Sys@orcl>create user ogg identified by ogg default Tablespace tbs_ogg;

User created.

Sys@orcl>grant CONNECT,RESOURCE,DBA to Ogg;

Grant succeeded.

Sys@orcl>grant execute on Utl_file to Ogg;

Grant succeeded.

Sys@orcl>grant Select any dictionary,select any table to Ogg;

Grant succeeded.

Sys@orcl>grant alter any table to OGG;

Grant succeeded.

Sys@orcl>grant Flashback any table to Ogg;

Grant succeeded.

Sys@orcl>grant execute on Dbms_flashback to Ogg;

Grant succeeded.

Target side:

Sys@orcl>create tablespace Tbs_ogg

2 datafile '/u01/app/oracle/oradata/orcl/tbs_ogg01.dbf ' size 200M

3 autoextend on;

Tablespace created.

Sys@orcl>create user ogg identified by ogg default Tablespace tbs_ogg;

User created.

Sys@orcl>grant CONNECT,RESOURCE,DBA to Ogg;

Grant succeeded.

Sys@orcl>grant execute on Utl_file to Ogg;

Grant succeeded.

Sys@orcl>grant Insert any table to OGG;

Grant succeeded.

Sys@orcl>grant Delete any table to Ogg;

Grant succeeded.

Sys@orcl>grant Update any table to Ogg;

Grant succeeded.

Source End and Target end

[Oracle@badly9 ~]$ TAR-XVF Fbo_ggs_linux_x86_ora11g_32bit.tar

userexitexamples/

userexitexamples/exitdemo_passthru/

Userexitexamples/exitdemo_passthru/makefile_passthru. Aix

。。。 Slightly...

[Oracle@badly9 ~]$./ggsci

SOURCE End:

Ggsci (badly9) 1> Create Subdirs

Creating subdirectories under current Directory/u01/app/oracle/ogg

Parameter Files/u01/app/oracle/ogg/dirprm:already exists

files/u01/app/oracle/ogg/dirrpt:created

Checkpoint files/u01/app/oracle/ogg/dirchk:created

Process Status files/u01/app/oracle/ogg/dirpcs:created

SQL Script files/u01/app/oracle/ogg/dirsql:created

Database Definitions files/u01/app/oracle/ogg/dirdef:created

Extract Data files/u01/app/oracle/ogg/dirdat:created

Temporary files/u01/app/oracle/ogg/dirtmp:created

Stdout files/u01/app/oracle/ogg/dirout:created

Ggsci (badly9) 2> edit params Mgr

Ggsci (badly9) 3> view params Mgr

Port 7809

Dynamicportlist 7800-8000

AutoRestart Extract *,waitminutes 2,resetminutes 5

Ggsci (badly9) 4> start Mgr

Manager started.

Ggsci (badly9) 5> edit params Eora

Ggsci (badly9) 6> view params Eora

Extract Eora

Dynamicresolution

UserID Ogg,password ogg

Exttrail/u01/app/oracle/ogg/dirdat/et

Table scott.*;

Ggsci (BADLY9) 7>dblogin userid ogg, password ogg

Successfully logged into database.

Ggsci (badly9) 8>add trandata scott.*

Ggsci (badly9) 9> Add extract Eora,tranlog,begin now

EXTRACT added.

Ggsci (badly9) 10> add exttrail/u01/app/oracle/ogg/dirdat/et,extract Eora

Exttrail added.

Ggsci (Badly9) 11> start extract Eora

Sending START request to MANAGER ...

EXTRACT EORA Starting

Ggsci (badly9) 12> edit params Pump_so

Ggsci (badly9) 13> view params pump_so

Extract Pump_so

Dynamicresolution

PassThru

Rmthost 192.168.40.128,mgrport 7809,compress

Rmttrail/u01/app/oracle/ogg/dirdat/pt

Table scott.*;

Ggsci (badly9) 14> Add extract Pump_so,exttrailsource/u01/app/oracle/ogg/dirdat/et

EXTRACT added.

Ggsci (badly9) 15> add rmttrail/u01/app/oracle/ogg/dirdat/pt,extract pump_so

Rmttrail added.

Ggsci (badly9) 16> info All

Program Status Group Lag at chkpt time Since chkpt

MANAGER RUNNING

EXTRACT RUNNING EORA 00:00:00 00:00:02

EXTRACT RUNNING pump_so 00:00:00 00:00:07

To configure a target-side process:

Because the target side is using Oracle 10g, the error is when starting Ggsci:
[Oracle@jp ogg]$ Ggsci

Ggsci:error while loading shared libraries:libnnz11.so:cannot open Shared object file:no such file or directory

Related Article

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.