在复制进程中配置下面的参数可以实现对一个用户下的某些表进行过滤,在复制的时候

不做任何操作。

MAPEXCLUDE:
Valid for Replicat
Use the MAPEXCLUDE parameter with the MAP parameter to explicitly exclude tables from a
wildcard specification. MAPEXCLUDE must precede all MAP statements that contain the table or tables being excluded. 注意:必须出现在map 的前面。 例如: DDL include mapped &
EXCLUDE OBJNAME "HAOZG.TEST15"
DDLOPTIONS report
MAPEXCLUDE HAOZG.TEST15

DDL参数语法说明

在配置DDL复制时,需要在Extract 和Replicat 进程的配置文件里添加ddl属性。下面简要减少下这个属性的常用参数,参考至《OGG Windows and UNIX Reference Guide》,英文较简单,我也就不一字一句的翻译了。
DDL语句包含的主要语法如下:
DDL [
{INCLUDE | EXCLUDE}
[, MAPPED | UNMAPPED | OTHER | ALL]
[, OPTYPE <type>]
[, OBJTYPE ‘<type>’]
[, OBJNAME “<name>”]
[, INSTR ‘<string>’]
[, INSTRCOMMENTS ‘<comment_string>’]
]
[...]
{INCLUDE | EXCLUDE}
Use INCLUDE and EXCLUDE to identify the beginning of an inclusion or exclusion clause.
(1) An inclusion clause containsfiltering criteria that identifies the DDL that this parameter will affect.
(2) An exclusion clause containsfiltering criteria that excludes specific DDL from this parameter.
The inclusion orexclusion clause must consist of the INCLUDE or EXCLUDE keyword followed by anyvalid combination of other options of the parameter that is being applied.
If you use EXCLUDE, you must create acorresponding INCLUDE clause.
--如果要使用Exclude,那么必须先指定include。
For example, the following is invalid:
DDL EXCLUDE OBJNAME “hr.*”
--这种语法是错误的。
However, you can use either of thefollowing:
DDL INCLUDE ALL,EXCLUDE OBJNAME “hr.*”
DDL INCLUDE OBJNAME “fin.*” EXCLUDE “fin.ss” --正确语法
An EXCLUDE takes priority over any INCLUDEs that contain the same criteria. You can use multipleinclusion and exclusion clauses.
[, MAPPED | UNMAPPED | OTHER | ALL]
Use MAPPED, UNMAPPED,OTHER, and ALL to apply INCLUDE or EXCLUDE based on the DDL operation scope.
1、MAPPED applies INCLUDE or EXCLUDE to DDL operations that are of MAPPED scope. MAPPED filtering is performed beforefiltering that is specified with other DDL parameter options.
2、UNMAPPED applies INCLUDE or EXCLUDE to DDL operations that are of UNMAPPED scope.
3、OTHER applies INCLUDE or EXCLUDE to DDL operations that are of OTHER scope.
4、ALL applies INCLUDE or EXCLUDE to DDL operations of all scopes. 关于这四种scope的具体范围详见官方文档《OGG Windows and UNIX Reference Guide》
OPTYPE <type>
Use OPTYPE toapply INCLUDE or EXCLUDE to a specific type of DDL operation, such as CREATE, ALTER,and RENAME. For <type>, use any DDL command that is valid for thedatabase.
For example, to include ALTER operations,the correct syntax is:
DDL INCLUDE OPTYPE ALTER
OBJTYPE‘<type>’
Use OBJTYPE to apply INCLUDE or EXCLUDE to a specific type of database object. For <type>,use any object type that is valid for the database, such as TABLE, INDEX, and TRIGGER.For an Oracle materialized view and materialized views log, the correct typesare snapshot and snapshot log, respectively. Enclose the name of the objecttype within single quotes.
For example:
DDL INCLUDE OBJTYPE ‘INDEX’
DDL INCLUDE OBJTYPE ‘SNAPSHOT’
For Oracle object type USER, do not use the OBJNAME option, because OBJNAME expects “owner.object” whereas USER only has aschema.
OBJNAME“<name>”
Use OBJNAME toapply INCLUDE or EXCLUDE to the fully qualified name of an object, for example owner.table_name.This option takes a doublequoted string as input. You can use a wildcard onlyfor the object name.
Example:
DDL INCLUDE OBJNAME “accounts.*”
Do not use OBJNAME for the Oracle USER object,because OBJNAME expects “owner.object” whereas USER only has a schema.
When using OBJNAMEwith MAPPED in a Replicat parameter file, the value for OBJNAME must refer tothe name specified with the TARGET clause of the MAP statement. For example,given the following MAP statement, the correct value is OBJNAME “fin2.*”.
MAP fin.exp_*,TARGET fin2.*;
In the following example, a CREATE TABLE statementexecutes like this on the source:
CREATE TABLE fin.exp_phone;
And like this on the target:
CREATE TABLE fin2.exp_phone;
If a target owner is not specified in the MAP statement, Replicat maps it to the database user that is specified with the USERID parameter.
For DDL that creates triggers, synonyms, and indexes, the value for OBJNAME must be the name of the base object, not the name of the trigger, synonym, or index.
For example, to include the following DDL statement, the correct value is “hr.accounts,” not “hr.insert_trig.”
CREATE TRIGGER hr.insert_trig ON hr.accounts;
For RENAME operations,the value for OBJNAME must be the new table name. For example, to include the following DDL statement, the correct value is “hr.acct.”
ALTER TABLE hr.accounts RENAME TO acct;
The following is an example of how tocombine DDL parameter options.
DDL &
INCLUDE UNMAPPED &
OPTYPE alter &
OBJTYPE ‘table’ &
OBJNAME users.tab* &
INCLUDE MAPPED OBJNAME * &
EXCLUDE MAPPED OBJNAME temporary.tab"

最新文章

  1. 10天学会phpWeChat——第五天:实现新闻投稿功能
  2. 使用statsd+graphite+grafana构建业务及性能监控模块
  3. 八皇后(dfs+回溯)
  4. 四个使用promise的语句之间的不同点在哪儿?
  5. Python3基础 count 返回指定元素在列表中的个数
  6. UVa297 Quadtrees
  7. Keeplived 详解
  8. Android Studio 单刷《第一行代码》系列 07 —— Broadcast 广播
  9. Undefined symbols for architecture x86_64:
  10. discuz_style_default.xml 修改
  11. 如何使用RedisTemplate访问Redis数据结构
  12. nginx新增tcp模板
  13. Linux 网卡驱动学习(五)(收发包具体过程)【转】
  14. Nios II 程序固化(如何下载elf文件)
  15. Vue的介绍及基础指令
  16. c++实现“扫描检测硬件改动”
  17. day 31 进程的其他方法 进程锁 进程队列
  18. 一步步入门log4cpp
  19. Angular面试题四
  20. new/malloc的差别

热门文章

  1. UNIX环境编程学习笔记(1):——出错处理errno
  2. Android开发中常用的库总结(持续更新)
  3. vue v-if与v-show使用注意问题
  4. ava中有三种移位运算符
  5. Python中dataframe数据框中选择某一列非空的行
  6. Centos7系统配置上的变化
  7. HTML5标签canvas制作动画
  8. MTK 精简ROM
  9. [CNN] Face Detection
  10. Activiti 5.1.4最佳实践