没有合适的资源?快使用搜索试试~ 我知道了~
DTM_mk_MySQL Migration Kit—mysql_wp_oracle2mysql
4星 · 超过85%的资源 需积分: 10 9 下载量 88 浏览量
2012-05-01
22:05:54
上传
评论
收藏 1.4MB PDF 举报
温馨提示
试读
52页
DTM_mk_MySQL Migration Kit—mysql_wp_oracle2mysql 从Oracle迁移数据到MySql方法大全 http://www.bywei.cn/view.asp?id=111
资源推荐
资源详情
资源评论
A Guide for Migrating From Oracle to MySQL
A MySQL
®
Technical White Paper
March 2006
Copyright © 2006, MySQL AB
Table of Contents
1 Introduction...........................................................................................................................4
2 Why Migrating from Oracle makes Good Business Sense...............................................4
2.1 Measuring the Costs of using Oracle vs. MySQL .............................................................4
2.2 Scaling Out vs. Scaling Up ...............................................................................................5
2.3 A Quick Look at MySQL AB..............................................................................................5
3 The Technical Case for Migrating from Oracle to MySQL.................................................6
3.1 All the Right Features .......................................................................................................6
3.2 Examining MySQL Performance and Scalability...............................................................8
3.3 MySQL – Always Up, Always On......................................................................................8
4 Practical Suggestions for Easy Migration from Oracle to MySQL ...................................9
4.1 All or Nothing? ..................................................................................................................9
4.2 Step 1 – Document Oracle Sources ...............................................................................10
4.3 Step 2 – Design MySQL Targets ....................................................................................11
4.4 Step 3 – Run Migration to MySQL ..................................................................................11
4.5 Oracle to MySQL Migration Validation............................................................................12
4.6 Advice on Managing Oracle and MySQL Together.........................................................13
5 Conclusion ..........................................................................................................................14
6
Resources ...........................................................................................................................15
6.1 MySQL Migration Aids ....................................................................................................15
6.2 Case Studies ..................................................................................................................15
6.3 White Papers ..................................................................................................................15
7 Appendix A – Oracle to MySQL - Datatypes.....................................................................17
7.1 Overview.........................................................................................................................17
7.2 Synopsis .........................................................................................................................17
7.3 Data types for binary data...............................................................................................17
7.4 Data types for character data..........................................................................................18
7.5 Oracle native data types.................................................................................................19
7.6 Data types for numeric data............................................................................................20
7.7 Data types for temporal data...........................................................................................22
Copyright © 2006, MySQL AB Page 2 of 52
8 Appendix B – Oracle to MySQL - Predicates....................................................................24
8.1 Overview.........................................................................................................................24
8.2 Synopsis .........................................................................................................................24
8.3 Boolean conditions .........................................................................................................24
8.4 Comparison conditions ...................................................................................................25
8.5 Exists conditions.............................................................................................................26
8.6 Floating-point conditions.................................................................................................26
8.7 In conditions....................................................................................................................27
8.8 Is/member conditions......................................................................................................28
8.9 Null conditions ................................................................................................................29
8.10 Pattern matching conditions.........................................................................................29
8.11 Range conditions .........................................................................................................31
8.12 XML conditions ............................................................................................................31
8.13 Predicate precedence..................................................................................................32
9 Appendix C – Oracle to MySQL - Operators.....................................................................34
9.1 Overview.........................................................................................................................34
9.2 Synopsis .......................................................................................................................
..34
9.3 Arithmetic operators........................................................................................................34
9.4 Concatenation operators ................................................................................................35
9.5 Hierarchical query operators...........................................................................................35
9.6 Multiset operators ...........................................................................................................36
9.7 Set operators ..................................................................................................................36
9.8 Operator precedence......................................................................................................37
10 Appendix D – Sample Migration.....................................................................................39
10.1 Sample Oracle Schema...............................................................................................39
10.2 Moving the Oracle Database to MySQL with the Migration Toolkit ..............................42
10.3 Sample MySQL Schema Generated from Oracle........................................................47
10.4 Sample Code Migration ...............................................................................................49
Copyright © 2006, MySQL AB Page 3 of 52
1 Introduction
With the rapid growth of MySQL in the database market, many corporations, government agencies,
educational institutions, and others have begun to migrate away from their expensive and proprietary
databases. Of course, a migration from any database is not something to be taken lightly, and so
countless organizations are considering their options for migrating to MySQL.
In particular, many MySQL customers are migrating from Oracle because they have reached the
conclusion that the combination of cost-savings and feature set of MySQL make for a compelling
business case to offload some or all their database-driven applications to the MySQL database
server. This paper provides insight into what is needed for considering a move from Oracle to
MySQL, and presents a number of options that help make the transition easy. Both the business and
technical sides of migrating to MySQL will be dealt with, so whether you are a manager or a seasoned
DBA, you will find the needed answers to questions that revolve around migrating to the world’s most
popular open source database - MySQL.
2 Why Migrating from Oracle makes Good Business Sense
Before making any large-scale commitment to a technology, modern enterprises must look beyond
the technical promises software vendors make and first consider the business side of acquiring a
technology. While each business follows its own methodology for approving the deployment of a
given piece of software, the core set of factors that normally govern acceptance are calculating the
total cost of ownership and validating the viability of the software vendor.
Let’s take a more detailed look at each of the two factors above and see how MySQL measures up
when it comes to calculating the total cost of ownership of the MySQL database server, as well as the
current health of the company that stands behind that database.
2.1 Measuring the Costs of using Oracle vs. MySQL
One of the driving factors that can be attributed to the huge popularity and adoption of open source
software in business today is the dramatic cost savings that accompanies owning such software.
Given that many large Global 2000 enterprises spend between $500,000 and $10,000,000 in annual
costs for new licenses and existing maintenance for proprietary database software, MySQL becomes
an incredibly attractive alternative as most companies find they can slash their costs some 80-90% by
using MySQL for new application projects as well as upgrading existing systems to use MySQL in
place of its more expensive and proprietary alternatives.
Such license and maintenance cost savings are amplified when businesses find they must scale their
applications to meet higher user demand. For example, a recently published study by database
industry guru Charlie Garry compared the cost of deploying Oracle RAC and MySQL and offered the
following insight:
“Oracle has encouraged its customers to scale out through its RAC approach.
Although there are technical pros and cons to using RAC, one important consideration is the
additional cost. Since RAC is an additionally charged item, and since the majority of RAC users
also purchase the data partitioning feature to help with scaling, the cost per additional processor is
$85,400 including license, support and mandatory upgrade fees. To put that in context, for every
Copyright © 2006, MySQL AB Page 4 of 52
processor added you could purchase approximately 11 commodity servers, install an open source
database such as MySQL and purchase gold level database support for each server.”
1
2.2 Scaling Out vs. Scaling Up
Countless MySQL customers have become successful in using the modern scale out approach to
database infrastructure design vs. the older scale up methodology. As the previous quote from
Charlie Garry makes clear, from a cost standpoint, scaling out with Oracle doesn’t make much
financial sense, even when the RAC option is not used. Consider the following comparison and cost-
savings that can occur when using scale-out with MySQL vs. scale up with Oracle:
Scale Up Scale Out
Hardware Cost
SMP Server: 1
CPUs Per server: 24
Total CPUs: 24
$1,250,000
Dell Server: 12
CPUs Per
Server: 2
Total CPUs: 24
$120,000
Software Cost
Oracle Enterprise
Edition
Price: $40,000/CPU
Up-front License
Cost:
$960,000
Annual Support
Cost:
$211,200
MySQL Network
Gold
Price:
$2,995/Server/Y
ear
Up-front
License Cost:
$0
Annual Network
Cost:
$36,000
Total Cost $2,421,200 $156,000
Total Savings $2,265,200
Total Software Savings $1,135,200
Such black-and-white cost comparisons are why so many are turning to scale-out architectures to
grow their business. Hardware costs aside, scaling out with MySQL makes complete business sense
as the above example shows that software costs can be reduced nearly 97% by going with MySQL
instead of Oracle. Companies like Weather Channel find MySQL the perfect weapon to use in their
quest for high database performance and lowest total cost of ownership:
"Today, Weather.com is the 10th-largest website in the world and runs almost 100 percent on the
open-source database MySQL. ’With the switch from a Sun Solaris environment to Linux on Intel,
elimination of hardware maintenance, replacement of commercial software with open source, and
the better price and performance of an Intel platform, we reduced costs by one-third and increased
website processing capacity by 30 percent,’ reports Dan Agronow, CTO of The Weather Channel
Interactive."
2
2.3 A Quick Look at MySQL AB
Migrating to a new database platform generally means making a long term commitment, so modern
enterprises considering the move to MySQL want to know the history behind the database as well as
things like who’s using it and how.
1
Database Scale-Out Using Open Source Software:Achieving Infrastructure Agility, September 2005.
2
http://www.cio.com/archive/090105/forum.html, September 2005
Copyright © 2006, MySQL AB Page 5 of 52
剩余51页未读,继续阅读
资源评论
- suzg1102012-09-18不错,但是英文的
百味博客
- 粉丝: 4
- 资源: 28
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功