1.1现象

之前有个客户遇到一个问题,OGG同步数据链路,突然有一天网络出现问题,导致OGG投递进程无法正常投递,无法写入目标端的该文件。

猜测是由于网络丢包等原因导致文件损坏,无法正常open,read,write. 解决方法,投递进程etrollover。

本篇文档是基于这种方式测试下etrollover 【测试没有完美还原网络的问题,只是对其进行了测试】

1.2测试OGG进程restart与seqno有什么关系?

1)OGG 同步表及进程参数查看
SQL> select * from dd;
ID CC_NAME WITTIME
---------- ------------------------------ ------------------------------
2 2 03-JUN-20 02.34.37.000000 PM GGSCI (t1) 4> view param exta
extract exta
USERID ogg,PASSWORD ogg
EXTTRAIL /u01/ogg/base/dirdat/ea
table YZ.DD; GGSCI (t1) 5> view param dpea
extract dpea
rmthost 10.0.0.32,mgrport 7809, compress
rmttrail /u01/ogg/base/dirdat/t1
table YZ.B;
table YZ.DD; GGSCI (t1) 7> info exta
EXTRACT EXTA Last Started 2020-11-10 11:05 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:08 ago)
Process ID 10744
Log Read Checkpoint Oracle Redo Logs
2020-11-10 11:25:54 Seqno 353, RBA 3917824
SCN 0.3276594 (3276594)
GGSCI (t1) 8> info dpea
EXTRACT DPEA Last Started 2020-11-10 11:05 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:09 ago)
Process ID 10776
Log Read Checkpoint File /u01/ogg/base/dirdat/ea000000067
2020-11-10 11:05:01.669087 RBA 1469 SQL> select * from dd;
ID CC_NAME WITTIME
---------- ------------------------------ ------------------------------
2 2 03-JUN-20 02.34.37.000000 PM
GGSCI (t2) 26> view param repa
replicat repa
userid ogg,password ogg
assumetargetdefs
HANDLECOLLISIONS
discardfile /u01/ogg/base/dirrpt/repa.dsc
MAP YZ.DD ,TARGET BAK_YZ.DD; GGSCI (t2) 27> info repa
REPLICAT REPA Last Started 2020-11-10 11:20 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:09 ago)
Process ID 11023
Log Read Checkpoint File /u01/ogg/base/dirdat/t1000000051
2020-11-10 11:05:01.313791 RBA 1563 2)目标端OGG复制进程重启, 复制进程对应的trail 文件seq不变
GGSCI (t2) 28> stop repa
GGSCI (t2) 29> start repa 3)源端OGG投递进程重启,投递进程对应的trail 文件seq不变
GGSCI (t1) 9> stop dpea
GGSCI (t1) 10> start dpea
GGSCI (t1) 13> info dpea
EXTRACT DPEA Last Started 2020-11-10 11:30 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:04 ago)
Process ID 11117
Log Read Checkpoint File /u01/ogg/base/dirdat/ea000000067
First Record RBA 1469 4)源端OGG抽取进程重启,抽取进程对应的trail 文件seq +1
GGSCI (t1) 15> info exta,detail
EXTRACT EXTA Last Started 2020-11-10 11:05 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:09 ago)
Process ID 10744
Log Read Checkpoint Oracle Redo Logs
2020-11-10 11:30:15 Seqno 353, RBA 3919360
SCN 0.3276690 (3276690)
Target Extract Trails:
Trail Name Seqno RBA Max MB Trail Type
/u01/ogg/base/dirdat/ea 67 1469 20 EXTTRAIL
GGSCI (t1) 16> stop exta
GGSCI (t1) 17> start exta
Target Extract Trails:
Trail Name Seqno RBA Max MB Trail Type
/u01/ogg/base/dirdat/ea 68 1469 20 EXTTRAIL
5)源端抽取进程seq +1之后,源端投递进程读取的文件 seq +1, 投递进程写入目标端seq 文件+1 ,目标端复制进程读取的seq 文件+1
GGSCI (t1) 19> info dpea
EXTRACT DPEA Last Started 2020-11-10 11:30 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:08 ago)
Process ID 11117
Log Read Checkpoint File /u01/ogg/base/dirdat/ea000000068
2020-11-10 11:31:58.380185 RBA 1469 GGSCI (t2) 45> info repa
REPLICAT REPA Last Started 2020-11-10 11:28 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:02 ago)
Process ID 11132
Log Read Checkpoint File /u01/ogg/base/dirdat/t1000000052
2020-11-10 11:31:58.035041 RBA 1563 6)源端{确认OGG链路处于同步状态}
SQL> insert into dd values(3,'cc',sysdate);
SQL> commit;
GGSCI (t1) 22> info dpea
EXTRACT DPEA Last Started 2020-11-10 11:30 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:00 ago)
Process ID 11117
Log Read Checkpoint File /u01/ogg/base/dirdat/ea000000068
2020-11-10 11:34:52.000000 RBA 2284 目标端
SQL> select * from dd;
ID CC_NAME WITTIME
---------- ------------------------------ ------------------------------
3 cc 10-NOV-20 11.34.50.000000 AM
2 2 03-JUN-20 02.34.37.000000 PM REPLICAT REPA Last Started 2020-11-10 11:28 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:04 ago)
Process ID 11132
Log Read Checkpoint File /u01/ogg/base/dirdat/t1000000052
2020-11-10 11:34:51.656002 RBA 2378

