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目录还得一致。