手机版
你好,游客 登录 注册
背景:
阅读新闻

Oracle Linux 5.7 部署ogg v11 oracle to oracle

Configure Change Capture and delivery

[日期:2012-11-01] 来源:Linux社区  作者:chinadm123 [字体:大 中 小]

上一篇配置了ogg 基础部分,包括环境准备及数据初始化,采用的是Direct Load Method,

Configure Change Capture

1. Add the Extract group

Execute the following command on the <source> system to add an Extract group
named EORA<unique id>.

GGSCI (ogg1) 20> add extract eorass, tranlog, begin now, threads 1
EXTRACT added.

2. Create the Extract parameter file

Execute the following commands on the <source> system.

GGSCI (ogg1) 22> edit params eorass

EXTRACT EORASS
USERID ggusr, PASSWORD ggusr
RMTHOST 192.168.1.87, MGRPORT 7809
RMTTRAIL ./dirdat/tt
TABLE ggtest.tcustmer;
TABLE ggtest.tcustord;

3. Define the GoldenGate trail

Execute the following command on the <source> to add the trail that will store the
changes on the target.

GGSCI (ogg1) 24> add rmttrail ./dirdat/tt, extract eorass, megabytes 5
RMTTRAIL added.

4. Start the capture process

GGSCI (ogg1) 37> start extract eorass

Sending START request to MANAGER ...
EXTRACT EORASS starting

Verify the results:

GGSCI (ogg1) 38> info extract eorass, detail

GGSCI (ogg1) 39> view report eorass

Configure Change Delivery

Set up the checkpoint table

1. Create a GLOBALS file on the target system

Execute the following commands on the <target> system.

Create and edit the GLOBALS parameter file to add the checkpoint table.

GGSCI (ogg2) 1> edit params ./GLOBALS

CHECKPOINTTABLE ggusr.ggschkpt

2. Activate the GLOBALS parameters

For the GLOBALS configuration to take effect, you must exit the session in which
the changes were made. Execute the following command to exit GGSCI.

GGSCI (ogg2) 4> exit

3. Add a Replicat checkpoint table

On the <target> system, execute the following commands in GGSCI:

GGSCI (ogg2) 1> dblogin userid ggusr, password ggusr
Successfully logged into database.

GGSCI (ogg2) 2> add checkpointtable

No checkpoint table specified, using GLOBALS specification (ggusr.ggschkpt)...

Successfully created checkpoint table ggusr.ggschkpt.

Configure Change Delivery

4. Add the Replicat group

Execute the following command on the <target> system to add a delivery group
named RORA<unique id>.

GGSCI (ogg2) 3> add replicat roratt, exttrail ./dirdat/tt
REPLICAT added.

5. Create Replicat parameter file

Execute the following commands on the <target> system to bring up the parameter
file in the editor.

GGSCI (ogg2) 4> edit params roratt

REPLICAT RORATT
USERID ggusr, PASSWORD ggusr
HANDLECOLLISIONS
ASSUMETARGETDEFS
DISCARDFILE ./dirrpt/RORATT.DSC, PURGE
map ggtest.tcustmer, target ggtest.tcustmer;
map ggtest.tcustord, target ggtest.tcustord;

6. Start the Replicat process

GGSCI (ogg2) 9> start replicat roratt

Sending START request to MANAGER ...
REPLICAT RORATT starting

Verify the results:

GGSCI (ogg2) 12> info replicat roratt

Generate Activity and Verify Results

Generate database operations

1. Execute miscellaneous update, insert, and delete operations
Execute the following commands on the <source> system.

[Oracle@ogg1 ogg]$ sqlplus ggtest/ggtest

SQL> @demo_ora_misc.sql

Verify change capture and delivery

2. Verify results on the source system

Execute the following commands on the <source> system.

SQL> select * from tcustmer;
SQL> select * from tcustord;
SQL> exit

Generates an interim statistical report to the Extract report file.

GGSCI (ogg1) 49> send extract eorass, report

GGSCI (ogg1) 50> view report eorass

 

3. Verify your results on the target system

Execute the following commands on the <target> system to verify the target data.

[oracle@ogg2 ogg]$ sqlplus ggtest/ggtest

SQL> select * from tcustmer;
SQL> select * from tcustord;
SQL> exit

Generates an interim statistical report to the Extract report file.

GGSCI (ogg2) 18> send replicat roratt, report

GGSCI (ogg2) 19> view report roratt

到这里,ogg同步功能已经实现,再来用图来说明一下都配置了哪些部件:

 

linux
【内容导航】
第1页:环境配置及数据初始化 第2页:Configure Change Capture and delivery
相关资讯       oracle linux 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款