1.3模拟破坏目标端OGG应用Dump文件,如何处理

1)手工修改dump文件
[ogg@t2 ~]$ vi /u01/ogg/base/dirdat/t1000000052
破坏文件 2)源端插入1条测试数据
SQL> insert into dd values(4,'cc',sysdate);
SQL> commit; 3)OGG 复制进程Abend
2020-11-10 11:36:59 ERROR OGG-02171 Error reading LCR from data source. Status 509, data source type TrailDataSource.
2020-11-10 11:36:59 ERROR OGG-02191 Incompatible record 101 in /u01/ogg/base/dirdat/t1000000052, rba 2,378 when getting trail header.
2020-11-10 11:36:59 ERROR OGG-01668 PROCESS ABENDING. 4)源端再次插入1条测试数据
SQL> insert into dd values(5,'cc',sysdate);
1 row created.
SQL> commit;
GGSCI (t1) 38> info dpea
EXTRACT DPEA Last Started 2020-11-10 11:30 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:03 ago)
Process ID 11117
Log Read Checkpoint File /u01/ogg/base/dirdat/ea000000068
2020-11-10 13:25:29.000000 RBA 2604
此时,对于源端投递进程来说,eaxxx68 这个队列文件中,存在两条Insert记录;
对于目标端应用进程来说,repa t1xxx52队列文件中,应用第一条记录就报错了!


投递进程重新投递eaxxx68队列文件,这个文件被我们手工人为破坏了,【实际生产运维过程中,存在网络波动包损坏等,导致源端投递进程无法写入文件,导致OGG同步链路中断】,
原本是想模拟这个场景,但是本次模拟投递正常,应用失败。
GGSCI (t1) 40> info dpea
EXTRACT DPEA Last Started 2020-11-10 11:30 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:03 ago)
Process ID 11117
Log Read Checkpoint File /u01/ogg/base/dirdat/ea000000068
2020-11-10 13:25:29.000000 RBA 2604 GGSCI (t1) 47> view param dpea
extract dpea
rmthost 10.0.0.32,mgrport 7809, compress
rmttrail /u01/ogg/base/dirdat/t1
table YZ.DD;

