Goldengate DDL复制相关注意事项
来源:互联网 发布:上海电力学院知乎 编辑:程序博客网 时间:2024/05/20 07:13
Goldengate DDL复制相关注意事项
1.Goldengate DDL复制概述
a.Goldengate开启DDL复制后,不需要对原有的表和以后新加的表执行add trandata操作
这一点根据经验得出。
b.目标端默认支持DDL复制,故目标端Replicat进程参数文件中不需要添加DDL语句,当然源端Data Pump进程参数文件中也不需要加DDL相关的参数
这一点来源于《GGS_Fund_10.4_WinUX.ppt》
Source: DDL disabled by default; Extract must be configured to enable.
Target: DDL enabled by default to maintain data integrity
c.开启DDL复制后,目标端Replicat进程参数文件中必须配置忽略或者过滤DDLERROR的参数
rep_ta.prm
ddlerror default ignore retryop
这一点来源于《GGS_Fund_10.4_WinUX.ppt》
Replicat must be configured to ignore or filter DDL
并剽窃Gavin Soorma's blog中的一篇文章,摘录部分
So if we issue this DROP USER statement on the source, we will see that the replicat process on the target has abended and this is the error we will see in the report
SQL> drop user abc;
User dropped.
2010-07-10 17:20:13 GGS ERROR 2001 Fatal error executing DDL replication: error [Error code [1031], ORA-01031: insufficient privileges, SQL drop user abc /* GOLDENGATE_DDL_REPLICATION */], no error handler present.
The following DDL statements were issued on source
原文地址:http://gavinsoorma.com/2010/07/goldengate-ddl-synchronization-some-more-examples/
d.Goldengate数据库(dblogin userid xxx)用户和Oracle数据库自带的用户的DDL操作将不会被复制
关于Goldengate DDL复制支持的用户及对象,将在随后讨论,因为也不是一句两句能说清除的。
e.当开启Full DDL(可能是ALL Scope)支持时,不要在参数文件中使用GETTRUNCATES参数
这一点不是很理解,知情的朋友可以留言告知。
f.默认情况下ALTER DATABASE、ALTER SYSTEM不会被复制
这一点还是参考《GGS_Fund_10.4_WinUX.ppt》DDL部分
2.Goldengate支持DDL复制的Oracle数据库对象
clusters、functions、indexes、packages、procedures、roles、sequences、synonyms、tables、tablespaces、triggers、types、views、materialized views、users
上面列出的对象在复制时,是有限的支持,详细情况会在随后的博文中探讨。
3.DDL语句包含的主要内容及语法
● scope
● object type
● operation type
● object name
● strings in the DDL command syntax or comments, or both
这里重点是scope和object name这两项内容,后面会详细讲这两个参数。
Syntax
DDL [
{INCLUDE | EXCLUDE}
[, MAPPED | UNMAPPED | OTHER | ALL]
[, OPTYPE <type>]
[, OBJTYPE ‘<type>’]
[, OBJNAME “<name>”]
[, INSTR ‘<string>’]
[, INSTRCOMMENTS ‘<comment_string>’]
]
[...]
4.DDL语句的4个Scope
对应上面DDL语法总的[, MAPPED | UNMAPPED | OTHER | ALL]
这是DDL同步中非常重要的一点,刚开始开启DDL复制的人在没看文档时,只使用MAPPED Scope或者只在主抽取进程中加那么一句ddl include all,实属不太科学的做法,下面就把官方文档中的关于这4个Scope的解释捡重点的列举出来。
MAPPED Scope支持同步的DDL操作和数据库对象
对TABLE、MAP语句指定的内容有效
DDL Operations CREATE, ALTER, DROP, RENAME, GRANT*, REVOKE*
Oracle DataBase Objects TABLE*, INDEX, TRIGGER, SEQUENCE*, MATERIALIZED VIEW*
UNMAPPED
与上面相反,对TABLE、MAP语句指定的内容无效
OTHER
TABLE or MAP statements do not apply
DDL operations other than those listed above
Examples are CREATE USER, CREATE ROLE, ALTER TABLESPACE
这个没试过,应该没有ALL Scope的范围大
ALL
文档中没有该Scope解释的内容,Reference中只有一句对该Scope的解释
ALL applies INCLUDE or EXCLUDE to DDL operations of all scopes
不过从字面意思看来,ALL Scope要比上面3个所包含的范围广。
5.DDL语句格式及注意事项
当你需要同步除Goldengate和Oracle数据库自带的用户外所有用户的DDL操作时,可在源端主抽取进程中加入下面的内容
ddl include all
然后再在目标端Replicat进程参数文件中加入DDL错误的处理语句即可。
一个参数文件中只能包含一条DDL开头的语句,当你需要指定几个Oracle数据库用户时(还不能包括Goldengate和Oracle数据库自带的用户),或者多个INCLUDE、EXCLUDE语句时,可在使用组合的方式来书写
Only one DDL parameter can be used in a parameter file, but you can combine multiple
inclusion and exclusion options to filter the DDL to the required level.
● When combined, multiple option specifications are linked logically as AND statements.
● All criteria specified with multiple options must be satisfied for a DDL statement to be
replicated.
● When using complex DDL filtering criteria, it is recommended that you test your
configuration in a test environment before using it in production.
第一点中提到了,使用"&"符号来组合这些语句,如下示例:
ddl &
include all objname "oggsa.*" &
include all objname "oggsb.*" &
exclude "oggsc.*"
还可以使用下面的这种加","的书写方式
ddl include all objname "oggsa.*", include all objname "oggsc.*"
Reference中还有一种只用空格隔开的,应该跟"&"差不多,看着不太清爽,想用的朋友自己用吧。
ddl include objname “fin.*” exclude “fin.ss”
欢迎大家继续补充。
原创文章,转载请注明: 转载自tdy218's blog
- Goldengate DDL复制相关注意事项
- GoldenGate DDL双向复制
- GoldenGate单向复制配置(支持DDL复制)
- GoldenGate配置(三)之DDL复制配置
- GoldenGate复制3:异构跨平台跨版本支持DDL的oracle复制
- 配置Goldengate支持DDL
- GoldenGate 单向DDL同步
- goldengate 学习系列1–10gasm to 11gR2 asm 单向复制(DDL支持)
- GoldenGate的安装与配置(一)oracle——oracle单向复制(DML和DDL)
- GOLDENGATE安装与数据复制流搭建配置_不含DDL抽取版
- GOLDENGATE安装配置与复制流搭建_DG端抽取支持DDL版
- Oracle GoldenGate DDL Synchronization configuration
- ORACLE GOLDENGATE DDL单向同步
- GoldenGate DDL配置详解(原创)
- GoldenGate PUMP复制
- GoldenGate配置单向复制
- goldengate单向复制文档
- Goldengate双向复制配置
- 实用Android开发工具和资源精选
- 黑马程序员_Java_I/O流学习(第二天)
- 字典:格式化字符串
- build qt-everywhere-opensource-src-4.8.0
- 贡献30本经典Linux学习和开发教程和资料,都是pdf完整版的
- Goldengate DDL复制相关注意事项
- 制作可执行的JAR文件包及jar命令详解zt
- hibernate 学习四——一对多关系(OneToMany)
- 屏幕分辨率问题 320*569的真相
- 统计一维数组中元素出现次数
- Java转义字符
- sql
- Zookeeper-人民民主专政
- rpm与yum(本地yum源的安装) .