记录OGG-01028 Incompatible record (101) 故障一则

近日搭建ogg目标端replicat应用数据时出现报错:

OGG-01028  Incompatible record (101) in ./dirdat/li000344, rba 2706945 (getting header).

查询MOS 1507462.1给出如下解决方式 

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

APPLIES TO:

Oracle GoldenGate - Version 9.5_EA and later Information in this document applies to any platform.

GOAL

To recover from error: OGG-01028 Incompatible record in /ggtrail/GGODSCF/dirdat/cf000325, 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 ALTER the extract data pump or replicat

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

 解决方式:

[oracle@db1 ogg]$ ./logdump 

Oracle GoldenGate Log File Dump Utility for Oracle
Version 11.2.1.0.20 18227972 OGGCORE_11.2.1.0.0OGGBP_PLATFORMS_140304.2209

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


 
Logdump 31 >log to 20200820.log    --记录日志
--- Session log 20200820.log opened 2020/08/20 13:49:45.461.700 --- 
Logdump 32 >open dirdat/li000344   --打开trail文件
Current LogTrail is /ogg/dirdat/li000344 
Logdump 33 >ghdr on
Logdump 34 >pos 2706945                 --使用上边报错rba号
Reading forward from RBA 2706945 
Logdump 35 >n                                   --查看下一条记录
Bad record found at RBA 2706945, format 5.50 Header token) 
 3038 2d30                                         | 08-0  
Logdump 36 >sfh prev                     --查看上一条记录header
___________________________________________________________________ 
Hdr-Ind    :     E  (x45)     Partition  :     .  (x04)  
UndoFlag   :     .  (x00)     BeforeAfter:     A  (x41)  
RecLength  :   312  (x0138)   IO Time    : 2020/08/15 04:34:13.931.325   
IOType     :     5  (x05)     OrigNode   :   255  (xff) 
TransInd   :     .  (x01)     FormatType :     R  (x52) 
SyskeyLen  :     0  (x00)     Incomplete :     .  (x00) 
AuditRBA   :     383158       AuditPos   : 225427896 
Continued  :     N  (x00)     RecCount   :     1  (x01) 

2020/08/15 04:34:13.931.325 Insert               Len   312 RBA 2706720 --记录此rba,接下来从这个点开始启动replicat进程
Name: BJSX.GR_SYJF_YZH 
After  Image:                                             Partition 4   G  m   
 0000 000e 0000 000a 3235 3532 3637 3834 3835 0001 | ........2552678485..  
 0010 0000 000c 3130 3230 3231 3939 3939 3037 0002 | ......102021999907..  
 0010 0000 000c 3630 3239 3731 3737 3431 3937 0003 | ......602971774197..  
 0008 0000 0004 3233 3130 0004 0015 0000 3230 3230 | ......2310......2020  
 2d30 322d 3031 3a30 303a 3030 3a30 3000 0500 0a00 | -02-01:00:00:00.....  
 0000 0000 0000 07a1 2000 0600 0a00 0000 0000 0000 | ........ ...........  
 07a1 2000 0700 0a00 0000 0000 0000 0007 d000 0800 | .. .................  
   
Logdump 37 >count                                       --检查trail文件还有没有损坏,正常数据表示正常
** Count begins at RBA 2706720 
LogTrail /ogg/dirdat/li000344 has 340369 records 
Total Data Bytes          64453845 
  Avg Bytes/Record             189 
Delete                          25 
Insert                       58995 
FieldComp                   281349 
Before Images                   25 
After Images                340344 

Average of 14854 Transactions 
    Bytes/Trans .....       5439 
    Records/Trans ...         22 
    Files/Trans .....          0 
 
Logdump 38 >

GGSCI (db1) 25>  alter      LR_BF9_A , extrba  2706720
GGSCI (db1) 25> start LR_BF9_A ,aftercsn   131690407353  --此scn是导出dmp时 指定的scn

 

你可能感兴趣的:(记录OGG-01028 Incompatible record (101) 故障一则)