0 ratings 0% found this document useful (0 votes) 290 views 9 pages Oracle To MySQL Migration - SQLines
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here .
Available Formats
Download as PDF or read online on Scribd
Carousel Previous Carousel Next
Save Oracle to MySQL Migration - SQLines For Later sri7e017
Migration to MariaDB
16M DB2 to MariaDB
Informix to MariaDB
Sybase ASE to MariaD8
Oracle to MariaDB
I Server to MariaDe
Migration to MySQL
16M Da? to MySOL
Informix to MySOL
‘Sybase ASE to MySOL
‘Oracle fo MvSOL
SQL Server to MySQL
Migration to Oracle
‘IBM_DB2 to Oracle
Informix to Oracle
Sybase ASE to Oracle
Sybase ASA to Oracle
SOL Server to Oracle
‘Teradata to Oracle
PostoresOl to Or
‘MySQL to Oracle.
Migration to SQL Server
16M DB2 to SOL Server
Informix to SOL Server
‘Sybase ASE to SOl Server
‘Sybase ASA to SOL Server
‘Oracle to SQL Server
MySOL to SOL Server
Migration to PostgreSQL
‘IBM_DB? to PostaresOL
Informix to PostaresOL
Sybase ASE to PostaresoL
Sybase ASA to PostareSOL
Oracle to PosteresoL
SOL Server to PostaresOl,
Migration to Redshift
SOL Server to Redshift
Migration to Netezza
Oracle to Netezza,
Migration to Greenplum
16M DB? to Greenplum
‘Oracle to Greenplum
Migration to EsgynDB
hipaheww seines.comforacle-to-mysal
‘Oracle to MySQL Migration - SALinos
1sri7e017 ‘Oracle to MySQL Migration - SALinos
Oracle to Esqynd3
Ten Esavnbe
Application Conversion
Java
ce ner
PowerBuilder
‘coBOL
Informix acl.
Progress 4GL_
SQLines Data
‘Configuration File
Connection Strings
New Features
SQLines SQL Converter
New Features
Database Reference
Oracle to MySQL Migration
‘SQLines provides open source tools to help you transfer data, convert database schema (DDL), views, stored procedures, functions,
Packages, triggers, queries and $4 scripts from Oracle to MySQL.
We also help convert embedded SOL statements in C/C++ (ODBC, Pro*C, OCI, OCCI), C#, Java, PowerBuilder, VB/VB.NET,
ASP/ASP.NET, Perl, PHP, Python, Linux shell ang other applications,
+ Oracle 12c, 119, 109 and 91
+ MysQt sx
Oracle to MySQL Migration Tools
‘SQLines tools to help you migrate from Oracle to MySQL
+ SUines Data - Data Transfer, Schema Migration and Validation Too!
+ SQlines - Database and SOL Conversion Too!
+ Online SQL Conversion Tool [http://won-saines.com/ontine]
SQLines SQL Converter Too!
'SQLines $QL Converter tool allows you to convert database scherna (DDL), queries and DML statements, views, stored procedures,
functions and triggers from Oracle to MySQL.
‘SQLInes tool converts SQL, scripts and standalone $QL statements. To migrate data and database schema fram an Oracle database
Use SQlines Data toa
Try SQUnes Online [
:ylwww sqines.comjenline] or download a free Desktop Version (http:www-scines.com/downloae}
hipaheww seines.comforacle-to-mysalsre? ‘Oracle to MySQL Migraton- SALines
Oracle to MySQL Migration Reference
‘Technical information on migration from Oracle to MySQL.
. lex Migration Issue:
+ Ioentifiers
+ ‘SOL Lanquage Elements
+ Data Types
+ Built-in SOL Functions
+ CREATE TABLE
+ CREATE VIEW
+ Sequences
+ SELECT
+ CREATE PROCEDURE
+ CREATE FUNCTION
+ BUISOL Statements
+ SQL Statements
+ PL/SOL Built-in Packeaes
+ Data Transfe
+ Migration Validation
Most Complex Migration Issues
Oracle features that may require significant re-design when migrating to MySQL:
[oracie mysot
2 gREATE SEQUENCE Sequence Emulsion using wble and proce ures/luncons|
Identifiers
Converting identifiers:
[oracle mysau
Subsequent charactors [tater Gigi, _, # and $ [user agi, and §
iden que enracer|” (double quate) (heck) |” ANST_QUOTES i wet (nook by BUN
Max length
[oracte|mys@]
[Dienbarer je [se
SQL Language Elements
Converting $Q1, language elements:
[orate ays
coer [ving cmcatnaton|coucat ncion
fonpen me nace emer ast [wits onoen er [owen ey [overex aan cum
s[eursr9enOT FOUND No row found] Nor_FOUND = 3 | WNOLER FOR NOT FOUND]
Data Types
Converting datatypes:
once evs
ere nia toner fe oa faRGHARaSB)
hnpaheww seines.comforacle-to-mysalsrimeot7
‘Oracle to MySQL Migraton - SALinos
fe [acon Binary large object, © 4 [rence
5 [amin CuARACTERI Fxed-enge sting, 1 == 255 [owniny, cana
fe [cHaRin), CHARACTER(O) Fxsd-engt sting, 256 = 9 = 2000, vaRcrAR(n)
p-[DecINAL), DECIR) Fxed-poine sumbe wae
2[inTeGeR, NT 38 cits nts int [BEGANae)
3 [INTERVAL YEAR) TO MONTH [Date interval vancrane309
1] INTERVAL DAY(p) TO SECOND(S) Day and ema ital vaRcHAR(30)
7] cranny Fxed-enges UTF-S suing, Lene 255 [NCHAR(O)
3] NAAR Fxed-ength UTP sting, 256 =n = 2009 _[WWARCAAR
9 NAAR VARINGID) [Veryng-ength UTF-@ string, 4 0 ALD.)
23[ NUMBER, NUMBER Featng- paint number loousu
2a NUMERIC( =)
25 [ARCHARaKN)
[VARCHAR
asl aavie erabietenge binary sting, Tem = 255 __[BINARVGO)
aa [ RAW) Veriabltengt binary string, 256 = n = 2000 [VARBINARYGO)
so[ sac
38 cig inte
ate and ere wth fr
2) rmestamnyp) wink TIME zone [pate and ere wth cumin &
33 uROWiDG Lasea on oadrasses, bon = 0 varcrAanin
34] vancrA(ay varabletengt sting, 1 em = 4000 aRcHAR(n)
35] vacHAs2(n) [veriabletengin sing, Len © 400 vancrAan(n)
[aur beara [Lovatexr
Data type attributes and options:
oracle myst
[BYTE and GHAR col sine semantic [Sige is ale m ororers
Built-in SQL Functions
Converting built-in $Q4, functions from Oracle to MySQL:
oracle Deys@e
strom [Geetha abeaiae vale [asscnum
2 [acostnum) [eee tne are cosine lacostnum
[5 [A00_MONTHS(aat, num) [Ade num months to date MESTAMPRDDIWONTH, num, eats
= [aseutsr [eet ASG cade of temost char laseanse
fe [asiatoum [Gee the arene lasintrom
7 [araninum [cee ne are tangent laTaNour
fe [Arana [cee ne are tangent of x and y [raze
[em ro_wum(oit, bea, .) [Conver bl vector to number
a] arTAND(et, e292) Perform bitwise AND, epi 8 7)
]cennur| [Gee he srs ating mteger —_[OEIL(nurmy
2] eR(mom)
hpsheww seines.comforacle-to-mysal
[Gee enaracter from ASI coe
Jovani num USING ASE
“9srimeot7
‘Oracle to MySQL Migraton - SALinos
COESCEOpH, 2,
[conEscrtepi, ea,
| concar(chart, chara) [string coneatenation lconcar(crart, chara)
3 Convent (sting, charset [conver string to charset [cover (etrng USING charset)
6 |costnum) [eet he cosine [eostnum)
7 cosHum [cet hyperboe caine [enum + Ex nuM I?
a GURREWT_DATE [Ge the current date Nowe
5 GURRENT_TIMESTARP [Gee the curren ste and ne now
20) DECODE(ox, when, ther) uate conditions [case exoresson
2a] x7) alee eto th nen omer
22 exteacT(VEAR FROM gate) ack year om date
2a EXTRACT(MONTH FROM date) [Ewrect month rom date [mowra eat
a EXTRACT(OAY FROM dae) Extract day from date [oxv(aatey
25] EXTRACT(HOUR FROM ume) crac hour from te IHounteme)
2s EXTRACT MINUTE FROW ume) ute trom ume enue
27[EXTRACT(SECOND FROM ems) [Extract second fram time EcOND(time)
2a) rLooR(oum) [Get he largest preceding ee [FLOOR(aum)
23 GREATESTIOW, O92, =) [Ge he rir vale na et [cRearestiew, om?)
30 NTCARGtn9) alae words lser-ceine feneton
INSTRS subst) bustier, substr
51 instars, suas, pas) ce positon of substring LocaTets, subst pas)
INSTR abate, pa, HUT) User-defined function
a [LAST DAY dre [Seat aay ofthe month AST Dave)
3a [LEAST on, en’) [Ge the rina vlus eso LeAsTiew, om2
3a) uencrisrina) [cee lnath of tng n chars [ovan_teNcristring)
oTHsistrn9) [cet tenth o string in byes lenctatstingy
35 unteam [Gee natural oper ef pam lextnum)
37 STAN cet tne current date and time LOCATNESTAMP
LOCALTIMESTAMPL EAD [LocaTiMesTAMeG
aafLostnumt, numa) [Geclogariion, bare nami, mum —_[LOG(numa, num?)
LoweRsrna)
ting, le)
LPAD(swing, ln, pad)
jeRstno)
[enoiserng, fans
LenDtstng, fon, pad)
[ramm(stng)
** iraMisring, et) emeve leading chars [TRIM(LEADING set FROM string)
af owns. serweencane, aneay|SEsremae of rents Damen [sect fnetn
5 |wooCnsene,avee) serovar ood)
|r oi. 2) fn NUL emp = Wu! 2)
6 |wie,repacerenD spice NULL wah the peti ve NUL, replace)
j7|azieot,ep2.eps (RAT EPA T OPT ETAL |ease eprsson
a |PowERCoe ave ve otha pom fowtRtave,
5 |RENANOER, serovar in = n2rRoUNOGTADD
go RERACEor sen ive swenaoha er Aceat sere
RERACESt, seen, ee) [epic sexe sno ACE, Se, eH
frown em, tse set ronded ae UNO ger
[ADL Te) ete nonvase oa ots
[RPAD(string, lon, pad) fonesi ne [RPAD(string, len, pad)
[rR ive vaio aes rests)
RTRs, 3 enone raling FRMCTRALNG RON ma)
sie) [eraan ee sine)
55] sour jean sNCrun)
56] Som) [ox hneaic aoe aroun) “RRA
57 |souNoex era) cee 4horcer ound ele SOUNDEX ro)
SRT) eee seus ro saRr(num)
SUBSTRSg os og oa SuBsrating, pom)
5k 1 chairs na cee RERACSTUUIOD, 7")
cafsvsonre rsoAre0
hnpaheww seines.comforacle-to-mysal
59srimeot7
‘Oracle to MySQL Migraton - SALinos
63 rancnum cet tangent Jraxaum
6a antnu) [Get hyperbole tangent [exxzsum) eR aenam) +a)
fro cuamidsetie, format) [convert datetime to string loare romarideteime, temas)
Fo GunRingmbes rma [convert number wo ting Jeowmarioumoer decimal aigns)
fes|to oaretering, toma [conver string to cettime sre to paresewing, tomaty
a7 Foon [cover 108
ca) TO_NCHARCo [convert NCHA
63) 0 _NcLo8(exP) [convert NCLB
70) To _NuMsEReo) [convert NUM
faro_sincte, evTe(e) [convert
7a] TRIMeype trim FROM sting) [Remove characters
FRuM( (pe wim FROM] Stina)
os) ERENCE) \suncate num TRUNCATE(um, 0)
TRUNEKoum, mz) um, nuh
7a rauNctaasine) runes datine DaTe‘asttimel, DATE FORMAT
al unastastring) [conver Uneate cade paints chars lowanisving usinG ucs2)
ra [reer Uppercase sr [UereRstring)
73] user [Get the curren orer luseRo
0 usenENW( parameter) [cee he current session Infomation
51 vsize(ex) [cet the size of xp in bytes
a2 Acco [cet sagrepate Yi document
83) xMLCAST(on AS datatype) [convert ep tw datyoe
a xmLcbaTatewo) [cenerate » CDATA section
a5 [AMLCOMMENT(eRD) [Generate an 8 comment
7 [xMLDIFrde, doc) [compare two XL documents
a | MLELEMENT(WAME Seman) [Get an XQuery element ne
a9) xMLFOREST( exp, exp2, .) [esta front of XM, expressions
90 x ISVALIOCe= [crock HL ex
oi [x¥LPARSECDOCUNENT ox) [Perse xm docurrane
5a[xMLROOT(exp, VERSION exp2) [rent
95 xP SEQUENCE(ox)
[esc vray of the top-level nage
P6| as daane)
97 [pMLTRaNsrORGnstonce ew) —_[Wansform HM
CREATE TABLE Statement
Converting CREATE TABLE statement keywords
[oracle myst
DEFAULT any expression |peraucr only constant canbe specited Ab
Poses but ignores by MySQh, a trigger can beused
Storage and physical attributes
COMPRESS [GASIC] | COMPRESS nom | NOCOMPRESS
hnpaheww seines.comforacle-to-mysal
69srimeot7 ‘Oracle to MySQL Migraton - SALinos
9 [L05 (column) STORE AS BASIC FILE (params) [Removed
STORAGE clause
foracie [wvsor
fs [BUFFER_PoOL DEFAULT [KEEP RECYCLE [Removed
5 [FLASH_CACHE DEFAULT | KEES [NONE |Reroveo
0 ELL FLASH. CACHE DEFAUCT | KEEP | NONE [Rernved
LOB storage clause:
[oracle Iayser
TABLESPACE name Rerovee
2 DISABLE | ENABLE STORAGE IN ROW [Removed
CREATE VIEW Statement
Converting views from Oracle to MySQL
[oracie mysot
Sequences
Oracle DROP SEQUENCE, CREATE SEQUENCE and NEXTVAL emulation in MySQL using stored procedures and user-defined functions.
[erecta mys@e
oe NEXTVAL Nex na
SELECT Statement
Converting SQL SELECT statement and its clauses:
[oracle myst
RowNu = 7 [Reien trom only M1
CREATE PROCEDURE Statement
Converting stored procedures from Oracle to MySQL
[orecie mysot
2 param | OUT [IN OUT detatyp Rarer deinen |IN | OUT [INOUT param detetypetength)
[is tas. Reraved
s[voriabiedecaravon ie before BEGIN varisble declan le oer BEGIN
hipaheww seines.comforacle-to-mysalsrimeot7
‘Oracle to MySQL Migration - SALinos
For more information, see Conversion of PL/SOL Statements.
CREATE FUNCTION Statement
Converting user-defined functlons from Oracle to MySQL:
mse
[GREAT O8 RERAGE FUNCTION
DROP FUNCTION IF ENISTS and GREATE INGTION
2 [param | OUT LIN OUT aateypl araater deinen [param aottypeianath)
3 RETURN catae Return value RNS satatypetenath)
sfis 13s: Remaved
[END forename ENO
PL/SQL Statements
For more information, see Conversion of PL/SOL Statements.
Converting PL/SQL statements and clauses from
Oracle to MySQL:
[oracte mySQL
5] cuRSOR cur (params) IS SELECT [Cursor dectraten [DECLARE cur GURSOR FOR SELECT
[variable ang cursor geclratons can be mined many order [Varblececlaratons must be before cursor and handlers
[iF THEN eLsir Lge END F statement le rHen evserre1se eno ie
7 [write condition LOGP39/ ENO LOOP) Alp Statement [WHILE condiuan DO 59/ €ND WHILE
EXCEPTION block
mys
DECLARE EXIT HANDLER FOR SQLSTATE 3000
SQL Statements
Converting SOL statements and clauses from Oracle to MySQL:
[oracle myst
[ComMENT ON COLUMN tabla column IS
Moved to CREATE TABLE pe COMMENT rng” cau
5 | gREATE SEQUENCE [reateSequence stored procedure
[ROP SEQUENCE DropSequence sored procedure
Built-in PL/SQL Packages
Converting built-in PUSQL packages from Oracle
to MySQL:
Deyser
[pons TR EWA hao [Ena a To ATCC
SQL*Plus Commands
Converting Oracle $Q,*Plus commands:
[oracle Days@r
[ser DEFINE OW 1 OFF arabe avbsetucon [Cammentna
hnpaheww seines.comforacle-to-mysq
a9sri7e017 ‘Oracle to MySQL Migration - SALinos
Data Transfer
+ Drop existing parent tables (Removing or disable forelon key constraints)
Migration Validation
+ Data Transfer Validation
* Copyright © 2010 - 2017. AllRights Reserved, Pri
Statement
. ao
hipaheww seines.comforacle-to-mysal