5) 如何处理??? 既然是dump文件损坏,源端投递进程重新再次投递一个这个seqno文件不就可行? 使用etrollover前滚投递进程!
GGSCI (t1) 55> alter EXTRACT dpea etrollover
2020-11-10 13:39:25 INFO OGG-01520 Rollover performed. For each affected output trail of Version 10 or higher format,
after starting the source extract, issue ALTER EXTSEQNO for that trail's reader (either pump EXTRACT or REPLICAT) to move the reader's
scan to the new trail file; it will not happen automatically.
EXTRACT altered. GGSCI (t1) 48> info dpea,detail
EXTRACT DPEA Initialized 2020-11-10 11:30 Status STOPPED
Checkpoint Lag 00:00:00 (updated 00:01:07 ago)
Log Read Checkpoint File /u01/ogg/base/dirdat/ea000000068
2020-11-10 13:25:29.000000 RBA 2604
Target Extract Trails:
Trail Name Seqno RBA Max MB Trail Type
/u01/ogg/base/dirdat/t1 53 0 20 RMTTRAIL
Extract Source Begin End
/u01/ogg/base/dirdat/ea000000068 * Initialized * 2020-11-10 13:25
/u01/ogg/base/dirdat/ea000000068 2020-11-10 11:05 2020-11-10 13:25
/u01/ogg/base/dirdat/ea000000067 2020-10-13 13:24 2020-11-10 11:05
/u01/ogg/base/dirdat/ea000000066 2020-10-13 13:24 2020-10-13 13:24
[ogg@t2 ~]$ ls -lrt /u01/ogg/base/dirdat/t1*
GGSCI (t1) 49> start dpea
可以发现什么问题? OGG extract source 里面存着2个eaxxx68 seqno文件,正常情况下只会出现1条,并且 end time一致,因此相当于这个seq文件重新投递。

6)目标端再次启动复制进程
GGSCI (t2) 52> info repa REPLICAT REPA Last Started 2020-11-10 11:28 Status ABENDED
Checkpoint Lag 00:00:00 (updated 01:58:17 ago)
Log Read Checkpoint File /u01/ogg/base/dirdat/t1000000052
2020-11-10 11:34:51.656002 RBA 2378

GGSCI (t2) 58> start repa
GGSCI (t2) 59> info repa
REPLICAT REPA Last Started 2020-11-10 13:35 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:10 ago)
Process ID 12727
Log Read Checkpoint File /u01/ogg/base/dirdat/t1000000052
2020-11-10 13:25:28.699520 RBA 2698
SQL> select * from dd;
ID CC_NAME WITTIME
---------- ------------------------------ ------------------------------
3 cc 10-NOV-20 11.34.50.000000 AM
2 2 03-JUN-20 02.34.37.000000 PM
4 cc 10-NOV-20 11.37.19.000000 AM
5 cc 10-NOV-20 01.25.27.000000 PM

 

OGG投递进程报错无法open文件,无法正常投递的更多相关文章

  1. GoldenGate 复制进程报错"OGG-01296 Error mapping",丢弃文件报错“Mapping problem with delete record (target format)”,且实际条目存在

    故障描述: (1).复制进程 Abended,通过view report语句查看可发现类似如下的报错: 2017-10-23 15:01:43 ERROR OGG-01296 Error mappin ...

  2. linux 报错Mysql.pid 文件不存在导致service Mysqld start 失败

    Mysql.pid 文件不存在导致service Mysqld start 失败 1.  到提示报错的mysql.pid 不存在的目录下  使用 touch 命令创建mysql.pid文件.    t ...

  3. OGG应用进程abend报错无法insert虚拟列

    环境11.2.0.4 linux6.9 RAC2节点,ogg版本Version 12.2.0.1.160823 OGGCORE_OGGADP.12.2.0.1.0_PLATFORMS_161019.1 ...

  4. Eclipse怎么忽略掉报错的js文件

    第一步,我们要先定位错误在哪里,选择菜单里window——show view——other,选择Problems. 第二步,点击有红叉的项目,在Problems视图中,可以看到是什么错,哪个文件夹中的 ...

  5. Excel 2010/2013/2016在鼠标右键新建xls或xlsx文件后,打开报错“无法打开文件”“文件格式或文件扩展名无效”

    近段时间,陆续有两个同事先后出现同样的问题(在Excel多个版本都可能出现),问题描述: 当用鼠标右键在任意文件夹或电脑桌面“新建”→“ Microsoft Excel 工作表”,再用鼠标双击打开这个 ...

  6. DML语句报错是因为控制文件无法扩大还是另有原因?

    今天处理了一个很有意思的故障问题,来龙去脉是这种: 客户来电咨询控制文件无法扩展,数据库仅仅能查询但不支持DML,须要远程支持.接到电话的第一反应就是CONTROL_FILE_RECORD_KEEP_ ...

  7. git push提交报错,提示文件过大,且去掉大文件也报同样的错误

    错误原因: 大文件存在没有被提交的commit记录里面: 解决方案: 删除有大文件的commit记录即可 移除大文件的正确姿势 $ git rm --cached giant_file(文件名) # ...

  8. 非root用户执行java进程报错:fork: retry:资源暂时不可用

    vim /etc/security/limits.conf # End of file *           soft   nproc        65535 *           hard   ...

  9. delphi开第二个进程报错cannot create file editorlineends.ttr

    网上说问题是windows系统补丁造成的,解决办法有卸补丁.装插件,还有自己搞个bat启动. 在网上看到最好的一个办法是: 把这个文件EditorLineEnds.ttr的后缀改为ttf,然后安装这个 ...

