OGG到kafka替换目标端OGG

Stella981
• 阅读 452

1.--源端 

--停源端所有进程

stop *

stop mgr

2.--目标端进程

info REP_K4 showch---看RBA是否变化,查询checkpoint 表

send REP_K4 status--查看 有没有大事物

--确认上述信息OK,则停目标端所有进程

stop *

stop mgr

3.----新目标端

备份之前安装的软件

cd /data/ogg

mkdir bak

ls 

bak  ggs12

cd ggs12

mv * ./../bak

cd /data/ogg

rm -rf ggs12

---目标库

[root@OGG-CLIENT ogg]# mkdir bak

[root@OGG-CLIENT ogg]# cd ggs12/

[root@OGG-CLIENT ggs12]# mv * ./../bak/

[root@OGG-CLIENT ggs12]# ls

4.---旧目标端,将全部信息传递到新的目标段

scp -r ggs12/ app@1.3.10.11:/data/ogg

5.启动所有进程

drwxr-x--- 2 app app  206 Jul  5 17:52 dirchk

drwxr-x--- 2 app app    6 Jul  2 20:23 dircrd--空

drwxr-x--- 2 app app 4096 Aug 20 22:15 dirdat

drwxr-x--- 2 app app 4096 Aug 20 20:52 dirdef

drwxr-x--- 2 app app  108 Jul 23 19:35 dirdmp

drwxr-x--- 4 app app   38 Aug 29  2017 diretc

drwxr-x--- 2 app app   24 Aug 29  2017 dirout

drwxr-x--- 2 app app  121 Aug 20 20:53 dirpcs

drwxr-x--- 2 app app  326 Jul 23 19:49 dirprm

drwxr-x--- 2 app app 8192 Aug 20 20:53 dirrpt

drwxr-x--- 2 app app    6 Jul  2 20:23 dirsql--空

drwxr-x--- 2 app app    6 Aug 20 20:53 dirtmp--空

drwxr-x--- 2 app app    6 Jul  2 20:23 dirwlt--空

drwxr-x--- 5 app app   46 Aug 29  2017 dirwww

---报错

2019-08-20 23:31:23  ERROR   OGG-01091  Unable to open file "/data/ggs12/dirdat/t1002322" (error 2, No such file or directory).

cd /data/ogg/ggs12/dirdat

[app@OGG-CLIENT dirdat]$ ll t1002322

cd /data/ogg/ggs12

./ggsci

stop mgr

[app@OGG-CLIENT data]$ ps -ef|grep mgr

app       96817      1  0 23:30 ?        00:00:00 ./mgr PARAMFILE /data/ogg/ggs12/dirprm/mgr.prm REPORTFILE /data/ogg/ggs12/dirrpt/MGR.rpt PROCESSID MGR

app       97030  96606  0 23:35 pts/0    00:00:00 grep --color=auto mgr

[app@OGG-CLIENT data]$ kill -9 96817

[app@OGG-CLIENT data]$ cd ggs12/

[app@OGG-CLIENT ggs12]$ ./ggsci 

[app@OGG-CLIENT ogg]$ mv ggs12/ ./..

---再次报错

[app@OGG-CLIENT ggs12]$ ./ggsci 

Oracle GoldenGate for Big Data

Version 12.3.1.1.1

Oracle GoldenGate Command Interpreter

Version 12.3.0.1.0 OGGCORE_OGGADP.12.3.0.1.0GA_PLATFORMS_170828.1608

Linux, x64, 64bit (optimized), Generic on Aug 28 2017 17:13:45

Operating system character set identified as UTF-8.

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

