logsource and ALO
Posted 长城之上是千亿的星空,星空之上是不灭的守望。
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了logsource and ALO相关的知识,希望对你有一定的参考价值。
1、首先配置sourcedb上的nfs服务,oggstd上挂载sourcedb的online redo和archive log的目录
oggsource上配置:
vi /etc/exports
/u01/app/oracle 134.178.1.182(rw,no_root_squash,no_all_squash,sync)
save and exit
exportfs -r
linux 6.X
service nfs start
service rpcbind start
oggstd:
mkdir /mnt/test
mount -t nfs oggsource:/u01/app/oracle /mnt/test
2、配置oggstd到sourcedb的tnsname解析
oggstd: netca
3、配置logmap方式
ext1:
EXTRACT ext1
EXTTRAIL ./dirdat/er
userid [email protected], password goldengate
WILDCARDRESOLVE DYNAMIC
DYNAMICRESOLUTION
TRANLOGOPTIONS LOGSOURCE LINUX, PATHMAP /u01/app/oracle/oradata/sourcedb /mnt/test/oradata/sourcedb
--TRANLOGOPTIONS LOGSOURCE LINUX, PATHMAP /u01/app/oracle/oradata/sourcedb /mnt/test/oradata/sourcedb PATHMAP /u01/app/oracle/oradata/sourcedb/archdata /mnt/test/oradata/sourcedb/archdata
TRANLOGOPTIONS ALTARCHIVELOGDEST /mnt/test/oradata/sourcedb/archdata
table scott.*
dblogin userid [email protected], password goldengate
ADD EXTRACT ext1, TRANLOG, BEGIN NOW
ADD EXTTRAIL ./dirdat/er, EXTRACT ext1, MEGABYTES 10
几个注意点:
1、要求该机器上的字节存储顺序(Endian)和源库保持一致,32位和64位也保持一致;
2、手册上描述同时可以在PATHMAP中配置archivelog,但是测试下来貌似不行,我想这样配置:
TRANLOGOPTIONS LOGSOURCE LINUX, PATHMAP /u01/app/oracle/oradata/sourcedb /mnt/test/oradata/sourcedb, PATHMAP /u01/app/oracle/oradata/sourcedb/archdata /mnt/test/oradata/sourc
edb/archdata,
但是不行,所以借助ALTARCHIVELOGDEST;(有点类似于ALO)
3、LOGSOURCE - 设置的是源端操作系统,如:solaris->linux->solaris,借助中间机linux来抽取和pump trail到目标solais,这里设置LOGSOURCE SOLARIS
ALO模式:
(archivelog only模式)
上面的例子中只要改一下:
TRANLOGOPTIONS ARCHIVEDLOGONLY
TRANLOGOPTIONS ALTARCHIVELOGDEST PRIMARY /mnt/test/oradata/sourcedb/archdata
TRANLOGOPTIONS ALTARCHIVEDLOGFORMAT %t_%s_%r.dbf
FETCHOPTIONS, NOUSESNAPSHOT, NOUSELATESTVERSION, MISSINGROW REPORT
STATOPTIONS REPORTFETCH
table scott.*
具体参考《Oracle_GoldenGate_Best_Practices_-_Extracting_from_Oracle_Archive_log_files__ALO_Mode__V3.1_ID_1358342.1.pdf》
以上是关于logsource and ALO的主要内容,如果未能解决你的问题,请参考以下文章
Alert and Action sheets and Timer and Animation
D. Kuro and GCD and XOR and SUM