Oracle GoldenGate can encounter challenges during replicat operations, particularly when discard files grow beyond their default size limit. Discard files store records that fail processing, and if left unchecked, they can cause the replicat to abend. This post outlines the symptoms, root cause, and steps to resolve discard file limit issues effectively.
Problem Overview:
In this case, the replicat process stopped due to the following error and the process abended
2024-06-14T22:37:23.322+0530 INFO OGG-06604 Oracle GoldenGate Delivery for Oracle: Database INTPDB 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 repuser started.
2024-06-14T22:37:23.331+0530 INFO OGG-02911 Oracle GoldenGate Capture for Oracle, extuser.prm: Processing table ESTPDB.AVUSER.USERS_TBL.
2024-06-14T22:37:23.427+0530 INFO OGG-06505 Oracle GoldenGate Delivery for Oracle: MAP resolved (entry ESTPDB.AVUSER.USERS_TBL): MAP "ESTPDB"."AVUSER"."USERS_TBL", TARGET INTPDB.ECMSTG.USERS_TBL, 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 USERS_BRAND_ID_REGION_ID_PC_EMAIL_ADDRESS_UK for table USERS_TBL 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 USERS_BRAND_ID_REGION_ID_SOURCE_ID_UK for table USERS_TBL 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 USERS_PK for table USERS_TBL 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 USERS_USER_ID_BRAND_ID_REGION_ID_UK for table USERS_TBL 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 ESTPDB.AVUSER.USERS_TBL 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 INTPDB.ECMSTG.USERS_TBL: 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, extuser.prm: EXTRACT task repuser abended : Initial data load error reported by REPLICAT.
2024-06-14T22:37:23.742+0530 ERROR OGG-01203 Oracle GoldenGate Capture for Oracle, extuser.prm: EXTRACT abending.
2024-06-14T22:37:23.744+0530 ERROR OGG-01668 Oracle GoldenGate Capture for Oracle, extuser.prm: PROCESS ABENDING.
2024-06-14T22:37:28.709+0530 ERROR OGG-01668 Oracle GoldenGate Delivery for Oracle: PROCESS ABENDING.
Upon checking the environment, it was confirmed that the discard file, repinit.dsc
, had reached the default size limit of approximately 2.86M. This resulted in the replicat abending, as indicated by:
--- Observed the discard file reached to its default limit 2.86M
-bash-4.2$ cd dirrpt
-bash-4.2$ ls -ltr repinit.dsc
-rw-r-----. 1 oracle oinstall 2996830 Jun 14 22:37 repinit.dsc
-bash-4.2$
Check the directory where discard files are stored and confirm the current size:
cd dirrpt
ls -lh repinit.dsc
Modify the replicat parameter file to increase the discard file size limit. For example, set a larger limit to allow more records before triggering a stoppage:
REPERROR (-1, DISCARD)
DISCARDFILE ./dirrpt/repinit.dsc, APPEND, MAXBYTES 5000000
Once the parameter changes are saved, restart the replicat from GGSCI:
STOP REPLICAT REPUSER
START REPLICAT REPUSER
After restarting, keep an eye on the discard file’s growth. If it continues to grow rapidly, consider further tuning the error handling and resolving the underlying data issues causing rows to be discarded.
By identifying the root cause and taking a few straightforward steps, you can prevent discard file limits from halting Oracle GoldenGate replicat operations. A well-tuned replicat configuration not only avoids abends but also ensures smooth and efficient data replication, even when handling large volumes or complex mappings.