Source Context :

  SourceModule            : [ggparam.repo]

  SourceID                : [/scratch/aime/adestore/views/aime_adc4150324/oggcore/OpenSys/src/gglib/ggparam/paramrepo.cpp]

  SourceMethod            : [open_specfile]

  SourceLine              : [1221]

  ThreadBacktrace         : [15] elements

                          : [/data/ggs12/libgglog.so(CMessageContext::AddThreadContext()+0x1e) [0x7fc673a2e54e]]

                          : [/data/ggs12/libgglog.so(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...)+0x6ac) [0x7fc673a1ed4c]]

                          : [/data/ggs12/libgglog.so(_MSG_String_Int32_String(CSourceContext*, int, char const*, int, char const*, CMessageFactory::MessageDisposition)+0x4a) [0x7fc673a1226a]]

                          : [/data/ggs12/libggparam.so(ggs::ggparam::repo::open_specfile(char const*)+0x2f0) [0x7fc671b833b0]]

                          : [/data/ggs12/libggparam.so(ggs::ggparam::repo::open()+0x51) [0x7fc671b849e1]]

                          : [/data/ggs12/libggparam.so(ggs::ggparam::dict::dict()+0x104) [0x7fc671b8ccf4]]

                          : [/data/ggs12/libggparam.so(ggs::ggparam::dict::instance()+0x43) [0x7fc671b8cea3]]

                          : [./ggsci(readGlobalConfigFile()+0x59) [0x54b929]]

                          : [./ggsci() [0x62cecb]]

                          : [./ggsci(ggs::gglib::MultiThreading::MainThread::ExecMain()+0x5e) [0x5550de]]

                          : [./ggsci(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::ThreadArgs*)+0x173) [0x5594a3]]

                          : [./ggsci(ggs::gglib::MultiThreading::MainThread::Run(int, char**)+0x140) [0x559d10]]

                          : [./ggsci(main+0x3b) [0x64c1cb]]

                          : [/lib64/libc.so.6(__libc_start_main+0xf5) [0x7fc66d119445]]

                          : [./ggsci(__gxx_personality_v0+0x299) [0x4b6529]]

2019-08-20 23:38:14  ERROR   OGG-10111  Error opening parameter definition file: /data/ogg/ggs12/ggparam.dat.

errno: 2 - No such file or directory.

2019-08-20 23:38:14  WARNING OGG-01525  Failed to open trace output file, '/data/ogg/ggs12/dirdmp/gglog-ggsci.dmp', error 2 (No such file or directory).

2019-08-20 23:38:14  ERROR   OGG-01668  PROCESS ABENDING.

[app@OGG-CLIENT ggs12]$ cd 

[app@OGG-CLIENT ~]$ vi .bash_profile 

[app@OGG-CLIENT ~]$ export OGG_HOME=

[app@OGG-CLIENT ~]$ cd /data/ggs12/

[app@OGG-CLIENT ggs12]$ ./ggsci 

Oracle GoldenGate for Big Data

Version 12.3.1.1.1

Oracle GoldenGate Command Interpreter

Version 12.3.0.1.0 OGGCORE_OGGADP.12.3.0.1.0GA_PLATFORMS_170828.1608

Linux, x64, 64bit (optimized), Generic on Aug 28 2017 17:13:45

Operating system character set identified as UTF-8.

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

GGSCI (OGG-CLIENT) 1> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     STOPPED                                           

REPLICAT    ABENDED     REP_K1    00:00:00      01:07:47    

REPLICAT    ABENDED     REP_K2    00:00:00      01:07:47    

REPLICAT    ABENDED     REP_K3    00:00:00      01:07:46    

REPLICAT    ABENDED     REP_K4    00:00:00      01:07:45    

REPLICAT    ABENDED     REP_K5    00:00:00      01:07:45    

GGSCI (OGG-CLIENT) 2> start mgr

Manager started.

GGSCI (OGG-CLIENT) 3> info mgr

Manager is running (IP port OGG-CLIENT.8909, Process ID 97094).

GGSCI (OGG-CLIENT) 4> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           

REPLICAT    ABENDED     REP_K1    00:00:00      01:07:56    

REPLICAT    ABENDED     REP_K2    00:00:00      01:07:56    

