ogg怎样跳过一个事务继续往下同步

示例:

复制进程停止,view report进程名报错提示:

2023-06-13 11:20:22  WARNING OGG-01003  Repositioning to rba 385212904 in seqno 1. 

SQL error 2291 mapping EOM.F_UPLOAD_DETAIL to EOM.F_UPLOAD_DETAIL OCI Error ORA-02291: integrity constraint (EOM.FK_F_UPLOAD_REFERENCE_F_UPLOAD) violated - parent key not found (status = 2291). INSERT INTO "EOM"."F_UPLOAD_DETAIL" (

"FID_NO","FILE_NAME","FILE_TYPE","FILE_PATH","UPLOAD_DATE","UPLOAD_USER","FILE_INNAME","STEP_NO","FILE_TYPE_SORT","TYPE_NO","RECT_TYPE","ASSET_NO") VALUES (:a0,:a1,:a2,:a3,:a4,:a5,:a6,:a7,:a8,:a9,:a10,:a11).

这里想通过跳过这个事务,紧急恢复业务。

1.确定seqno和rba

view report里报错说的位置是不准确的,具体需要看discard file里指定的rpt文件里的号。

先通过view param 进程名查看discard file路径,这里是/dirrpt/rep_MI.dsc

然后查看下这个文件:

cat ./dirrpt/rep_MI.dsc

记录seqno和rba号:

Aborting transaction on ./dirdat/database/mi beginning at seqno 1 rba 385273105

                         error at seqno 1 rba 385273105

2.使用logdump查看下个位置对应的rba

2.1 使用info all确定要打开的文件名

ogg怎样跳过一个事务继续往下同步_第1张图片

2.2 使用logdump查看下个位置对应的rba

ogg怎样跳过一个事务继续往下同步_第2张图片

2.3 跳过该事务

alter  replicat 进程名 extseqno seqno extrba 要跳过的RBA位置(执行第2n获得的rba值)

示例:

alter replicat rep_mi extseqno 1 extrba 385273433

2.4 启动进程

start rep_mi

你可能感兴趣的:(GoldenGate,ogg)