Link to home
Start Free TrialLog in
Avatar of Jim2000
Jim2000

asked on

Converting from Oracle to MySQL

In Oracles SQL+ you can start the execution of a querie / table creation that is help in a file by doing from the command line

start filename.sql

I want to know how I can do this in MySQL cos all my stuff is saved in files. Plus will there be any incompatibility issues such as the  "/" at the end of every table creation etc.

Cheers

Jim
Avatar of jlevie
jlevie

In MySQL you can execute SQL commands from a file like "mysql database <cmds.sql". You can also redirect any output into a file, "mysql db <cmds.sql >res.out"

It's been my experience that, yes, you'll run into compatability issues. I've not yet encountered a case when moving data from one database to another that I didn't have to modify the SQL data. My advice is to look carefully at the table creation syntax, data types, and especially at the data formats in the Oracle output and the MySQL SQL definitions. If there's a lot of data involved, I find it helpful to write a perl program(s) to massage the SQL files into the form required by the target database.
ASKER CERTIFIED SOLUTION
Avatar of jlevie
jlevie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial