Tuesday, March 27, 2012

Exporting MS SQL Server or Oracle Databases to MySQL

I also posted similarly in mailing.database.mysql

I have created a rather large (60 table database) website dealio in PHP that
works with MS SQL Server, Oracle, MySQL and presumably any other data base I
add to
the wrapper functions that I created. All the development was done in
Oracle, but now its time to create that large datastructure again in
MySQL -- now I've built this all in notepad for Oracle (twice) and built it
in SQL Server using the SQL Server import tools (pretty nice) -- is there
anything that I can do that to get this datastructure and maybe even the
data into MySQL using Oracle/MS SQL Server tools ?

James"James Alexander Starritt"
<jamesstarrittRemovethefollowingtoemailme@.hotmail.c om> wrote in message
news:403ac257_1@.newspeer2.tds.net...
> I also posted similarly in mailing.database.mysql
> I have created a rather large (60 table database) website dealio in PHP
that
> works with MS SQL Server, Oracle, MySQL and presumably any other data base
I
> add to
> the wrapper functions that I created. All the development was done in
> Oracle, but now its time to create that large datastructure again in
> MySQL -- now I've built this all in notepad for Oracle (twice) and built
it
> in SQL Server using the SQL Server import tools (pretty nice) -- is there
> anything that I can do that to get this datastructure and maybe even the
> data into MySQL using Oracle/MS SQL Server tools ?

SQL Server will permit the creation of scripts
for the data tables that should be useful, and the
bcp function should handle the data.

Pete Brown
Falls Creek
NSW
Oz
|||"James Alexander Starritt" <jamesstarrittRemovethefollowingtoemailme@.hotmail.c om> wrote in message news:<403ac257_1@.newspeer2.tds.net>...
> I also posted similarly in mailing.database.mysql
> I have created a rather large (60 table database) website dealio in PHP that
> works with MS SQL Server, Oracle, MySQL and presumably any other data base I
> add to
> the wrapper functions that I created. All the development was done in
> Oracle, but now its time to create that large datastructure again in
> MySQL -- now I've built this all in notepad for Oracle (twice) and built it
> in SQL Server using the SQL Server import tools (pretty nice) -- is there
> anything that I can do that to get this datastructure and maybe even the
> data into MySQL using Oracle/MS SQL Server tools ?
> James

From the MSSQL side, you could start by scripting the objects from
Enterprise Manager, then reviewing the code and making any
modifications needed to handle different data types, syntax etc. I
know nothing about MySQL, so I have no idea how large or small a task
this would be, except to guess that procedural code (stored
procedures, triggers, user-defined functions) may be the hardest part.
The resulting file can then be run in MySQL.

To move the data over, there are several different options. You can
use BCP or DTS to export to flat files, then import them into MySQL
using whatever tools it provides for bulk import. Alternatively, if
there is an ODBC driver for MySQL, you could use DTS to move the data
directly from MSSQL and/or Oracle to MySQL. Finally, you may be able
to create a linked server on MSSQL, then simply do an INSERT ...
SELECT ... to move the data.

Simon

No comments:

Post a Comment