Oracle Golden Gate – OGG-01028 Incompatible record

Intro

The incompatible record error is one I have seen a couple of times now with DB2 as the source and it seems to hing around something that occurs on weekends when they take the system down for maintenance.  I have yet to pinpoint the cause, but this workaround does get everything back up and running.

 

Symptoms

From the report file:

Switching to next trail file ./dirdat/qt000141 at 2014-10-20 09:14:57 due to EOF, with current RBA 99999985
Opened trail file ./dirdat/qt000141 at 2014-10-20 09:14:57


Source Context :
  SourceModule            : [er.processloop]
  SourceID                : [/scratch/aime1/adestore/views/aime1_adc4150267/oggcore/OpenSys/src/app/er/processloop.cpp]
  SourceFunction          : [process_extract_loop]
  SourceLine              : [874]
  ThreadBacktrace         : [7] elements
                          : [/apps/oracle/ggs/libgglog.so(CMessageContext::AddThreadContext()+0x1e) [0x7fc89734bc3e]]
                          : [/apps/oracle/ggs/libgglog.so(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...)+0x2cc) [0x7fc89734498c]]
                          : [/apps/oracle/ggs/libgglog.so(_MSG_ERR_ER_GENERIC_FAILURE(CSourceContext*, char const*, CMessageFactory::MessageDisposition)+0x31) [0x7fc8
9732f839]]
                          : [/apps/oracle/ggs/replicat(process_extract_loop()+0x31f1) [0x53e581]]
                          : [/apps/oracle/ggs/replicat(main+0x732) [0x54faa2]]
                          : [/lib64/libc.so.6(__libc_start_main+0xfd) [0x3e5ce1ed1d]]
                          : [/apps/oracle/ggs/replicat(__gxx_personality_v0+0x332) [0x4c233a]]

2014-10-20 09:15:17  ERROR   OGG-01028  Incompatible record (101) in ./dirdat/qt000141, rba 1155 (getting header).

 

Fix

Use the logdump utility to gather the required info from the trail file.

 

> cd $GG_HOME
> ./logdump

Oracle GoldenGate Log File Dump Utility for Oracle
Version 11.2.1.0.7 16934304 OGGCORE_11.2.1.0.7_PLATFORMS_130709.1600.1

Copyright (C) 1995, 2013, Oracle and/or its affiliates. All rights reserved.



Logdump 22 >log to incompat_record.log
--- Session log incompat_record.log opened 2014/10/20 09:31:32.434.370 ---
Logdump 23 >open /apps/oracle/ggs/dirdat/qt000141
Current LogTrail is /apps/oracle/ggs/dirdat/qt000141
Logdump 24 >ghdr on
Logdump 25 >pos 1155
Reading forward from RBA 1155
Logdump 26 >n
Bad record found at RBA 1155, format 5.50 Header token)
 8004 8647                                         | ...G
Logdump 27 >sfh prev
Scanned    1155 bytes and did not find a header
Bad record found at RBA 1155, format 5.50 Header token)
 8004 8647                                         | ...G
Logdump 28 >sfh next
___________________________________________________________________
Hdr-Ind    :     E  (x45)     Partition  :     .  (x04)
UndoFlag   :     .  (x00)     BeforeAfter:     A  (x41)
RecLength  :   119  (x0077)   IO Time    : 2014/10/18 00:26:10.455.904
IOType     :    15  (x0f)     OrigNode   :   255  (xff)
TransInd   :     .  (x01)     FormatType :     R  (x52)
SyskeyLen  :     0  (x00)     Incomplete :     .  (x00)
AuditRBA   :          0       AuditPos   : 58745476396002
Continued  :     N  (x00)     RecCount   :     1  (x01)

2014/10/18 00:26:10.455.904 FieldComp            Len   119 RBA 1158
Name: schema_name.table_name
After  Image:                                             Partition 4      m
 0000 000a 0000 0000 0000 0335 dba7 0001 000a 0000 | ...........5........
 0000 0000 0000 0001 0021 0034 0000 c4e3 d3f0 f0f1 | .........!.4........
 c2f3 4040 4040 4040 4040 4040 4040 4040 4040 4040 | ..@@@@@@@@@@@@@@@@@@
 4040 4040 4040 4040 4040 4040 4040 4040 4040 4040 | @@@@@@@@@@@@@@@@@@@@
 4040 4040 0022 001f 0000 f2f0 f1f4 60f1 f060 f1f8 | @@@@."........`..`..
 7af0 f07a f2f6 7af5 f54b f8f7 f0f8 f5f4 f0f0 f0   | z..z..z..K.........

Logdump 29 >exit


Since the issue is with the header of the file, I went to the next record instead of the previous one.  Looks like RBA 1158 is good, and doing a count from here works so the rest of the file is good.  So, let’s alter the replicat to this next good record and start it up.

 

> ./ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.7 16934304 OGGCORE_11.2.1.0.7_PLATFORMS_130709.1600.1_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Jul 18 2013 07:04:28

Copyright (C) 1995, 2013, Oracle and/or its affiliates. All rights reserved.

GGSCI > info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
REPLICAT    ABENDED     DB_REP    56:32:07      00:35:28

GGSCI > info *

REPLICAT   DB_REP  Last Started 2014-10-20 10:05   Status ABENDED
Checkpoint Lag       57:39:50 (updated 00:02:38 ago)
Log Read Checkpoint  File ./dirdat/qt000140
                     2014-10-18 00:26:09.793226  RBA 99981632


GGSCI > alter replicat DB2P_REP, extseqno 141, extrba 1158
REPLICAT altered.

GGSCI > start replicat DB_REP

Sending START request to MANAGER ...
REPLICAT DB_REP starting

 

After starting the replicat, normal processing of records started again.

 

References

 

How to Recover from an OGG-01028 Incompatible Record If the Trail Is Not Corrupt (Doc ID 1507462.1)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s