Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

The main purpose of this blog is to share my input into an Open Source development and my experience and knowledge

gained
during almost 5 years of professional work in ITC industry.
How to migrate Oracle to MySQL
It may sound unbelievable but I have found nothing when googling for some good !owTo regarding
the migration from Oracle to "yS#$. %ortunately based on various tips spread across numerous sites I
have finally succeeded after almost & days thanks to the SQLyog software. 'hy not to share this
experience then( The following are the components that were used by me in the migration process)
* CentOS 5.4 server with Oracle 11.1.0.6.0 + source
* Ubuntu 12.04.2 server with MySQL 5.5.29 + destination
* indo!s Ser"er 200# $2 acting as an agent
%irst of all as I was using the 'indows server as an agent I had to configure both Oracle and "yS#$
,-"S that they.re accessible via network. To accomplish that follow these steps)
/0 Oracle)
1ccording to some tips that I found on the Oracle endpoint the only thing you need to do is to check if
the Oracle listener is running. If so you should be able to connect remotely)
lsnrctl status
Indeed I was able to connect. Then you can create a dedicated user that will be used in the migration
process and grant him proper privileges)
SQL> create user migration identified by 'migration';
User created.
SQL> grant all privileges to migration;
Grant succeeeded.
&0 "yS#$)
* In %etc%&ys'l%&y.cn( file change the value of bind)address attribute from 12*.0.0.1 to I2
address of the 3IC
* 4rant proper privileges to the user that will be used in the migration process based on the
I2 address of the agent. In my case I also created an empty database for that purpose)
mysql> C!"#! $"#"%"S! db;
Query &'( ) ro* affected +,.,- sec.
mysql> G"/# "LL &/ db.0 #& migration1').2.3.4' 5$!/#565!$ %7 'migration';
Query &'( , ro*s affected +,.28 sec.
That.s all we need to do on the source and destination sides. The rest of work is done by the agent. On
a dedicated 'indows box follow this steps then)
/0 Install S#$yog "yS#$ 45I software. There is a 67 days trial version available to download for
everyone. 8ou don.t need to register to download it. The only thing that you need to do is to provide a
valid email address that a link and installation instructions are sent to you. The installation process is
self explainary.
+ntro
,re-aration
Class VI to X
CBSE Notes
thedigilibrary.com/CBSE-NOTES
Select $anguage
2owered by .ranslate
Translate this page
.ytus /ure0
9rak:w 2oland
5 years of professional
experience in ITC industry.
"y experience covers
numerous professions and varies from
regular helpdesk support system and
network administration to professional IT
pro;ects resources and services
management and even more ... . "y
interests include leading ICT trends like
Cloud Computing -ig ,ata "obile
Solutions and more.
<iew my complete profile
About Me
"aster of Telecommunications
ITI$ + %oundation
$2IC 6 + Senior
<C1 + Cloud
<C1 + ,ata Center <irtuali=ation
CC32 + Security
CC31 + >outing ? Switching
"CTS + "S @xchange &7/7
Education and Certification
Subscribe to this page
@mail address... Submit
Search
Search
!owTo AB0 CaseStudy AC0
5buntu A50 -ug AD0 Server 'indows
Tags
1 "ore 3ext -logE Create -log Sign In
Page 1 of 12 How to migrate Oracle to MySQL |My Technical Blog
8/8/201 htt!"//t#$re#%&log'!ot%in/201(/0/migrate)oracle)to)my'*l%html
2) Install Oracle Database 11g Release 2 Client software. Be careful to select a proper platform and
client version. Unfortunatel! t"is time ou need to be registered at Oracle to download t"e client
software. #"e installation process is self e$plainar.
%) &elect Any ODBC Source radio button from t"e Type of Data Source menu. &elect System/User
DSN radio button from t"e Select or Create an ODBC Data Source Name (DSN) menu. 'rom t"e
drop(down list ou s"ould be able to select t"e ORACLE D&) t"at we defined in step 4 of
t"e reparat!on section. *rovide Username and ass"or# used to connect into t"e Oracle database+
,) In t"e Oracle "ome director -C$%app%A#m!n!strator in m case) ou will find t"e pro#uct%&&'(')
%cl!ent*&%net"or+%a#m!n director. .o t"ere and create tnsnames'ora file containing t"e information
about our Oracle database instance. /ost of t"ose information ou can find inside tnsnames'ora and
l!stener'ora files inside our Oracle database "ome director on t"e Oracle server. #"e most important
data -I* address and t"e service name) "ave been "ig"lig"ted+
ORACLE=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS = (PROTOCOL = TCP)(HOST = 5.6.7.8)(PORT = 1521))
)
(CONNECT_DATA = (SERVICE_NAME=DB)
)
)
0) .o into Start menu on our 1indows bo$ and open A#m!n!strat!,e Tools (2 Data Sources
(ODBC) tool. &elect System DSN menu and press A##''' button+
&elect Oracle !n OraCl!ent&&-*.ome& driver from t"e list and press /!n!s. button+
*rovide a name for t"e connection b tping into Data Source Name field and select t"e connection
2312 -,) databases -,)
Ask Tytus Kurek
now
TytusKurek
!artners
Page 2 of 12 How to migrate Oracle to MySQL |My Technical Blog
8/8/201 htt!"//t#$re#%&log'!ot%in/201(/0/migrate)oracle)to)my'*l%html
defined in step , from t"e drop(down list called TNS Service Name
*ress OK button. 4lternativel! ou can test t"e connection b pressing Test Connection button and
providing proper credentials+
*ress OK button on t"e Data Sources (ODBC) tool window.
Note+ If in step 6 of t"e Migration section ou get an error! t"en ou need to create ,2(bit ODBC D&).
In suc" a case! in step 4 of t"e Preparation section! instead of running t"e ODBC from t"e &tart menu!
run t"e following e$ecutable+ C:\in!o"s\S#sO64\o!$ca!%&'e(e
)ow we5re read to perform t"e migration. *lease! follow t"ese steps to accomplis" t"at+
1) Open S)*#og software and press t"e Ne"''' button to set up a new connection+
Migration
Page ( of 12 How to migrate Oracle to MySQL |My Technical Blog
8/8/201 htt!"//t#$re#%&log'!ot%in/201(/0/migrate)oracle)to)my'*l%html
2) *rovide a name for t"e new connection and press OK button+
,) *rovide all necessar credentials to connect into our /&67 database and press Connect button+
0) SQLyog will open and ou5ll be connected into our database. 8ou5ll see it in t"e top left corner of
t"e window. Rig"t(clic9 on t"e database name and select Import -> Import External Data+
Page of 12 How to migrate Oracle to MySQL |My Technical Blog
8/8/201 htt!"//t#$re#%&log'!ot%in/201(/0/migrate)oracle)to)my'*l%html
:) 4 new window will appear. &elect Start a new job and press Next > button+
%) &elect Any ODBC Source radio button from t"e Type of Data Source menu. &elect System/User
DSN radio button from t"e Select or Create an ODBC Data Source Name (DSN menu. 'rom t"e
drop(down list ou s"ould be able to select t"e O!AC"# D&) t"at we defined in step $ of
t"e %reparat&on section. *rovide Username and %asswor' used to connect into t"e Oracle database+
Page 5 of 12 How to migrate Oracle to MySQL |My Technical Blog
8/8/21! htt"#//t$%re$&'log("ot&in/21)/!/migrate*oracle*to*my(+l&html
7) Confirm all the settings by pressing the Next > button:
8) Select Copy table(s) from the data source radio button and press Next > button:
Page 6 of 12 How to migrate Oracle to MySQL |My Technical Blog
8/8/21! htt"#//t$%re$&'log("ot&in/21)/!/migrate*oracle*to*my(+l&html
9) Select the required tables or simply press Select All button to select and migrate all tables from the
database. Press Next > button (I'm sorry but I have unfortunately lost the screenshot from this post.
Should be self-eplainary any!ay).
"#) Specify Error handling settings according to your demands and press Next > button$
"") Specify !hen to run the %ob that you've %ust created& the logfile and press Next > button$
Page 7 of 12 How to migrate Oracle to MySQL |My Technical Blog
8/8/21! htt"#//t$%re$&'log("ot&in/21)/!/migrate*oracle*to*my(+l&html
12) The migration job stars. You'll see the output and results in the main window. After successful
migration press the Next > button:
13) You're done. ress the Finish button.
Page 8 of 12 How to migrate Oracle to MySQL |My Technical Blog
8/8/21! htt"#//t$%re$&'log("ot&in/21)/!/migrate*oracle*to*my(+l&html
14) Verify that the data have been successfully migrated from Oracle to MySQL either from the
SQLyog GU or from the !L on the MySQL server"
mysql> SHOW TABLES;
+--------------+
| Tables_in_db |
+--------------+
| APEX$_ACL |
+--------------+
!"# in se$ %&'&& se()
+1 Recommend this on Google
19 comments:
Anonymous #ugust $% &'1( at )"&) #M
*i%
Page 9 of 12 How to migrate Oracle to MySQL |My Technical Blog
8/8/21! htt"#//t$%re$&'log("ot&in/21)/!/migrate*oracle*to*my(+l&html
Replies
Reply
Replies
Reply
Replies
Reply
Great information and clear instruction. BTW, does this migration also migrate data into each table or just
the schema?
Thanks.
Reply
Tytus Kurek October !, "#$ at %&#% '(
)'nonymous&
*t should migrate both the schema and the data. That+s ho, it ,orked in my case at least -..
Anonymous 'ugust ", "#$ at !&$ '(
/i,
thank you for interesting post0 1lease let me kno, if the tool con2erts 2ie,s, triggers and stored
procedures? *f not, ha2e you tried Oracle3to3(y456 by *ntelligent 7on2erters? 8endor says it supports
2ie,s but in full 9paid. 2ersion only. But * don+t ,ant to pay before kno, that is really ,ork. * ,ould
appreciate any information you can gi2e0
/ans
Reply
Tytus Kurek October !, "#$ at %&#: '(
)'nonymous&
*+2e no idea. * encourage you to contact the 456yog support at https&;;,,,.,ebyog.com;
any,ay. *n my case it just ,orked and * ,as able to connect my Tomcat ser2er into the
(y456 ser2er instead of Oracle.
Anonymous 4eptember #", "#$ at #&< 1(
this is good for migration oracle schema and data, on the site ep,orks.alter2ista.org * found a solution to
migrate an application pro=c;c>> from Oracle to (ys?l ,ithout ricompilation the application
Reply
Anonymous 4eptember ##, "#$ at #&"< '(
/i Tytus @urek,
This is good post.
can it con2ert 16;456 code 9procedures, packages, functions and triggers. to (y456 supported syntaA ?
What ,ill happen if Bon3'B4* compatible 456 functions used in Oracle Catabase ?
Reply
Tytus Kurek October !, "#$ at %&## '(
)'nonymous&
*+2e no idea. * encourage you to contact the 456yog support at https&;;,,,.,ebyog.com;
any,ay.
Anonymous 4eptember ##, "#$ at D&: '(
on the page http&;;ep,orks.alter2ista.org;joomla;porting;docs;porting; you can see the limitations
Reply
Page 1 of 12 How to migrate Oracle to MySQL |My Technical Blog
8/8/21! htt"#//t$%re$&'log("ot&in/21)/!/migrate*oracle*to*my(+l&html
Replies
Reply
Replies
Reply
Replies
Reply
Tytus Kurek October 26, 2013 at 5:15 AM
@Anonymous:
Thans !or sharin" that#
Anonymous $eptember 13, 2013 at 1:%& AM
't coul( not mi"rate (ata to My$)* +,#
Reply
Anonymous $eptember 1%, 2013 at 12:5- .M
The library (oes not nee( to mi"rate (ata to Mys/l but to run an application .ro012133 usin" the (b
Mys/l
Reply
Anonymous October 1, 2013 at 3:04 AM
5ot so !ar ' ha6e !oun( ne7 cool tool to 7or 7ith my$)* 8 9alentina $tu(io# 'ts !ree e(ition can (o
thin"s more than many commercial tools::
' 6ery recommen( chec it# http:22777#6alentina8(b#com2en26alentina8stu(io8o6er6ie7
Reply
Tytus Kurek October 26, 2013 at 5:15 AM
@Anonymous:
Thans !or sharin" that#
Anonymous 5o6ember 1%, 2013 at 3:32 AM
1an this 6alentina stu(io mi"rate Oracle schema into my$)*;
Ashwini Ahire +ecember 13, 2013 at 11:10 .M
Thans !or this (ocument :8<
Reply
Anonymous =anuary 3, 201% at -:%5 AM
Thans !or the nice article# >oo( to learn ho7 to mi"rate Oracle to My$)* usin" !ree tool# ' mysel! 7as
com!ortable in usin" this tool
Reply
Anonymous March %, 201% at %:03 AM
Thans !or the article,
but an issue: i! use the trial 6ersion ?i@m usin" 6ersion 11#33 32 bit < 7hen i try to mi"rate all my 100
tables , i see this messa"es: This is a TR'A* 6ersion you can select only t7o tables at the time :::
so i ha6e eAecute 50 batch !or mi"rate all tables ####
Reply
Tytus Kurek March %, 201% at %:%4 AM
Bou@re ri"ht# ,ut that@s the only 7orin" solution that ' !oun( 7hen 7ritin" this article#
Page 11 of 12 How to migrate Oracle to MySQL |My Technical Blog
8/8/201 htt!"//t#$re#%&log'!ot%in/201(/0/migrate)oracle)to)my'*l%html
Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Enter your comment...


Comment as: Select profile...
Publish Preview
Create a in!
Anonymous "uly #$% &'#( at $:$) A*
+ood Article. Nice to !now you can do t,e mi-ration usin- free trial edition. . am usin- t,is paid tool for
mi-ration
/eply
Links to this post
0emplate ima-es by enot1polos!un. Powered by 2lo--er.
Page 12 of 12 How to migrate Oracle to MySQL |My Technical Blog
8/8/201 htt!"//t#$re#%&log'!ot%in/201(/0/migrate)oracle)to)my'*l%html

You might also like