OGG DDL 操作详解

来源:互联网 发布:什么手游数据互通 编辑:程序博客网 时间:2024/05/22 04:35


DLL说明

从OGG 12c 开始,提供了2种DDL方式:

(1)trigger-based DDL capture:通过数据库级别的触发器来捕获。

(2)native DDL capture:也叫:triggerless DDLcapture模式,在

Source 端进行logmining。

 

具体的规则如下:

(1)Extract 使用的是integrated 模式,但是数据库是11.2.0.4 之前的,

那么必须使用trigger-based DDL capture。

(2)Extract 使用的是classic capture 模式,不管数据库是什么版本,都 

必须使用trigger-based DDL capture。因为Native DDL capture不

支持classic capture 模式。

(3)Extract是integrated模式,数据库版本大于等于11.2.0.4,那么必须

使用native DDL capture。 这种模式也叫triggerless DDL capture。

 

DLL语句长度限制

OGG使用byte为单位来计算DDL语句的长度,在12c中,最大支持4MB的DDL语句。如果DDL的长度超过4MB,那么Extract会发出警告并且忽略这个DDL操作。


查看异常信息

一般使用VIEW REPORTGROUPNAME


查看Replicat的DDL报告

Replicat 报告包含如下信息:
1Source 端每个DDL 操作的语法和SCN 值。
2DDL 条目的MAPPED, UNMAPPED 等信息。
3)其他记录处理过程的条目。
4)附加的条目,记录操作是成功还是失败。

2013-01-20 15:11:45 GGS INFO 2104 DDL found, operation [drop table myTableTemp ], Source SCN [1186713.0].                

2013-01-20 15:11:45 GGS INFO 2100 DDL is of mapped scope, after mapping new operation [drop table "QATEST2"."MYTABLETEMP" ].                

2013-01-20 15:11:45 GGS INFO 2100 DDL operation included [include objname myTable*], optype [DROP], objtype [TABLE], objname                 

[QATEST2.MYTABLETEMP].                

2013-01-20 15:11:45 GGS INFO 2100 Executing DDL operation.                

2013-01-20 15:11:48 GGS INFO 2105 DDL error ignored for next retry: error code [942], filter [include objname myTableTemp],                 

error text [ORA-00942: table or view does not exist], retry [1].                

2013-01-20 15:11:48 GGS INFO 2100 Executing DDL operation , trying again due to RETRYOP parameter.                

2013-01-20 15:11:51 GGS INFO 2105 DDL error ignored for next retry: error code [942], filter [include objname myTableTemp],                 

error text [ORA-00942: table or view does not exist], retry [2].                

2013-01-20 15:11:51 GGS INFO 2100 Executing DDL operation, trying again due to RETRYOP parameter.                

2013-01-20 15:11:54 GGS INFO 2105 DDL error ignored for next retry: error code [942], filter [include objname myTableTemp],                 

error text [ORA-00942: table or view does not exist], retry [3].                

2013-01-20 15:11:54 GGS INFO 2100 Executing DDL operation, trying again due to RETRYOP parameter.                

2013-01-20 15:11:54 GGS INFO 2105 DDL error ignored: error code [942], filter [include objname myTableTemp], error                 

text [ORA-00942:table or view does not exist].                


查看Extract的DDL报告

Extract report 包含如下信息:
 (1) Capture DDL 操作的条目语法,开始和结束的SCN值, oracle 实例,DDL sequence number(从 

history tableSEQNO 列查询)和 操作的大小(单位byte)。
 (2) 记录应用操作的子条目,如INCLUDE  EXCLUDE filtering
 (3) 其他的条目,记录操作是否写入trail 

2013-01-20 15:11:41 GGS INFO 2100 DDL found, operation [create table myTable                 

(                

myId number (10) not null,                

myNumber number,                

myString varchar2(100),                

myDate date,                

primary key (myId)                

) ], start SCN [1186754], commit SCN [1186772] instance [test11g (1)], DDL seqno [4134].                

2013-01-20 15:11:41 GGS INFO 2100 DDL operation included [INCLUDE OBJNAME myTable*], optype [CREATE], objtype [TABLE], objname                

 [QATEST1.MYTABLE].                

2013-01-20 15:11:41 GGS INFO 2100 DDL operation written to extract trail file.                

2013-01-20 15:11:42 GGS INFO 2100 Successfully added TRAN DATA for table with the key, table [QATEST1.MYTABLE], operation [ALTER TABLE                

 "QATEST1"."MYTABLE" ADD SUPPLEMENTAL LOG GROUP "GGS_MYTABLE_53475" (MYID) ALWAYS /* GOLDENGATE_DDL_REPLICATION */ ].                

2013-01-20 15:11:43 GGS INFO 2100 DDL found, operation [create table myTableTemp (vid varchar2(100),someDate date,primary key (vid)                

) ], start SCN [1186777], commit SCN [1186795] instance [test11g (1)], DDL seqno [4137].                

2013-01- 20 15:11:43 GGS INFO 2100 DDL operation excluded [EXCLUDE OBJNAME myTableTemp OPTYPE CREATE], optype [CREATE], objtype                 

[TABLE],objname [QATEST1.MYTABLETEMP].                


查看处理报告的统计信息

 可以使用如下命令来查看DDL 处理过程的统计信息,该命令可以查看Extract和Replicat的报告:

SEND {EXTRACT | REPLICAT} group REPORT



0 0
原创粉丝点击