程序员人生 网站导航

Goldengate FORMAT RELEASE

栏目:数据库应用时间:2015-03-09 08:54:54

有时候我们会遇见 OGG-01389 File header failed to parse tokens.

Source: OGG:11.2.1.0.1 Name:zbdba1 Target: OGG:11.1.1.1.2 Name:zbdba2

版本不1样,所以造成毛病。
那末我们只需要在抽取和投递进程中加入format release 11.1 便可
具体操作以下:
停止所有的extract和replicat进程
Source:

GGSCI (zbdba1) 2> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER STOPPED EXTRACT STOPPED EXT1 00:00:00 00:01:15 EXTRACT STOPPED EXT2 00:00:00 00:00:38 Target: GGSCI (zbdba2) 18> info all Program Status Group Lag Time Since Chkpt MANAGER RUNNING REPLICAT STOPPED REP1 00:00:00 00:04:38
修改抽取和投递进程的参数文件:

Source: GGSCI (zbdba1) 2> view param ext1 EXTRACT EXT1 setenv ( NLS_LANG = AMERICAN_AMERICA.ZHS16GBK ) USERID ogg,PASSWORD ogg DDL & INCLUDE MAPPED OBJTYPE 'TABLE' & INCLUDE MAPPED OBJTYPE 'IDNEX' & INCLUDE MAPPED OBJTYPE 'SEQUENCE' & INCLUDE MAPPED OBJTYPE 'VIEW' & INCLUDE MAPPED OBJTYPE 'PROCEDURE' & INCLUDE MAPPED OBJTYPE 'FUNCTION' & INCLUDE MAPPED OBJTYPE 'PACKAGE' & INCLUDE MAPPED OBJTYPE 'MATERIALIZED VIEW' & EXCLUDE OPTYPE COMMENT DDLOPTIONS ADDTRANDATA NOCROSSRENAME REPORT REPORTCOUNT EVERY 1 MINUTES,RATE DISCARDFILE ./dirrpt/EXTSA.DSC,APPEND,MEGABYTES 1024 THREADOPTIONS MAXCOMMITPROPAGATIONDELAY 60000 IOLATENCY 60000 DBOPTIONS ALLOWUNUSEDCOLUMN WARNLONGTRANS 2H,CHECKINTERVAL 3M --add format release 11.1 exttrail ./dirdat/sa,format release 11.1 FETCHOPTIONS NOUSESNAPSHOT,FETCHPKUPDATECOLS,MISSINGROW REPORT table zbdba.*; GGSCI (zbdba1) 3> view param ext2 EXTRACT EXT2 passthru RMTHOST 192.168.56.61,MGRPORT 7839,COMPRESS --add format release 11.1 RMTTRAIL ./dirdat/sa,format release 11.1 table zbdba.*;
先别急着启动进程,由于之前的trial文件是11.2版本的,这时候候启动会出现以下毛病:

2015-03-05 02:19:23 ERROR OGG-01411 Oracle GoldenGate Capture for Oracle, ext2.prm: Cannot convert input file /ogg/dirdat/sa000000 with format RELEASE 11.2 to output file ./dirdat/sa000002 with format RELEASE 10.4/11.1. 2015-03-05 02:19:23 ERROR OGG-01668 Oracle GoldenGate Capture for Oracle, ext2.prm: PROCESS ABENDING.
那末我们迫使抽取进程和投递进程切换1个新的trail文件:

GGSCI (zbdba1) 17> alter extract ext1 etrollover 2015-03-05 02:02:29 INFO OGG-01520 Rollover performed. For each affected output trail of Version 10 or higher format, after starting the source extract, issue ALTER EXTSEQNO for that trail's reader (either pump EXTRACT or REPLICAT) to move the reader's scan to the new trail file; it will not happen automatically. EXTRACT altered. GGSCI (zbdba1) 40> alter extract ext2 etrollover; 2015-03-05 02:19:02 INFO OGG-01520 Rollover performed. For each affected output trail of Version 10 or higher format, after starting the source extract, issue ALTER EXTSEQNO for that trail's reader (either pump EXTRACT or REPLICAT) to move the reader's scan to the new trail file; it will not happen automatically. EXTRACT altered. GGSCI (zbdba1) 43> alter extract ext2 extseqno 1 EXTRACT altered.
开启抽进程:

GGSCI (zbdba1) 45> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING EXTRACT RUNNING EXT1 00:00:00 00:00:07 EXTRACT RUNNING EXT2 00:00:00 00:00:08

查看日志:

opened). 2015-03-05 02:20:03 INFO OGG-01478 Oracle GoldenGate Capture for Oracle, ext2.prm: Output file ./dirdat/sa is using format RELEASE 10.4/11.1. 2015-03-05 02:21:18 INFO OGG-01487 Oracle GoldenGate Capture for Oracle, ext1.prm: DDL found, operation [drop table test (size 16)], start SCN [1393784], commit SCN [1393812] instance [orcl11g (1)], DDL seqno [17501], marker seqno [16501]. 2015-03-05 02:21:18 INFO OGG-00487 Oracle GoldenGate Capture for Oracle, ext1.prm: DDL operation included [INCLUDE MAPPED OBJTYPE 'TABLE'], optype [DROP], objtype [TABLE], objowner [ZBDBA], objname [TEST]. 2015-03-05 02:21:18 INFO OGG-00497 Oracle GoldenGate Capture for Oracle, ext1.prm: Writing DDL operation to extract trail file.

发现现在的trail文件版本已改变

开启复制进程:

GGSCI (zbdba2) 1> info all Program Status Group Lag Time Since Chkpt MANAGER RUNNING REPLICAT RUNNING REP1 00:00:00 00:00:02
监控日志:

2015-03-05 02:20:02 INFO OGG-01669 Oracle GoldenGate Collector: Opening ./dirdat/sa000002 (byte ⑴, current EOF 0). 2015-03-05 02:21:19 INFO OGG-00482 Oracle GoldenGate Delivery for Oracle, rep1.prm: DDL found, operation [drop table test (size 16)]. 2015-03-05 02:21:19 INFO OGG-00489 Oracle GoldenGate Delivery for Oracle, rep1.prm: DDL is of mapped scope, after mapping new operation [drop table "ZBDBA"."TEST" (size 26)]. 2015-03-05 02:21:19 INFO OGG-00487 Oracle GoldenGate Delivery for Oracle, rep1.prm: DDL operation included [INCLUDE MAPPED], optype [DROP], objtype [TABLE], objowner [ZBDBA], objname [TEST]. 2015-03-05 02:21:19 INFO OGG-01407 Oracle GoldenGate Delivery for Oracle, rep1.prm: Setting current schema for DDL operation to [ZBDBA]. 2015-03-05 02:21:19 INFO OGG-00484 Oracle GoldenGate Delivery for Oracle, rep1.prm: Executing DDL operation. 2015-03-05 02:21:23 INFO OGG-00483 Oracle GoldenGate Delivery for Oracle, rep1.prm: DDL operation successful. 2015-03-05 02:21:23 INFO OGG-01408 Oracle GoldenGate Delivery for Oracle, rep1.prm: Restoring current schema for DDL operation to [OGG].


ok,1切恢复正常。微笑






------分隔线----------------------------
------分隔线----------------------------

最新技术推荐