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

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

时间: 2024-10-22 00:13:47

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

关于ogg同步失败之WARNING OGG-01008 Discarding bad record

今天在ogg环境中,发现在extract参数中增加了where过滤,导致update操作同步不过去,有大量的discard(WARNING OGG-01008  Discarding bad record ),但是insert和delete同步没问题, 按照以下的说明解决了问题,不同的是,我的delete可以同步,他以下的描述中的说法是update和delete都无法同步, 我的delete同步没问题,我的版本是ogg 11.2.0.1. Symptoms: 1.I am using filte

OGG的extract进程checkpoint时间点回到1988-01-01 00:00:00故障处理

1.故障现象 Extract进程(SEXTR01)状态为running,但是Lag at Chkpt却达到5个多小时,且时间一直在增长,根本就不抽取新日志,状态信息如下: GGSCI (calladgdb) 21> info all Program     Status      Group       Lag at Chkpt  Time Since Chkpt MANAGER     RUNNING EXTRACT     RUNNING     DPEYWGL     00:00:00  

ogg修改extract进程从当前抽取

因为是测试环境,几个月之前创建的ogg再次打开,源端目标端表结构已经面目全非,然后就新建了一个表,重新开始同步,但是抽取进程不是现在: GGSCI (single1) 12> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING EXTRACT RUNNING DPEND 00:00:00 00:00:03 EXTRACT ABENDED EXTND 00:00:00 1688:11:20 如何从现

ogg add extract process

In the standared oracle goldengate confiugration, one Extract group sends captured data over TCP/IP to a trail on the target system, where it is stored until processed by one Replicat group. illustrate as : Source system Configure the Extract group O

ogg:Extract 进程遇长事务执行 Forcestop 引发的惨案

http://www.linuxidc.com/Linux/2015-04/115777.htm SQL> select t.addr,t.START_DATE from v$transaction t; ADDR START_DAT ---------------- --------- 0000000136AED710 14-JUL-17 SQL> select t.PREV_SQL_ID from v$session t where taddr='0000000136AED710'; PR

ogg跳过某个RBA

1.从库复制进程报如下错误 *************************************************************************                     Run Time Messages                             ************************************************************************* Opened trail file ./di

oracle ogg 单机环境单向复制搭建

OGG安装 fbo_ggs_Linux_x64_shiphome.zip---------------------同时支持11g和12c 添加用户 useradd -u 1003 -g oinstall -G dba ogg 配置环境变量 export ORACLE_BASE=/u01/app/oracle; export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_SID=racdb1; export OGG_HOME

ogg在oracle database 11.2.0.3上还是谨慎使用集成捕捉模式

原因: OGG Integrated Extract abend with ORA-01341: LogMiner out-of-memory (文档 ID 1640076.1) APPLIES TO: Oracle GoldenGate - Version 11.2.1.0.0 and later Information in this document applies to any platform. SYMPTOMS The integrated extract abend with th

OGG孤儿server进程的检查与处理

来源于: OGG GoldenGate Extract | Pump Abends with: "TCP/IP Error 9 (Bad File Number)" (文档 ID 1359087.1) If the source Extract dies without communicating to the target server collector, that server will be orphaned and must be killed. Development pl