OGG-02191 Incompatible record 104 in /trail/TR000000003, rba 1,589

OGG-02191 Incompatible record 104 in /trail/TR000000003, rba 1,589 when getting trail header.

Symptoms:

2019-10-13 20:48:53 ERROR OGG-02171 Error reading LCR from data source. Status 509, data source type 0.
Source Context :
SourceModule : [gglib.ggtrail.TrailDataSource]
SourceID : [/scratch/aime/adestore/views/aime_adc00jza/oggcore/OpenSys/src/gglib/ggtrail/TrailDataSource.cpp]
SourceMethod : [readNextTrailRecord]
SourceLine : [2687]
ThreadBacktrace : [14] elements
: [/ogg/oggma_12.3.0/bin/replicat(ggs::gglib::MultiThreading::MainThread::Run(int, char**))]
: [/ogg/oggma_12.3.0/bin/replicat(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::ThreadArgs*))]
: [/ogg/oggma_12.3.0/bin/replicat(_ZN3ggs5gglib14MultiThreading10MainThread3RunEiPPc+0xb5) [0x7e4df5]]
: [/ogg/oggma_12.3.0/bin/replicat(_ZN3ggs5gglib14MultiThreading10MainThread3RunEiPPc+0xb5) [0x7e4df5]]
: [/ogg/oggma_12.3.0/bin/replicat(_ZN3ggs5gglib14MultiThreading10MainThread3RunEiPPc+0xb5) [0x7e4df5]]
: [/ogg/oggma_12.3.0/bin/replicat(ggs::gglib::MultiThreading::MainThread::Run(int, char**))]
: [/ogg/oggma_12.3.0/bin/replicat(ggs::er::ReplicatContext::run())]
: [/ogg/oggma_12.3.0/bin/replicat()]
: [/ogg/oggma_12.3.0/bin/replicat(ggs::gglib::MultiThreading::MainThread::Run(int, char**))]
: [/ogg/oggma_12.3.0/bin/replicat(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::ThreadArgs*))]
: [/ogg/oggma_12.3.0/bin/replicat(ggs::gglib::MultiThreading::MainThread::Run(int, char**))]
: [/ogg/oggma_12.3.0/bin/replicat(main)]
: [/lib64/libc.so.6(__libc_start_main)]
: [/ogg/oggma_12.3.0/bin/replicat()]

2019-10-13 20:48:53 ERROR OGG-02191 Incompatible record 104 in /trail/TR000000003, rba 1,589 when getting trail header.

***********************************************************************
* ** Run Time Statistics ** *
***********************************************************************

Last record for the last committed transaction is the following:
___________________________________________________________________
Trail name : /trail/TR000000002
Hdr-Ind : E (x45) Partition : . (x0c)
UndoFlag : . (x00) BeforeAfter: B (x42)
RecLength : 528 (x0210) IO Time : 2019-09-28 23:03:38.204456
IOType : 3 (x03) OrigNode : 255 (xff)
TransInd : . (x02) FormatType : R (x52)
SyskeyLen : 0 (x00) Incomplete : . (x00)
AuditRBA : 20892 AuditPos : 0
Continued : N (x00) RecCount : 1 (x01)

2019-09-28 23:03:38.204456 Delete Len 528 RBA 1788836
TDR Index: 11
___________________________________________________________________

Reading /trail/TR000000003, current RBA 1589, 499990 records, m_file_seqno = 3, m_file_rba = 1589

Report at 2019-10-13 20:48:59 (activity since 2019-10-13 20:32:26)

Goal:

To recover from error: OGG-02191 Incompatible record 104 in /trail/TR000000003, rba 19018 (getting header).
when it is known that the trail file is intact.
This applies to both extract data pumps and replicats

SOLUTION:

If a trail is not corrupt, a pump or replicat can be restarted by noting the point of failure (trail number and RBA) indicated in the report and discard file. Please do not attempt this if you are not familiar with reading these reports.
This should be done on transaction boundaries or with RESTARTCOLLISIONS enabled. If you do not understand this, do not do this yourself; please have support assist you.
>logdump
logdump> log to mycase.txt
logdump> open (/ggtrail/GGODSCF/dirdat/cf000325) <<<— the trail in the report
logdump> ghdr on
logdump> pos (RBA 19018) <<<— the RBA in the report
logdump> n
this will give you a bad header message

logdump> sfh prev
this gives you the header of the previous record start,write down the RBA value <<<— If it’s the transaction boundary or only DML in transaction

logdump> count
if this finishes Ok and gives you a count of tables and records, the trail is OK and you can use the RBA we saved for the alter later
the trail is known to be undamaged
if this does not finish with the count, you have a bad trail and must use another recovery method, contact support.
logdump> exit

You now have a history of what you did in file mycase.txt and a written record of the RBA to use to TRTER the extract data pump or replicat

ggsci> alter <object>, extseqno < the existing sequence number>, extrba <the saved RBA>
ggsci> start <object>

Reference:

How to Recover from an OGG-01028 Incompatible Record If the Trail Is Not Corrupt (Doc ID 1507462.1)
http://datadarling.blogspot.com/2016/03/use-logdump-to-work-past-bad-record.html
http://www.databaseinmemory.com/2015/11/error-ogg-01028-incompatible-record-bad.html
http://goldengatereplication.blogspot.com/2011/12/incompatible-record-in-trail-file.html

Leave a Reply

Your email address will not be published. Required fields are marked *