Ogg 01008 extract displays discarding bad record (discard RECs = 1) when using filter or where clause

Source: Internet
Author: User
Applies:

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 an 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 encoded 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.