REPLICAT    ABENDED     REP_K3    00:00:00      01:07:55    

REPLICAT    ABENDED     REP_K4    00:00:00      01:07:54    

REPLICAT    ABENDED     REP_K5    00:00:00      01:07:53    

GGSCI (OGG-CLIENT) 5> start REP_K1

Sending START request to MANAGER ...

REPLICAT REP_K1 starting

GGSCI (OGG-CLIENT) 6> info REP_K1

REPLICAT   REP_K1  Last Started 2019-08-20 23:41   Status RUNNING

Checkpoint Lag       00:00:00 (updated 01:08:03 ago)

Process ID           97103

Log Read Checkpoint  File /data/ggs12/dirdat/t1002322

                     First Record  RBA 49652169

GGSCI (OGG-CLIENT) 7> !

info REP_K1

REPLICAT   REP_K1  Last Started 2019-08-20 23:41   Status RUNNING

Checkpoint Lag       01:11:06 (updated 00:00:00 ago)

Process ID           97103

Log Read Checkpoint  File /data/ggs12/dirdat/t1002324

                     2019-08-20 22:30:41.200193  RBA 8347811

[app@OGG-CLIENT ~]$ vi .bash_profile 

[app@OGG-CLIENT ~]$ cat .bash_profile 

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

. ~/.bashrc

fi

# User specific environment and startup programs

#export OGG_HOME=/data/ogg/ggs12

export OGG_HOME=/data/ggs12

JAVA_HOME="/home/app/jdk1.8.0_101"

CLASSPATH="$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib"

NODE_HOME="/home/app/node-v8.11.2-linux-x64"

PATH=$PATH:$HOME/.local/bin:$HOME/bin:$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$NODE_HOME/bin

export LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/amd64:$JAVA_HOME/jre/lib/amd64/libjsig.so:$JAVA_HOME/jre/lib/amd64/server:$JAVA_HOME/jre/lib/amd64/server/libjvm.so:$LD_LIBRARY_PATH

stty erase ^h

export PATH

[app@OGG-CLIENT ~]$ source .bash_profile

[app@OGG-CLIENT ~]$ cd /data/ggs12/

ogg for kafka 平滑过渡方案落地   注意:原目标端ogg目录是啥,到目标端 ogg目录还得一致。

1.--源端 
--停源端所有进程stop *stop mgr
2.--目标端进程info REP_K4 showch---看RBA是否变化,查询checkpoint 表send REP_K4 status--查看 有没有大事物
--确认上述信息OK,则停目标端所有进程stop *stop mgr

3.----新目标端备份之前安装的软件cd /data/oggmkdir bak
ls bak  ggs12
cd ggs12mv * ./../bak
cd /data/oggrm -rf ggs12

---目标库[root@OGG-CLIENT ogg]# mkdir bak[root@OGG-CLIENT ogg]# cd ggs12/[root@OGG-CLIENT ggs12]# mv * ./../bak/[root@OGG-CLIENT ggs12]# ls

4.---旧目标端,将全部信息传递到新的目标段scp -r ggs12/ app@10.3.120.151:/data/ogg

5.启动所有进程

drwxr-x--- 2 app app  206 Jul  5 17:52 dirchkdrwxr-x--- 2 app app    6 Jul  2 20:23 dircrd--空drwxr-x--- 2 app app 4096 Aug 20 22:15 dirdatdrwxr-x--- 2 app app 4096 Aug 20 20:52 dirdefdrwxr-x--- 2 app app  108 Jul 23 19:35 dirdmpdrwxr-x--- 4 app app   38 Aug 29  2017 diretcdrwxr-x--- 2 app app   24 Aug 29  2017 diroutdrwxr-x--- 2 app app  121 Aug 20 20:53 dirpcsdrwxr-x--- 2 app app  326 Jul 23 19:49 dirprmdrwxr-x--- 2 app app 8192 Aug 20 20:53 dirrptdrwxr-x--- 2 app app    6 Jul  2 20:23 dirsql--空drwxr-x--- 2 app app    6 Aug 20 20:53 dirtmp--空drwxr-x--- 2 app app    6 Jul  2 20:23 dirwlt--空drwxr-x--- 5 app app   46 Aug 29  2017 dirwww

