异构平台同步(Mysql到Oracle)
生活随笔
收集整理的這篇文章主要介紹了
异构平台同步(Mysql到Oracle)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Oracle?GoldenGate學習之--異構平臺同步(MySQL到Oracle)
如圖所示:源端采用Mysql庫,目標端采用Oracle庫
一、OGG安裝配置(源端)
1、OGG下載
https://edelivery.oracle.com/EPD/Download/get_form?egroup_aru_number=14841438
https://edelivery.oracle.com/EPD/Download/get_form?egroup_aru_number=14841440
[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? ,如需轉載請自行聯系原作者
總結
以上是生活随笔為你收集整理的异构平台同步(Mysql到Oracle)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: minSdkVersion、compil
- 下一篇: C值循环语句(七)