OGG-01008 Extract displays Discarding bad record (discard recs=1) when using filter or where clause

时间:2021-12-26 21:18:38

因为在extract參数文件里使用了where语句,而where后面的的条件列又不是主键,没有为update、delete操作记录日志,因此会报1008错误。

Applies to:

Oracle GoldenGate - Version 10.0.0.1 and later

Information in this document applies to any platform.

Symptoms

1. I am using filter or where clause in extract parameter file and the column is not a part of primary or unique key



2.Update and delete operations are not captured and following warning message is logged to discard file and ggserr.log file

Cause

By default, When trandata is added, for a Oracle database supplemental logging is enabled only for primary key columns. If a column other than primary key column is used in FILTER or WHERE clause, then that column needs to be logged for update and delete operations.



By default, In OGG deletes are COMPRESSDELETES, it causes Extract to write only the primary key value to the trail, for delete operations.                                                                                             



So the column will not be logged for update or delete operations, which will make the extract discard the update/delete operations as bad records to discard file, due to missing field
For Non-Oracle databases, updates are compressed updates, it logs only key column used by extract to trail.

Solution

For Oracle database

1. Enter into ggsci



2. Stop the extract



3. Delete trandata <schema>.<table_name>



4. Add trandata <schema>.<table_name>, nokey, cols (col1, col2)

where col1 is the primary key column and col2 is the column included in filter clause.



5. Add the following parameter to extract parameter file. By default, it is compressed deletes.



NOCOMPRESSDELETES



6. Restart the extract

For Non-Oracle database (DB2 LUW,  DB2 z/OS, Teradata version 12 or later,  SQL Server, Sybase)

1. Enter into ggsci

2. Stop the extract

ggsci>stop extract <extract-name>

3. Add the following parameter to extract parameter file

NOCOMPRESSUPDATES

NOCOMPRESSDELETES

4. Restart the extract and retest the issue

Note :Upcoming updates and delete operations will work fine. The records captured so far does not have the value logged in archive log file for the column used in FILTER clause.
Also if the filter clause is used in replicat parameter file but  not in extract. The replicat may ignore those records without any warning or error messages. Solution is same as above 

OGG-01008 Extract displays Discarding bad record (discard recs=1) when using filter or where clause的更多相关文章

  1. ogg:Extract 进程遇长事务执行 Forcestop 引发的*

    http://www.linuxidc.com/Linux/2015-04/115777.htm SQL> select t.addr,t.START_DATE from v$transacti ...

  2. 【OGG】OGG基础知识整理

    [OGG]OGG基础知识整理 一.GoldenGate介绍 GoldenGate软件是一种基于日志的结构化数据复制软件.GoldenGate 能够实现大量交易数据的实时捕捉.变换和投递,实现源数据库与 ...

  3. OGG ERRORS 总结

    OGG ERRORS 总结 */--> OGG ERRORS 总结 Table of Contents 1. libnnz11.so 2. 00446 2.1. missing filename ...

  4. oracle ogg 单实例双向复制搭建(oracle-oracle)--Oracle GoldenGate

    oracle ogg 单实例双向复制搭建(oracle-oracle)--Oracle GoldenGate --继昨天的测试,这一篇实施单实例双向复制(完全重新搭建) --环境不变 db1,db2( ...

  5. ogg跳过某个RBA

    1.从库复制进程报如下错误 *************************************************************************              ...

  6. OGG学习笔记01-基础概述

    OGG学习笔记01-基础概述 OGG(Oracle Golden Gate),最近几年在数据同步.容灾领域特别火,甚至比Oracle自己的原生产品DataGuard还要风光,主要是因为其跨平台.跨数据 ...

  7. OGG学习笔记02-单向复制配置实例

    OGG学习笔记02-单向复制配置实例 实验环境: 源端:192.168.1.30,Oracle 10.2.0.5 单实例 目标端:192.168.1.31,Oracle 10.2.0.5 单实例 1. ...

  8. Oracle中对XMLType的简单操作(extract、extractvalue&period;&period;&period;)

    Oracle中对XMLType的简单操作(extract.extractvalue...)    1.下面先创建一个名未test.xml的配置文件. <?xml version="1. ...

  9. MySQL data sync to Oracle with OGG&lpar;Remote Delivery&rpar;

    MySQL to Oracle with OGG 1. Install MySQL: yum install mysql-community-server [root@localhost ~]#  y ...

随机推荐

  1. java中使用junit测试

    最初写代码只要功能走通就不管了,然后如果出了什么问题再去修改,这是因为没做测试的工作.测试其实很简单. 1.准备 当前使用idea编写代码,用maven构建工程,使用maven的test功能来进行批量 ...

  2. Knockoutjs快速入门&lpar;经典&rpar;

    Knockoutjs是一个JavaScript实现的MVVM框架.主要有如下几个功能: 1. Declarative bindings 2. Observables and dependency tr ...

  3. netbeans使用技巧总结&plus;快捷键大全

      部分经常用的快捷键: 使用快捷键Alt+Enter显示修复错误的方法. 4.导航 a)Alt+Shift+O :转到类. b)Ctrl+Tab :在打开的源文件中进行切换. c)Alt+Right ...

  4. &period;net 自然排序方式

    using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Cons ...

  5. 《C&plus;&plus; Primer Plus 6th》读书笔记 - 第九章 内存模型和名称空间

    1. 单独编译 1.1 头文件中常包含的内容: 函数原型 使用#define或const定义的符号常量 结构声明 类声明 模板声明 内联声明 1.2 只需将源代码文件加入到项目中,而不用加入头文件.这 ...

  6. &lbrack;WebGL入门&rsqb;十六,绘制多个模型

    注意:文章翻译http://wgld.org/.原作者杉本雅広(doxas),文章中假设有我的额外说明,我会加上[lufy:],另外.鄙人webgl研究还不够深入.一些专业词语.假设翻译有误.欢迎大家 ...

  7. 创建基本的2D场景(part1)

    通过一个简单的2D游戏案例来学习unity 2D游戏开发,本文分为以下3个部分. · 创建工作层 · 添加静态景物 · 制作2D动画 通过这个案例,我们可以学习到unity2D游戏制作的基本流程,Sp ...

  8. HDU 5890 Eighty seven

    预处理,$01$背包,$bitset$优化. 可以预处理出每一种询问的答案,用$01$背包计算答案,$dp[i][j][k]$表示,前$i$个数字中,选择了$j$个,能否凑出$k$这个数字,可以开成$ ...

  9. 智联招聘 卓聘IM演进过程

    1.  卓聘IM开发背景 智联卓聘是智联旗下高端人才招聘平台,成立快4年了,业务增涨每年以100%速度增涨,业务增涨快在开发和上线速度要求也比较高. 2016年6月提出IM开发需求,7月初上线,开发人 ...

  10. 虚拟机搭建hadoop环境

    这里简单用三台虚拟机,搭建了一个两个数据节点的hadoop机群,仅供新人学习.零零碎碎,花了大概一天时间,总算完成了. 环境 Linux版本:CentOS 6.5 VMware虚拟机 jdk1.6.0 ...