Groups | Blog | Home
all groups > sql server dts > february 2006 >

sql server dts : mySQL to MS SQL - Primary Keys


Allan Mitchell
2/20/2006 11:41:55 AM
Hello Michael,


Nope you are missing nothing. There is no way in DTS to do this, likewise
you cannot do this with an Access DB. The only DB type that you can do this
with is SQL Server --> SQL Server.

A solution would be to read the metadata for the keys and indexes from MySQL
and bulid the appropriate SQL Server equivalent statements and apply them.



Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

[quoted text, click to view]

Michael Johnson
2/20/2006 6:42:47 PM

Trying to convert a mySQL database to MSSQL. Using Import data in SQL Server
2000, it works fine, however I get no primary keys defined on any of the
tables, am I missing something? Or is there a tool that would do this?

Many thanks.

Michael Johnson
2/20/2006 6:46:09 PM
Oops, forgot to mention that I'm using the MySQL 3.51 ODBC connector in the
import process.


[quoted text, click to view]

Michael Johnson
2/20/2006 10:34:48 PM
Hello Allan,

Thanks for the info, was hoping that I would not need to write a bunch of
code to get this information out of the mySQL database and then parse it
against SQL Server. Looks like a good use of a late night coding, perhaps
I'll throw the code out on CodeProject once I'm done.........

Know that there are converters, but why spend hundreds when you can write
it yourself in an evening.........

[quoted text, click to view]

AddThis Social Bookmark Button