---报错2019-08-20 23:31:23  ERROR   OGG-01091  Unable to open file "/data/ggs12/dirdat/t1002322" (error 2, No such file or directory).
cd /data/ogg/ggs12/dirdat[app@OGG-CLIENT dirdat]$ ll t1002322
cd /data/ogg/ggs12./ggscistop mgr
[app@OGG-CLIENT data]$ ps -ef|grep mgrapp       96817      1  0 23:30 ?        00:00:00 ./mgr PARAMFILE /data/ogg/ggs12/dirprm/mgr.prm REPORTFILE /data/ogg/ggs12/dirrpt/MGR.rpt PROCESSID MGRapp       97030  96606  0 23:35 pts/0    00:00:00 grep --color=auto mgr[app@OGG-CLIENT data]$ kill -9 96817[app@OGG-CLIENT data]$ cd ggs12/[app@OGG-CLIENT ggs12]$ ./ggsci 
[app@OGG-CLIENT ogg]$ mv ggs12/ ./..
---再次报错

[app@OGG-CLIENT ggs12]$ ./ggsci Oracle GoldenGate for Big DataVersion 12.3.1.1.1
Oracle GoldenGate Command InterpreterVersion 12.3.0.1.0 OGGCORE_OGGADP.12.3.0.1.0GA_PLATFORMS_170828.1608Linux, x64, 64bit (optimized), Generic on Aug 28 2017 17:13:45Operating system character set identified as UTF-8.
Copyright (C) 1995, 2017, Oracle and/or its affiliates. All rights reserved.

Source Context :  SourceModule            : [ggparam.repo]  SourceID                : [/scratch/aime/adestore/views/aime_adc4150324/oggcore/OpenSys/src/gglib/ggparam/paramrepo.cpp]  SourceMethod            : [open_specfile]  SourceLine              : [1221]  ThreadBacktrace         : [15] elements                          : [/data/ggs12/libgglog.so(CMessageContext::AddThreadContext()+0x1e) [0x7fc673a2e54e]]                          : [/data/ggs12/libgglog.so(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...)+0x6ac) [0x7fc673a1ed4c]]                          : [/data/ggs12/libgglog.so(_MSG_String_Int32_String(CSourceContext*, int, char const*, int, char const*, CMessageFactory::MessageDisposition)+0x4a) [0x7fc673a1226a]]                          : [/data/ggs12/libggparam.so(ggs::ggparam::repo::open_specfile(char const*)+0x2f0) [0x7fc671b833b0]]                          : [/data/ggs12/libggparam.so(ggs::ggparam::repo::open()+0x51) [0x7fc671b849e1]]                          : [/data/ggs12/libggparam.so(ggs::ggparam::dict::dict()+0x104) [0x7fc671b8ccf4]]                          : [/data/ggs12/libggparam.so(ggs::ggparam::dict::instance()+0x43) [0x7fc671b8cea3]]                          : [./ggsci(readGlobalConfigFile()+0x59) [0x54b929]]                          : [./ggsci() [0x62cecb]]                          : [./ggsci(ggs::gglib::MultiThreading::MainThread::ExecMain()+0x5e) [0x5550de]]                          : [./ggsci(ggs::gglib::MultiThreading::Thread::RunThread(ggs::gglib::MultiThreading::Thread::ThreadArgs*)+0x173) [0x5594a3]]                          : [./ggsci(ggs::gglib::MultiThreading::MainThread::Run(int, char**)+0x140) [0x559d10]]                          : [./ggsci(main+0x3b) [0x64c1cb]]                          : [/lib64/libc.so.6(__libc_start_main+0xf5) [0x7fc66d119445]]                          : [./ggsci(__gxx_personality_v0+0x299) [0x4b6529]]
2019-08-20 23:38:14  ERROR   OGG-10111  Error opening parameter definition file: /data/ogg/ggs12/ggparam.dat.errno: 2 - No such file or directory.
2019-08-20 23:38:14  WARNING OGG-01525  Failed to open trace output file, '/data/ogg/ggs12/dirdmp/gglog-ggsci.dmp', error 2 (No such file or directory).
2019-08-20 23:38:14  ERROR   OGG-01668  PROCESS ABENDING.[app@OGG-CLIENT ggs12]$ cd [app@OGG-CLIENT ~]$ vi .bash_profile [app@OGG-CLIENT ~]$ export OGG_HOME=[app@OGG-CLIENT ~]$ cd /data/ggs12/[app@OGG-CLIENT ggs12]$ ./ggsci Oracle GoldenGate for Big DataVersion 12.3.1.1.1
Oracle GoldenGate Command InterpreterVersion 12.3.0.1.0 OGGCORE_OGGADP.12.3.0.1.0GA_PLATFORMS_170828.1608Linux, x64, 64bit (optimized), Generic on Aug 28 2017 17:13:45Operating system character set identified as UTF-8.
Copyright (C) 1995, 2017, Oracle and/or its affiliates. All rights reserved.

