ITPub博客

首页 > 数据库 > MySQL > new feature ——>mysql to oracle Migration

new feature ——>mysql to oracle Migration

原创 MySQL 作者:qqmengxue 时间:2013-01-06 10:49:16 0 删除 编辑
MYSQL = (DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))
(CONNECT_DATA=(SID=MYSQL)) (HS=OK))
CREATE DATABASE LINK mysql
CONNECT TO "my_user" IDENTIFIED BY "my_password"
USING 'mysql';
[@more@]

Oracle Migration

Good guide to identifying differences

 Schema

 Data

 Objects

 Application

MySQL Migration Toolkit

- Does

- Tables/Views

- Data

- Does Not (yet)

- Sequences

- Stored Procedures

- Triggers

Oracle Migration - Schema

Case Sensitive Table Names

 Data Types

- INT, FLOAT/DOUBLE, NUMBER

- UNSIGNED

- BIT

 Sequences replacement – Auto Increment

 What's Missing

 Snapshots, Check Constraints, Flashback queries, synonyms

Oracle Migration - Data

Date Format – no NLS_DATE_FORMAT

 Silent conversions

- Less likely due to Oracle as Source

 No Oracle Timestamp (no ms support)

 Data Verification necessary

- COUNT(), SUM(), MD5()

Oracle Migration – Data Verification

Numeric Precision/Rounding

 Character Sets (multi-byte data)

 CHAR usage

- CHAR(5)

- Oracle 'abc ' - 5 characters long

- MySQL 'abc' - 3 characters long

Oracle Migration - Objects

No Packages

 Restricted Triggers

- Only one trigger per table per DML statement

- Missing

- INSTEAD,

- INSERT OR UPDATE

- OR REPLACE

- Only for DML Statements

Oracle Migration - Application

NVL() --> IFNULL()

 ROWNUM --> LIMIT

 SEQ.CURRVAL --> LAST_INSERT_ID()

 SEQ.NEXTVAL --> NULL

 NO DUAL necessary (SELECT NOW())

 NO DECODE() --> IF() CASE()

 JOIN (+) Syntax --> INNER|OUTER LEFT|RIGHT

Oracle Migration - Application

Date Functions

- CURDATE(), NOW()

 Data Formats

- Default is YYYY-MM-DD

 Case insensitive searching

- no UPPER(column) = UPPER(value)

- Character Set/Collation specific

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10130206/viewspace-1060007/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-03-26

  • 博文量
    169
  • 访问量
    549017