随机推荐

  1. 【题解】[USACO07OPEN]Dining G

    \(Link\) \(\text{Solution:}\) 这一题,我们要做到,食物和牛.牛和饮料均为一对一的关系.我们发现这个图不好建立. 经典技巧:将牛拆边,拆成入点和出点,并连容量为\(1\)的 ...

  2. CSS中居中的完全指南(中英对照翻译)

    翻译自:https://css-tricks.com/centering-css-complete-guide/ Centering things in CSS is the poster child ...

  3. hasura的golang反向代理

    概述 反向代理代码 对请求的处理 对返回值的处理 遇到的问题 概述 一直在寻找一个好用的 graphql 服务, 之前使用比较多的是 prisma, 但是 prisma1 很久不再维护了, 而 pri ...

  4. 多测师讲解python _re模块_高级讲师肖sir

    import re# 一.常用方法:# match():从头匹配# search():从整个文本搜索# findall():找到所有符合的# split():分割# sub():替换# group() ...

  5. pytest文档58-随机执行测试用例(pytest-random-order)

    前言 通常我们认为每个测试用例都是相互独立的,因此需要保证测试结果不依赖于测试顺序,以不同的顺序运行测试用例,可以得到相同的结果. pytest默认运行用例的顺序是按模块和用例命名的 ASCII 编码 ...

  6. 【博弈论】CF 1215D Ticket Game

    题目大意 洛谷链接 给出一个长度为\(n\)的由数字组成的字符串(\(n\)是偶数).但可能有偶数个位上的数字为?. 现在有两个人\(A\)和\(B\),在?的位置上填\(0\)~\(9\)的数,一直 ...

  7. spring boot:spring security用mysql实现动态权限管理(spring boot 2.3.3)

    一,动态权限管理的优点和缺点 1,优点: 因为控制权限的数据保存在了mysql或其他存储系统中, 可以动态修改权限控制,无需改动代码和重启应用,  权限变更时灵活方便 2,缺点: 权限的设置需要保存在 ...

  8. ImageMagick实现图片的旋转/翻转/裁剪(ImageMagick6.9.10)

    一,imagemagick的安装 请参见: https://www.cnblogs.com/architectforest/p/12807514.html 说明:刘宏缔的架构森林是一个专注架构的博客, ...

  9. selenium-滚动

    移动到指定的坐标(相对当前的坐标移动) driver.execute_script("window.scrollBy(0, 700)"); 移动到窗口绝对位置坐标,如下移动到纵坐标 ...

  10. Cypress系列(67)- 环境变量设置指南

    如果想从头学起Cypress,可以看下面的系列文章哦 https://www.cnblogs.com/poloyy/category/1768839.html 常见的环境变量设置方式 可参考这篇文章: ...