|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Have any of you ever converted a DB2 database to MySQL? This includes all the information stored in the database also. Is this possible?
I have to figure this one out soon. I don't think my company can afford to pay IBM several thousand dollars, we're still using Pentium I's... |
|
#2
|
||||
|
||||
|
I would look first at http://www.mysql.com to see if someone has already written a conversion program.
If not, is there a way to export the DB2 data into a comma or tab delimited file? If so, you could use the LOAD DATA INFILE command in MySQL to then load the data into a table. You'd have to create the table manually, though, matching the columns to what you have in your DB2 tables... ---John Holmes... |
|
#3
|
|||
|
|||
|
There's a conversion utility that supposedly works with DB2, but it doesn't. Even DB2 can't export a proper DDL file, it puts "s around everything. I have the original copy of the table schema but I'm having trouble putting that into MySQL because I think there are things left out. like:
CREATE TABLE clients.clients (...); But, I don't have the declaration of the clients schema that it seems to be using. MySQL supports schemas, doesn't it? I've been trying to find a way to generate text files for my tables in DB2 but I haven't quite figured that out yet. I'm working on it. |
|
#4
|
||||
|
||||
|
That's fine if everything is enclosed by quotes. You can specify options in the LOAD DATA INFILE command
LOAD DATA INFILE 'file.ddl' ENCLOSED BY """, SEPERATED BY ",", etc... Check the manual for the proper syntax, though. I'm not sure what you mean by schemas... Are you having trouble determining what types of columns there are in your DB2 table? varchar, text, integer, float, etc?? If there's not a way to dump the table creation data, you'll have to do it by hand. Determine the data types of each column in each table and then recreate them in MySQL. If there aren't a lot of tables, this shouldn't be a big deal, and it's a one time thing. Once it's in mysql it can be easily dumped... ---John Holmes... |
![]() |
| Viewing: Dev Shed Forums > Databases > DB2 Development > DB2 Conversion to MySQL |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|