- 最后登录
- 2017-5-16
- 在线时间
- 46 小时
- 威望
- 0
- 金钱
- 345
- 注册时间
- 2012-12-3
- 阅读权限
- 10
- 帖子
- 24
- 精华
- 0
- 积分
- 0
- UID
- 751
|
1#
发表于 2014-4-2 20:13:44
|
查看: 4287 |
回复: 1
本帖最后由 suredandan 于 2014-4-3 10:25 编辑
环境是:
192.168.0.165 (Mysql ) —> 192.168.0.164 ( Oracle )
想将mysql的sure库下的ah6 同步到 oracle的 hr.ah6下
版本:
操作系统:redhat5.8 64位
Oracle: 11.2.0.3
Mysql: 5.5.37
goldgate:
11.2.0.1.3 for oracle
11.2.0.1.1 for mysql
之前的初始化都没有啥问题,配置oracle到mysql的同步是成功了的。现在遇到的问题是mysql到oracle不通。
mysql到oracle大致的配置过程如下:
----------------------------
源端(mysql,以log-bin方式启动的,format为row,我换成statement也试过)
1.配置抽取进程
edit params ext5
extract ext5
setenv (MYSQL_HOME="/u01/mysql")
sourcedb sure@localhost:3306,userid root,password 123456
tranlogoptions altlogdest /tmp/binlog.index
exttrail /u01/ogg/11.2/dirdat/mb
--dynamicresolution
--gettruncates
table sure.ah6;
2.给ext5添加本地trail
add extract ext5,tranlog,begin now
add exttrail /u01/ogg/11.2/dirdat/mb,extract ext5
3.配置pump进程
edit params pump5
extract pump5
rmthost 192.168.0.164,mgrport 7809
rmttrail /u01/ogg/11.2/dirdat/mb
passthru
table sure.ah6;
4.给pump5添加本地和远程的trail
add extract pump5,exttrailsource /u01/ogg/11.2/dirdat/mb
add rmttrail /u01/ogg/11.2/dirdat/mb,extract pump5
5.配置define文件
edit params ah6
defsfile /u01/ogg/11.2/dirdef/ah6.prm
sourcedb sure@localhost:3306,userid root,password 123456
table sure.ah6;
生成define,并将define传到oracle服务器上
./defgen paramfile dirprm/ah6.prm
scp ...
------------------------
以下是配置目的端(oracle)
1.配置接收进程
edit params rep2
replicat rep2
sourcedefs /u01/ogg/11.2/dirdef/ah6.prm
userid ggs,password ggs
reperror default,discard
discardfile /u01/ogg/11.2/dirrpt/rep2.dsc,append,megabytes 50
dynamicresolution
map sure.ah6, target hr.ah6;
2.添加checkpoint表
add checkpointtable ggs.checkpointtab
3.给接收进行添加trail和checkpoint table
add replicat rep2,exttrail /u01/ogg/11.2/dirdat/mb,checkpointtable ggs.checkpointtab
---------------------------
配置完成之后在2边都把进程启动起来,也没有报错,但是就是在mysql端插入数据的时候,oracle端不同步。
我在7点40做的操作,然后看了一下ext5的日志,发现没有动,还是7:30的信息,我感觉是extrace进程没有起作用(在mysql端flush logs也试过,不行),不知道该怎么去诊断了。。。请帮忙提示一下。。万分谢谢
日志如下:
GGSCI (nosql2) 156> view report ext5
***********************************************************************
Oracle GoldenGate Capture for MySQL
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230
Linux, x64, 64bit (optimized), MySQL Enterprise on Apr 23 2012 05:23:34
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
Starting at 2014-04-02 19:31:30
***********************************************************************
Operating System Version:
Linux
Version #1 SMP Fri Jan 27 17:17:51 EST 2012, Release 2.6.18-308.el5
Node: nosql2
Machine: x86_64
soft limit hard limit
Address Space Size : unlimited unlimited
Heap Size : unlimited unlimited
File Size : unlimited unlimited
CPU Time : unlimited unlimited
Process id: 31456
Description:
***********************************************************************
** Running with the following parameters **
***********************************************************************
2014-04-02 19:31:30 INFO OGG-03035 Operating system character set identified as UTF-8. Locale: en_US, LC_ALL:.
extract ext5
setenv (MYSQL_HOME="/u01/mysql")
Set environment variable (MYSQL_HOME=/u01/mysql)
sourcedb sure@localhost:3306,userid root,password ******
tranlogoptions altlogdest /tmp/binlog.index
exttrail /u01/ogg/11.2/dirdat/mb
--dynamicresolution
--gettruncates
table sure.ah6;
2014-04-02 19:31:30 INFO OGG-01815 Virtual Memory Facilities for: COM
anon alloc: mmap(MAP_ANON) anon free: munmap
file alloc: mmap(MAP_SHARED) file free: munmap
target directories:
/u01/ogg/11.2/dirtmp.
CACHEMGR virtual memory values (may have been adjusted)
CACHESIZE: 64G
CACHEPAGEOUTSIZE (normal): 8M
PROCESS VM AVAIL FROM OS (min): 128G
CACHESIZEMAX (strict force to disk): 96G
Database Version:
MySQL
Server Version: 5.5.37-log
Client Version: 6.0.0
Host Connection: Localhost via UNIX socket
Protocol Version: 10
2014-04-02 19:31:30 INFO OGG-01055 Recovery initialization completed for target file /u01/ogg/11.2/dirdat/mb000000, at RBA 917.
2014-04-02 19:31:30 INFO OGG-01478 Output file /u01/ogg/11.2/dirdat/mb is using format RELEASE 11.2.
2014-04-02 19:31:30 INFO OGG-01026 Rolling over remote file /u01/ogg/11.2/dirdat/mb000000.
2014-04-02 19:31:30 INFO OGG-01053 Recovery completed for target file /u01/ogg/11.2/dirdat/mb000001, at RBA 976.
2014-04-02 19:31:30 INFO OGG-01057 Recovery completed for all targets.
2014-04-02 19:31:30 INFO OGG-00182 VAM API running in single-threaded mode.
2014-04-02 19:31:30 INFO OGG-01515 Positioning to begin time Apr 2, 2014 7:17:38 PM.
***********************************************************************
** Run Time Messages **
***********************************************************************
GGSCI (nosql2) 157>
我在7点40做的操作,然后看了一下ext5的日志,发现没有动,我感觉是extrace进程没有起作用(在mysql端flush logs也试过,不行),不知道该怎么去诊断了。。。请帮忙提示一下。。万分谢谢 |
|