当前位置:Gxlcms > mysql > OracleGoldenGate系列:配置DataPump进程实现多点传输

OracleGoldenGate系列:配置DataPump进程实现多点传输

时间:2021-07-01 10:21:17 帮助过:50人阅读

RMTHOST Valid for Extract Use the RMTHOST parameterto: ● Identifya remote system to which the local Extract process connects ● Specifythe TCP/IP port number on that system where the Manager process is running ● Controlvarious attributes

RMTHOST

Valid for Extract

Use the RMTHOST parameterto:

Identifya remote system to which the local Extract process connects

Specifythe TCP/IP port number on that system where the Manager process is running

Controlvarious attributes of the TCP/IP connections

This parametercontrols compression, data encryption, buffer attributes, TCP/IP

streaming,connection timeout threshold, and the wait period for a connection request. It

also can be used toset Collector parameters.

To identifymultiple remote systems in a parameter file, use one RMTHOST statement for

each one, followedby the associated trails and table maps, for example:

EXTRACTsales

USERIDggs, PASSWORD AACAAAAAAAAAAAJAUEUGODSCVGJEEIUGKJDJTFNDKEJFFFTC &

AES128,ENCRYPTKEY securekey1

RMTHOSTny, MGRPORT 7888, ENCRYPT AES 192 KEYNAME mykey

RMTTRAIL/ggs/dirdat/aa

TABLEora.orders;

RMTHOSTla, MGRPORT 7888, ENCRYPT AES 192 KEYNAME mykey2

RMTTRAIL/ggs/dirdat/bb

TABLEora.orders;

Do not use RMTHOST for anExtract created in PASSIVE mode. See page 17 for more

information about a passive Extract.

ADD RMTTRAIL

Use ADD RMTTRAIL tocreate a trail for online processing on a remote system and:

Assigna maximum file size.

Associatethe trail with an Extract group.

In the parameterfile, specify a RMTHOST entry before any RMTTRAIL entries to identify the

remote system andTCP/IP port for the Manager process.

Syntax ADD RMTTRAIL ,EXTRACT

[,MEGABYTES ]

[, SEQNO]

示例:

修改PSCOTT 参数,加入紫色部分内容:

EXTRACT pscott

SETENV (NLS_LANG=AMERICAN_AMERICA.AL32UTF8)

PASSTHRU

RMTHOST 192.168.8.180, MGRPORT 7809

RMTTRAIL ./dirdat/pa

TABLE ;

TABLE scott.DEPT_GGS;

RMTHOST 192.168.8.160,MGRPORT 7809

RMTTRAIL ./dirdat/bb

TABLE scott.EMP_GGS;

RMTHOST192.168.8.180, MGRPORT 7809

RMTTRAIL ./dirdat/cc

TABLE scott.DEPT_GGS;

停止 PSCOTT 进程,尝试启动 PSCOTT 进程失败,报:

2013-05-08 11:21:08 ERROR OGG-01044 The trail './dirdat/bb'is not assigned to extract 'PSCOTT'. Assign the trail to the

extract with the command "ADDEXTTRAIL/RMTTRAIL ./dirdat/bb, EXTRACT PSCOTT".

2013-05-08 11:21:08 ERROR OGG-01668 PROCESS ABENDING.

执行紫色部分命令

--先前已执行

--Add extract PSCOTT, exttrailsource ./dirdat/xh

--Add rmttrail ./dirdat/pa, extract PSCOTT,megabytes 5

--新加 rmttrail

Add rmttrail./dirdat/bb, extract PSCOTT, megabytes 5

Add rmttrail./dirdat/cc, extract PSCOTT, megabytes 5

再次启动成功

验证192.168.8.160 ./dirdat/bb 192.168.8.180 ./dirdat/cc是否生成

DML 测试

如果在源端对scott.EMP_GGS 和scott.DEPT_GGS 执行 insert操作,理论上./dirdat/bb 只有

Scott.EMP_GGS de 变化,./dirdat/cc 只有cott.DEPT_GGS 的变化。

Stop pecott

alter pscottetrollover

insertinto scott.dept_ggsvalues (50,'MAOMI','MIMI');

commit;

insertinto scott.emp_ggsvalues (9999,'MAOMI','CLERK','7369',sysdate,800.00,500,30);

commit;

logdump 查看192.168.8.160./dirdat/bb 192.168.8.180 ./dirdat/cc的内容,证实上述假设成立。

加入多个 rmthost 和 rmttrail 后,pump 进程按照两个参数组合在参数文件中的位置按照顺序进行投递,如果往其中一个投递目标投递阻断,则该投递目标往后配置的投递均会阻断。



http://blog.csdn.net/xiangsir/article/details/8927644

人气教程排行