异构平台同步(Mysql到Oracle)

Oracle GoldenGate学习之--异构平台同步(MySQL到Oracle)

wKiom1QlL0ODAhNWAAFaapV-AeY413.jpg

如图所示:源端采用Mysql库,目标端采用Oracle库

一、OGG安装配置(源端)

1、OGG下载

https://edelivery.oracle.com/EPD/Download/get_form?egroup_aru_number=14841438

wKiom1QlMAaxj0tFAAN-tUXU3d8212.jpg

https://edelivery.oracle.com/EPD/Download/get_form?egroup_aru_number=14841440

wKiom1QlL-jg9cRiAALo7IeF6zA121.jpg

[oracle@ogg ogg_ms]$ uname -a

Linux ogg 2.6.32-71.el6.i686 #1 SMP Wed Sep 1 01:26:34 EDT 2010 i686 i686 i386 GNU/Linux

1
2
3
4
[oracle@ogg ~]$ cd /u01/ogg_ms/
[oracle@ogg ogg_ms]$ ls
ggs_Linux_x86_MySQL_32bit.tar
[oracle@ogg ogg_ms]$ tar xvf ggs_Linux_x86_MySQL_32bit.tar

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[oracle@ogg ogg_ms]$ ./ggsci
Oracle GoldenGate Command Interpreter  for  MySQL
Version  11.2. 1.0. 1  OGGCORE_11 .2.1. 0. 1_PLATFORMS_120423 .0230
Linux, x86, 32bit (optimized), MySQL Enterprise  on  Apr  23  2012  04 : 29 : 30
Copyright (C)  1995 2012 , Oracle  and / or  its affiliates. All rights reserved.
GGSCI (ogg)  1 > create subdirs
Creating subdirectories under current directory /u01/ogg_ms
Parameter files                /u01/ogg_ms/dirprm: already exists
Report files                   /u01/ogg_ms/dirrpt: created
Checkpoint files               /u01/ogg_ms/dirchk: created
Process status files           /u01/ogg_ms/dirpcs: created
SQL script files               /u01/ogg_ms/dirsql: created
Database definitions files     /u01/ogg_ms/dirdef: created
Extract data files             /u01/ogg_ms/dirdat: created
Temporary files                /u01/ogg_ms/dirtmp: created
Stdout files                   /u01/ogg_ms/dirout: created

二、数据库配置

源端:mysql库配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
数据库配置文件:
[root@ogg ~]# cat /etc/my.cnf
# Replication Master Server (default)
# binary logging is required  for  replication
log-bin=mysql-bin
 
# binary logging format - mixed recommended
#binlog_format=mixed
   binlog_format=row
 
启动数据库服务
[root@ogg ~]# service mysql start
Starting MySQL  
 
连接数据库                                           [  OK  ]
[root@ogg ~]# mysql -h localhost -u mysql -p
Enter password:
Welcome to the MySQL monitor.  Commands end  with  or  \g.
Your MySQL connection id is  1
Server version:  5.6. 4 -m7-log Source distribution
Copyright (c)  2000 2010 , Oracle  and / or  its affiliates. All rights reserved.
This software comes  with  ABSOLUTELY NO WARRANTY. This is free software,
and  you are welcome to modify  and  redistribute it under the GPL v2 license
Type  'help;'  or  '\h'  for  help. Type  '\c'  to clear the current input statement.
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
4  rows  in  set ( 0.00  sec)
mysql> use test;
Database changed
mysql> show tables;
Empty set ( 0.00  sec)
 
创建测试表(存储引擎采用innodb)
mysql> create table test2 (id int,name char( 10 )) engine=innodb;
Query OK,  0  rows affected ( 0.02  sec)
mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| test2          |
+----------------+
1  row  in  set ( 0.00  sec)
mysql> select *  from  test2;
Empty set ( 0.00  sec)



本文转自 张冲andy 博客园博客,原文链接: http://www.cnblogs.com/andy6/p/6159060.html  ,如需转载请自行联系原作者


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值