Skip to main content
GoldenGate

Replicat abended due to discard file size exceeded

By December 9, 2024No Comments3 min read

Oracle GoldenGate (OGG) is a leading solution for data replication, but configuration challenges like discard file size limits and key column issues can cause disruptions. This post explains a practical approach to solving such issues during replication.

Problem

During the replication of the table USERS_TBL from a source database to a target database, the following errors were encountered:

2024-06-14T22:37:23.322+0530  INFO    OGG-06604  Oracle GoldenGate Delivery for Oracle:  Database TARGETPDB CPU info: CPU Count 1, CPU Core Count 1, CPU Socket Count 1.
2024-06-14T22:37:23.328+0530  INFO    OGG-00996  Oracle GoldenGate Delivery for Oracle:  REPLICAT rep_process started.
2024-06-14T22:37:23.331+0530  INFO    OGG-02911  Oracle GoldenGate Capture for Oracle, extract_process.prm:  Processing table SOURCEDB.SCHEMA_SOURCE.TABLE_USERS.
2024-06-14T22:37:23.427+0530  INFO    OGG-06505  Oracle GoldenGate Delivery for Oracle:  MAP resolved (entry SOURCEDB.SCHEMA_SOURCE.TABLE_USERS): MAP "SOURCEDB"."SCHEMA_SOURCE"."TABLE_USERS", TARGET TARGETDB.SCHEMA_TARGET.TABLE_USERS, KEYCOLS(USER_ID,BRAND_ID,REGION_ID), COLMAP (USEDEFAULTS, BRAND_ID=@token('BRAND_ID'),REGION_ID=@token('REGION_ID')).
2024-06-14T22:37:23.522+0530  INFO    OGG-06441  Oracle GoldenGate Delivery for Oracle:  Unique key TABLE_USERS_BRAND_ID_REGION_ID_UK for table TABLE_USERS cannot be used due to the inclusion of virtual columns, or user-defined datatypes, or extended long varchar columns, or function-based index columns.
2024-06-14T22:37:23.522+0530  INFO    OGG-06441  Oracle GoldenGate Delivery for Oracle:  Unique key TABLE_USERS_PK for table TABLE_USERS cannot be used due to the inclusion of virtual columns, or user-defined datatypes, or extended long varchar columns, or function-based index columns.
2024-06-14T22:37:23.522+0530  INFO    OGG-02756  Oracle GoldenGate Delivery for Oracle:  The definition for table SOURCEDB.SCHEMA_SOURCE.TABLE_USERS is obtained from the trail file.
2024-06-14T22:37:23.522+0530  INFO    OGG-06510  Oracle GoldenGate Delivery for Oracle:  Using the following key columns for target table TARGETDB.SCHEMA_TARGET.TABLE_USERS: USER_ID, BRAND_ID, REGION_ID.
2024-06-14T22:37:23.696+0530  ERROR   OGG-01172  Oracle GoldenGate Delivery for Oracle:  Discard file (./dirrpt/repinit.dsc) exceeded max bytes (3000000).
2024-06-14T22:37:23.708+0530  WARNING OGG-01194  Oracle GoldenGate Capture for Oracle, extract_process.prm:  EXTRACT task rep_process abended : Initial data load error reported by REPLICAT.
2024-06-14T22:37:23.742+0530  ERROR   OGG-01203  Oracle GoldenGate Capture for Oracle, extract_process.prm:  EXTRACT abending.
2024-06-14T22:37:23.744+0530  ERROR   OGG-01668  Oracle GoldenGate Capture for Oracle, extract_process.prm:  PROCESS ABENDING.
2024-06-14T22:37:28.709+0530  ERROR   OGG-01668  Oracle GoldenGate Delivery for Oracle:  PROCESS ABENDING.

Root Cause:

The discard file (repinit.dsc) reached its default size limit (approximately 2.86 MB). As a result, the process abended when attempting to write additional errors.

Solution

Step 1: Address the Discard File Size Issue

  1. Rename the Existing Discard File: To free up space, rename the existing discard file
cd dirrpt
mv repinit.dsc repinit_old.dsc

Update the Replicat Configuration: Configure the discard file with an increased size limit. Update the replicat parameter file as follows

REPERROR (-1, DISCARD) DISCARDFILE ./dirrpt/repinit_new.dsc, PURGE, MEGABYTES 50

This creates a new discard file with a maximum size of 50 MB.

    Now start the replicat.

    STOP REPLICAT repuser
    START REPLICAT repuser
    

    With these changes, your Oracle GoldenGate replication should run smoothly, handling both discard file and key column challenges effectively. If you’ve faced similar issues, share your experiences or questions in the comments below!

    Leave a Reply