Pages

Friday, November 6, 2015

ERROR - OGG-01028 Incompatible record : Bad record on trail


If the replicat or pump is abended on the trail with seqno and RBA with error message " ERROR   OGG-01028  Incompatible record (logical EOF) in /goldengate "" 

Make sure there is any bad records on the trail by using the RBA and seqno of the current trail. Open the trail file to read records on the  trail. using logdump utility we open the trails and read the data on the trail 


Find the good header before the break
Logdump 16> sfh prev  


Logdump 17 >detail data
Logdump 18 >pos 7890
Reading in reverse from RBA 7890
Logdump 19 >n
Bad record found at RBA 7890, format 5.50 Trailer token) 
 4680 0581                                         | F...    


When we found bad record, we have to make sure trail is totally corrupted or just one record is corrupted. count command tells about how many records are logged in the trail 

Logdump > count 
If it didn't send any output, we can confirm that trail is corrupted 


Logdump 20 >n
Bad record found at RBA 7890, format 5.50 Trailer token) 
 4680 0581                                         | F...  
Logdump 21 >n
Bad record found at RBA 7890, format 5.50 Trailer token) 
 4680 0581  

If the trail is totally corrupted, we need to alter trail to the next seqno is available. Here we have potential data loss, we need to resync the target table with source table 


Initially list the trails available in the trail directory 



GGSCI (tnc61.ffdc.com) 5> sh ls -ltr /u01/app/trails/ba*

-rw-r----- 1 oracle dba 14908970 Sep 30 02:59 /u01/app/trails/ba000005
-rw-r----- 1 oracle dba 589090 Sep 30 02:59 /u01/app/trails/ba000004

ggsci> alter replicatname, extseqno 5, extrba 0

ggsci> start replicatname

if only 1 record is corrupted and trail is healthy 

alter the replicat to the next RBA available on the trail using "scanforheader"
Resync the source table and target table if required...

for example # 

Logdump 561 >n
Bad record found at RBA 1361, format 5.50 Header token)
 0000 3b45                                         | ..;E
Logdump 562 >n
Bad record found at RBA 1361, format 5.50 Header token)
 0000 3b45                                         | ..;E
Logdump 563 >n
Bad record found at RBA 1361, format 5.50 Header token)
 0000 3b45                                         | ..;E

Logdump 564 >scanforheader
___________________________________________________________________
Hdr-Ind    :     E  (x45)     Partition  :     .  (x04)
UndoFlag   :     .  (x00)     BeforeAfter:     B  (x42)
RecLength  :    26  (x001a)   IO Time    : 2016/08/24 05:22:33.000.000
IOType     :     3  (x03)     OrigNode   :   255  (xff)
TransInd   :     .  (x01)     FormatType :     R  (x52)
SyskeyLen  :     0  (x00)     Incomplete :     .  (x00)
AuditRBA   :       2133       AuditPos   : 83285008
Continued  :     N  (x00)     RecCount   :     1  (x01)
2016/08/24 05:22:33.000.000 Delete               Len    26 RBA 1529
Name: DELTA.ANDHRA_PRADESH
Before Image:                                             Partition 4   G  m
 0000 000a 0000 0006 6d75 6d62 6169 0001 0008 0000 | ........mumbai......
 0004 3131 3131                                    | ..1111
Column     0 (x0000), Len    10 (x000a)
 0000 0006 6d75 6d62 6169                          | ....mumbai
Column     1 (x0001), Len     8 (x0008)
 0000 0004 3131 3131                               | ....1111
Logdump 572 >count
** Count begins at RBA 1529
LogTrail /appl/tnc1/gghome/dirdat/bg000005 has 63 records
Total Data Bytes              4116
  Avg Bytes/Record              65
Delete                          11
Insert                          10
FieldComp                       40
GGSPKUpdate                      2
Before Images                   11
After Images                    52
Average of 15 Transactions
    Bytes/Trans .....        476
    Records/Trans ...          4
    Files/Trans .....          1

DELTA.ANDHRA_PRADESH                           Partition 4
Total Data Bytes              4116
  Avg Bytes/Record              65
Delete                          11
Insert                          10
FieldComp                       40
GGSPKUpdate                      2
Before Images                   11
After Images                    52
Logdump 573 >

>>>Alter the pump or replicat to next good record to process as follows #

GGSCI (zlt08215) 3> alter PIND61, extseqno 05 extrba 1529
EXTRACT altered.

GGSCI (zlt08215) 4> start PIND61
Sending START request to MANAGER ...
EXTRACT PIND61 starting



---Nikhil Tatineni----
---gg--