Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

0

积分

0

好友

4

主题
1#
发表于 2014-4-2 20:13:44 | 查看: 4286| 回复: 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也试过,不行),不知道该怎么去诊断了。。。请帮忙提示一下。。万分谢谢
2#
发表于 2014-4-3 10:25:29
结贴。。。犯了一个很SB的错误:
mysqld_safe --user=mysql --log-bin=/tmp/binlog.001 --log-bin-index=/tmp/binlog.index --max-binlog-size=10M --binlog-do-db=mysql

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-11-18 18:18 , Processed in 0.048030 second(s), 20 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569