Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am trying to export table from SQL Server 2008 R2 TO MySql 5.5. For this I am using SQL Server Import and Export Wizard of Sql Server 2008, but it is giving this error. Error

Here this error may be occurring because table in Sql Server has a column with data type image and table in MySql this column's data type is LONGBLOB.

Please provide your expert answers. If not possible through SQL Server Import and Export Wizard than please suggest any other method for data transfer.

share|improve this question
add comment

migrated from stackoverflow.com Feb 26 '13 at 7:16

This question came from our site for professional and enthusiast programmers.

3 Answers

You could try changing the datatype in SQL Server to VARBINARY(MAX) :

http://wiki.ispirer.org/sqlways/mysql/data-types/longblob

Even if this is just to get your data into SQL Server. It may also be worth noting that IMAGE is being removed in future editions of SQL Server.

share|improve this answer
add comment

try to use following datatype for image in mysql BLOB L + 2 bytes, where L < 2^16 MEDIUMBLOB L + 3 bytes, where L < 2^24

share|improve this answer
1  
It may be that I am not familiar enough with MySQL, but this answer seems quite unclear. Could you clarify please, or at least improve the formatting? –  Paul White Feb 26 '13 at 23:41
add comment

QL Server databases are very Microsoft proprietary. Two options I can think of are:

  1. Dump the database in CSV, XML or similar format that you'd then load into MySQL.

  2. Setup ODBC connection to MySQL and then use DTS to transport the data. As Charles Graham has suggested, you may need to build the tables before doing this. But that's as easy as a cut and paste from SQL Enterprise Manager window to the corresponding MySQL window.

Reference: http://stackoverflow.com/questions/156279/how-to-import-a-sql-server-bak-file-into-mysql

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.