今天在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 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 waring
message is logged to discard file and gguser.log file

Cause:
By default,when trandata is added, for a Oracle database
supplemental loggin 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 COMPRESSEDELETES,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 extrat
For Non-Oracle database(DB2 LUW, DB2 z/OS,Teradata version
12 or later,SQL Server,Sysbase)
1.Enter into ggsci
2.stop the extract
3.Add the following parameter to extract parameter file
NOCOMPRESSUPDATES
NOCOMPRESSDELETES
4.restart the extract and retest the issue