Monday, May 5, 2025

Common issue in Golden Gate along with Solution

 Common issue in Golden Gate along with Solution


1. Processes Startup Issues
❗Problem:
GoldenGate processes (like Extract or Replicat) fail to start due to missing parameters, port issues, or environment settings.

🧪 Example:
GGSCI> start extract EXT1
ERROR: Missing required parameter: USERID
✅ Solution:
Check the parameter file:
GGSCI> edit params EXT1
Ensure you have the required lines like:
USERID ggs_admin, PASSWORD ggs_pwd
TABLE schema.table;
USERID ggs_admin, PASSWORD ggs_pwd
TABLE schema.table;
Also, make sure the GoldenGate home and environment variables (like LD_LIBRARY_PATH) are set correctly:
echo $ORACLE_HOME
echo $LD_LIBRARY_PATH
Check if the Manager process is running:
GGSCI> info mgr
GGSCI> start mgr

🔹 2. Data Not Getting Captured
❗Problem:
Extract is running but no data is captured in the trail files.

🧪 Example:
GGSCI> stats extract EXT1, totalsonly
Shows 0 inserts/updates/deletes even though source table has changes.

✅ Solution:
Check if the table is included in the Extract parameter file:
TABLE hr.employees;

Supplemental logging may not be enabled on the source:
ALTER TABLE hr.employees ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS;
Check if the database is in ARCHIVELOG mode:
ARCHIVE LOG LIST;
Ensure DDL include/exclude rules aren't filtering it out.

🔹 3. Data Not Getting Applied onto Target DB
❗Problem:
Replicat is running, but target database is not getting updated.

🧪 Example:
GGSCI> stats replicat REP1, totalsonly
Shows 0 operations, even though trail files exist.

✅ Solution:
Check if trail file path is correct in Replicat parameters:
EXTTRAIL ./dirdat/aa
Validate table mapping:
MAP hr.employees, TARGET hr.employees;
Check for errors in the report file:
GGSCI> view report REP1
Use logdump to inspect the trail file and confirm it contains valid data.

🔹 4. Data Integrity Issues
❗Problem:
Rows are missing, duplicated, or mismatched between source and target.

🧪 Example:
Target has duplicate rows or missing foreign key entries.

✅ Solution:
Use HANDLECOLLISIONS temporarily for mismatch scenarios during initial sync:
HANDLECOLLISIONS
Use Oracle GoldenGate Veridata or run SQL MINUS to compare source/target data:
SELECT * FROM source_table
MINUS
SELECT * FROM target_table;
If using bidirectional replication, enable REPERROR (default, discard) to avoid looping conflicts and use TRIGGERSUPPRESS.

Use BATCHSQL in Replicat for better performance and consistency on large updates.

No comments:

Post a Comment