new feature ——>mysql to oracle Migration

qqmengxue發表於2013-01-06
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() --&gt IFNULL()

 ROWNUM --&gt LIMIT

 SEQ.CURRVAL --&gt LAST_INSERT_ID()

 SEQ.NEXTVAL --&gt NULL

 NO DUAL necessary (SELECT NOW())

 NO DECODE() --&gt IF() CASE()

 JOIN (+) Syntax --&gt 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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章