Goldengate FORMAT RELEASE

有时候我们会遇见 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

版本不一样,所以造成错误。

那么我们只需要在抽取和投递进程中加入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.

那么我们迫使抽取进程和投递进程切换一个新的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 -1, 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,一切恢复正常。

时间: 2024-12-09 07:18:57

Goldengate FORMAT RELEASE的相关文章

GoldenGate 异常处理预案

异常处理一般步骤 如果GoldenGate复制出现异常,可以通过以下步骤尝试解决问题: 1)        通过ggsci>view report命令查找ERROR字样,确定错误原因并根据其信息进行排除: 2)        通过ggsci>view ggsevt查看告警日志信息: 3)        检查两端数据库是否正常运行,网络是否连通: 4)        如不能确定错误原因,则可以寻求Oracle技术支持.在寻求技术支持时一般需要提供以下信息: ü  错误描述 ü  进程报告,位于d

原创:goldengate从11.2升级到12.1.2

goldengate从11.2升级到12.1.2 1.停止抽取进程 GGSCI (001.oracle.drs.dc.com) 286> stop EXTSJ01 2. 停止投递和复制进程 等待投递进程传输完和复制进程加载完毕.当投递进程的Write Checkpoint #1的Sequence和RBA和复制进程的 Current CHECKPOINT的Sequence和RBA相同时表示已同步完毕 2.1检查投递进程: GGSCI (001.oracle.drs.dc.com) 202> in

Oracle GoldenGate学习之--GoldenGate的监控

Oracle GoldenGate学习之--GoldenGate的监控 1.使用GGSCI命令监控 (1)进入GoldenGate安装目录,运行GGSCI,然后使用info all查看整体的运行状况 GGSCI (aix212) 1> info all Program     Status      Group       Lag at Chkpt  Time Since Chkpt MANAGER     RUNNING EXTRACT     RUNNING     EORA_1      

Goldengate升级之目标端(replicat端)升级

要升级replicat端的原因为:目标端OGG软件版本与源端OGG软件版本不同,在实际生产应用中,经常发现replicat端事务丢失的情况,所以,需要将目标端的OGG软件升级为与源端OGG相同软件版本. 1.升级前环境情况 源端OGG版本11.2.1.0.1 目标端OGG版本11.1.1.1.2 升级前,为了解决源端.目标端OGG版本不一致不能正常同步的问题,在源端抽取Tail file格式时,加了format release 11.1的格式转换命令,在extract与data pump进程中均

使用 Oracle GoldenGate 在 Microsoft SQL Server 和 Oracle Database 之间复制事务

使用 Oracle GoldenGate 在 Microsoft SQL Server 和 Oracle Database 之间复制事务 作者:Nikolay Manchev 分步构建一个跨这些平台的简单事务复制示例. 2011 年 8 月发布 大多数关注数据复制的 Oracle 技术专家都熟悉 Oracle Streams.在 2009 年之前,Streams 一直是推荐使用的最流行的 Oracle 数据分发技术. 2009 年 7 月,Oracle 收购了 GoldenGate 这一数据库复

GoldenGate Integrated Capture Mode

通常我们配置的Goldengate是读取在线日志文件或者ALO(只读归档日志的).还有另外一种抽取模式Integrated Capture Mode,它是依靠 logmining server读取数据库改变的信息 Integrated capture supports more data types as well as compressed data and as it is fully integrated with the database there is no additional s

Goldengate 应用环境 mysql to oracle

前言 一个需求,mysql的某些表,实时同步至oracle,于是就产生了这篇文章,安装过程中,走了些弯路,原因是没太深刻理解,官方提供安装步骤所代表的意义. 环境 源端:mysql-server 5.5.39 , Goldengate for mysql 121210 , MySQL-client-5.5.28-1.linux2.6.x86_64.rpm , mysql-connector-odbc-5.2.7-1.el6.x86_64.rpm 目标端:oracle10g,linux Golde

Upgrade Goldengate 11.1.1.1.2 to 11.2.1.0.1

配置环境: Source: OGG:11.2.1.0.1 Name:zbdba1 Target: OGG:11.1.1.1.2 Name:zbdba2 现在将Target升级到与源端一样的版本 备份Target ogg安装目录: [[email protected] /]# cp -R ogg/ /database/ 查看Source端抽取进程是否active: GGSCI (zbdba1) 6> send extract ext1 logend Sending LOGEND request t

GoldenGate抽取Informix数据库安装及配置

GoldenGate抽取Informix数据库安装及配置 本次测试架构 l  在中间机上安装informix csdk4.10版本,并编译配置unixODBC; l  在中间机上安装ogg for Informix 12.2,负责抽取informix主机的数据: l  在目标端oracle节点 上安装ogg for oracle 12.2,负责接收增量数据并写入到oracle db. 安装配置 源端主机上启用cdc功能 使用dbaccess,执行 $INFORMIXDIR/etc/syscdcv