博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
OGG-01008 Extract displays Discarding bad record (discard recs=1) when using filter or where clause
阅读量:5115 次
发布时间:2019-06-13

本文共 2264 字,大约阅读时间需要 7 分钟。

因为在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 

转载于:https://www.cnblogs.com/hrhguanli/p/4033727.html

你可能感兴趣的文章
WCF揭秘——使用AJAX+WCF服务进行页面开发
查看>>
【题解】青蛙的约会
查看>>
IO流
查看>>
mybatis调用存储过程,获取返回的游标
查看>>
设计模式之装饰模式(结构型)
查看>>
面向对象的设计原则
查看>>
Swift3.0服务端开发(三) Mustache页面模板与日志记录
查看>>
【转】 FPGA设计的四种常用思想与技巧
查看>>
EntityFrameWork 实现实体类和DBContext分离在不同类库
查看>>
新手算法学习之路----二叉树(在一个二叉查找树中插入一个节点)
查看>>
autopep8
查看>>
GIT在Linux上的安装和使用简介
查看>>
基于C#编程语言的Mysql常用操作
查看>>
s3c2440实验---定时器
查看>>
MyEclipse10安装SVN插件
查看>>
[转]: 视图和表的区别和联系
查看>>
Regular Experssion
查看>>
图论例题1——NOIP2015信息传递
查看>>
uCOS-II中的任务切换-图解多种任务调度时机与问题
查看>>
CocoaPods的安装和使用那些事(Xcode 7.2,iOS 9.2,Swift)
查看>>