ogg跳过某个RBA

1.从库复制进程报如下错误

***********************************************************************
**                     Run Time Messages                             **
***********************************************************************

Opened trail file ./dirdat/pa000000 at 2018-08-14 14:03:47

2018-08-14 14:15:53  INFO    OGG-01373  User requested start after CSN 1007991.

2018-08-14 14:15:53  INFO    OGG-01374  Transaction delivery commencing at position Seqno 0, RBA 1103, Transaction ID 1.31.677, CSN 1012153, 0 transaction(s) skipped.

MAP resolved (entry hxl.tb_test):
  MAP "HXL"."TB_TEST", TARGET hxl.tb_test;

2018-08-14 14:15:58  WARNING OGG-00869  No unique key is defined for table 'TB_TEST'. All viable columns will be used to represent the key, but may not guarantee uniqueness.  KEYCOLS may be used to define the key.
Using following columns in default map by name:
  ID, NAME, CREATETIME, MODITYTIME
Using the following key columns for target table HXL.TB_TEST: ID, NAME, CREATETIME, MODITYTIME.

Processed extract process graceful restart record at seq 0, rba 1936.

2018-08-14 15:59:32  INFO    OGG-01020  Processed extract process RESTART_ABEND record at seq 0, rba 1997 (aborted 0 records).

2018-08-14 16:04:23  INFO    OGG-01020  Processed extract process RESTART_ABEND record at seq 0, rba 2058 (aborted 0 records).
Processed extract process graceful restart record at seq 0, rba 2119.

2018-08-14 16:43:28  WARNING OGG-00869  OCI Error ORA-01400: cannot insert NULL into ("HXL"."TB_TEST"."NAME") (status = 1400). INSERT INTO "HXL"."TB_TEST" ("ID","NAME","CREATETIME","MODITYTIME") VALUES (:a0,:a1,:a2,:a3).

2018-08-14 16:43:28  WARNING OGG-01004  Aborted grouped transaction on 'HXL.TB_TEST', Database error 1400 (OCI Error ORA-01400: cannot insert NULL into ("HXL"."TB_TEST"."NAME") (status = 1400). INSERT INTO "HXL"."TB_TEST" ("ID","NAME","
CREATETIME","MODITYTIME") VALUES (:a0,:a1,:a2,:a3)).

2018-08-14 16:43:28  WARNING OGG-01003  Repositioning to rba 2180 in seqno 0.

2.找到错误异常的位置的RBA

[oracle@localhost ogg]$ ./logdump

Oracle GoldenGate Log File Dump Utility for Oracle
Version 11.2.1.0.3 14400833 OGGCORE_11.2.1.0.3_PLATFORMS_120823.1258

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

Logdump 11 >open ./dirdat/pa000000
Current LogTrail is /u01/app/ogg/dirdat/pa000000 
Logdump 12 >pos 2180
Reading forward from RBA 2180 
Logdump 13 >n

2018/08/14 16:43:15.998.512 Insert               Len    67 RBA 2180 
Name: HXL.TB_TEST 
After  Image:                                             Partition 4   G  s   
 0000 0005 0000 0001 3700 0100 04ff ff00 0000 0200 | ........7...........  
 1500 0032 3031 382d 3038 2d31 343a 3136 3a34 333a | ...2018-08-14:16:43:  
 3133 0003 0015 0000 3230 3138 2d30 382d 3134 3a31 | 13......2018-08-14:1  
 363a 3433 3a31 33                                 | 6:43:13

Logdump 70 >n

2018/08/14 17:21:37.992.587 Insert               Len    72 RBA 2360 
Name: HXL.TB_TEST 
After  Image:                                             Partition 4   G  s   
 0000 0005 0000 0001 3800 0100 0900 0000 0574 6573 | ........8........tes  
 7438 0002 0015 0000 3230 3138 2d30 382d 3134 3a31 | t8......2018-08-14:1  
 373a 3231 3a33 3600 0300 1500 0032 3031 382d 3038 | 7:21:36......2018-08  
 2d31 343a 3137 3a32 313a 3336                     | -14:17:21:36

3.从发生错误的RBA下一个RBA启动

GGSCI (localhost.localdomain) 6> alter rep RORA_1, extseqno 000000, extrba 2360
REPLICAT altered.

GGSCI (localhost.localdomain) 25> start RORA_1

Sending START request to MANAGER ...
REPLICAT RORA_1 starting

这这里的对应文件pa000000,2360是发生错误RBA的下一个RBA

上一篇:android GestureDetector 手势的判断


下一篇:Iterator迭代器