GGSCI (OGG-CLIENT) 1> info all
Program     Status      Group       Lag at Chkpt  Time Since Chkpt
MANAGER     STOPPED                                           REPLICAT    ABENDED     REP_K1    00:00:00      01:07:47    REPLICAT    ABENDED     REP_K2    00:00:00      01:07:47    REPLICAT    ABENDED     REP_K3    00:00:00      01:07:46    REPLICAT    ABENDED     REP_K4    00:00:00      01:07:45    REPLICAT    ABENDED     REP_K5    00:00:00      01:07:45    

GGSCI (OGG-CLIENT) 2> start mgrManager started.

GGSCI (OGG-CLIENT) 3> info mgr
Manager is running (IP port OGG-CLIENT.8909, Process ID 97094).

GGSCI (OGG-CLIENT) 4> info all
Program     Status      Group       Lag at Chkpt  Time Since Chkpt
MANAGER     RUNNING                                           REPLICAT    ABENDED     REP_K1    00:00:00      01:07:56    REPLICAT    ABENDED     REP_K2    00:00:00      01:07:56    REPLICAT    ABENDED     REP_K3    00:00:00      01:07:55    REPLICAT    ABENDED     REP_K4    00:00:00      01:07:54    REPLICAT    ABENDED     REP_K5    00:00:00      01:07:53    

GGSCI (OGG-CLIENT) 5> start REP_K1
Sending START request to MANAGER ...REPLICAT REP_K1 starting

GGSCI (OGG-CLIENT) 6> info REP_K1
REPLICAT   REP_K1  Last Started 2019-08-20 23:41   Status RUNNINGCheckpoint Lag       00:00:00 (updated 01:08:03 ago)Process ID           97103Log Read Checkpoint  File /data/ggs12/dirdat/t1002322                     First Record  RBA 49652169

GGSCI (OGG-CLIENT) 7> !info REP_K1
REPLICAT   REP_K1  Last Started 2019-08-20 23:41   Status RUNNINGCheckpoint Lag       01:11:06 (updated 00:00:00 ago)Process ID           97103Log Read Checkpoint  File /data/ggs12/dirdat/t1002324                     2019-08-20 22:30:41.200193  RBA 8347811
[app@OGG-CLIENT ~]$ vi .bash_profile [app@OGG-CLIENT ~]$ cat .bash_profile # .bash_profile
# Get the aliases and functionsif [ -f ~/.bashrc ]; then. ~/.bashrcfi
# User specific environment and startup programs
#export OGG_HOME=/data/ogg/ggs12export OGG_HOME=/data/ggs12JAVA_HOME="/home/app/jdk1.8.0_101"CLASSPATH="$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib"NODE_HOME="/home/app/node-v8.11.2-linux-x64"PATH=$PATH:$HOME/.local/bin:$HOME/bin:$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$NODE_HOME/binexport LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/amd64:$JAVA_HOME/jre/lib/amd64/libjsig.so:$JAVA_HOME/jre/lib/amd64/server:$JAVA_HOME/jre/lib/amd64/server/libjvm.so:$LD_LIBRARY_PATHstty erase ^h
export PATH
[app@OGG-CLIENT ~]$ source .bash_profile[app@OGG-CLIENT ~]$ cd /data/ggs12/

ogg for kafka 平滑过渡方案落地   注意:原目标端ogg目录是啥,到目标端 ogg目录还得一致。

点赞
收藏
评论区
推荐文章
blmius blmius
2年前
MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1
文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s
Jacquelyn38 Jacquelyn38
3年前
2020年前端实用代码段,为你的工作保驾护航
有空的时候,自己总结了几个代码段,在开发中也经常使用,谢谢。1、使用解构获取json数据let jsonData  id: 1,status: "OK",data: 'a', 'b';let  id, status, data: number   jsonData;console.log(id, status, number )
皕杰报表之UUID
​在我们用皕杰报表工具设计填报报表时,如何在新增行里自动增加id呢?能新增整数排序id吗?目前可以在新增行里自动增加id,但只能用uuid函数增加UUID编码,不能新增整数排序id。uuid函数说明:获取一个UUID,可以在填报表中用来创建数据ID语法:uuid()或uuid(sep)参数说明:sep布尔值,生成的uuid中是否包含分隔符'',缺省为
待兔 待兔
4天前
手写Java HashMap源码
HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程22
Stella981 Stella981
2年前
Android So动态加载 优雅实现与原理分析
背景:漫品Android客户端集成适配转换功能(基于目标识别(So库35M)和人脸识别库(5M)),导致apk体积50M左右,为优化客户端体验,决定实现So文件动态加载.!(https://oscimg.oschina.net/oscnet/00d1ff90e4b34869664fef59e3ec3fdd20b.png)点击上方“蓝字”关注我
Wesley13 Wesley13
2年前
mysql设置时区
mysql设置时区mysql\_query("SETtime\_zone'8:00'")ordie('时区设置失败,请联系管理员!');中国在东8区所以加8方法二:selectcount(user\_id)asdevice,CONVERT\_TZ(FROM\_UNIXTIME(reg\_time),'08:00','0
Wesley13 Wesley13
2年前
00:Java简单了解
浅谈Java之概述Java是SUN(StanfordUniversityNetwork),斯坦福大学网络公司)1995年推出的一门高级编程语言。Java是一种面向Internet的编程语言。随着Java技术在web方面的不断成熟,已经成为Web应用程序的首选开发语言。Java是简单易学,完全面向对象,安全可靠,与平台无关的编程语言。
Stella981 Stella981
2年前
Django中Admin中的一些参数配置
设置在列表中显示的字段,id为django模型默认的主键list_display('id','name','sex','profession','email','qq','phone','status','create_time')设置在列表可编辑字段list_editable
Wesley13 Wesley13
2年前
MySQL部分从库上面因为大量的临时表tmp_table造成慢查询
背景描述Time:20190124T00:08:14.70572408:00User@Host:@Id:Schema:sentrymetaLast_errno:0Killed:0Query_time:0.315758Lock_
Python进阶者 Python进阶者
5个月前
Excel中这日期老是出来00:00:00,怎么用Pandas把这个去除
大家好,我是皮皮。一、前言前几天在Python白银交流群【上海新年人】问了一个Pandas数据筛选的问题。问题如下:这日期老是出来00:00:00,怎么把这个去除。二、实现过程后来【论草莓如何成为冻干莓】给了一个思路和代码如下:pd.toexcel之前把这