Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 523905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:30:38+00:00 2026-05-13T08:30:38+00:00

I am trying to transfer a table from MySQL to MSSQL using the data

  • 0

I am trying to transfer a table from MySQL to MSSQL using the data migration tool in MS SQL Management studio. I am using .net provider for odbc and selecting the tabel and trying to tansfer. But is is getting the total tables in the database but when I try to transfer it gives error.
Even when I try to preview the data, it says,

the preview data could not be retrieved.
Additional Information:
Error [42000].... there is an error near line 1 ( myodbc5.dll).

is there anything wrong?

I downloaded the drivers from MySQL site and I tried reinstalling them over 10 times now.

I am missing anything?

Please help me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:30:39+00:00Added an answer on May 13, 2026 at 8:30 am

    There could be several problems based on your post. I would recommend breaking down troubleshooting to the following steps:

    1. Attempt to connect to the server in a tool other than Management Studio and SSIS to see if your ODBC connection works properly. I would recommend using Toad for MySQL by Quest Software. It is free and has a similar UI to Management Studio.

    2. Once you connect to the server correctly, try querying the data to verify you have adequate permissions.

    3. Do steps 1 and 2 while logged into the server that needs to connect to the MySQL database. You may experience different connectivity problems on the server than on your desktop. For instance, the server may be secured differently on the domain or you may have a driver compatability issue on the server that doesn’t exist on the desktop.

    4. Try setting up a linked server connection using the ODBC connection. On one server we found we could successfully get this to work but we couldn’t get SSIS to play correctly with the ODBC connection. In the worse case, you can use SSIS to execute a linked server query to bring over the data via stored procedure call. Here’s a sample Linked Server connection that worked for us in this instance.

      EXEC master.dbo.sp_addlinkedserver @server = N’Some_MySQL_Server_Name’, @srvproduct=N’MySQLDatabase’, @provider=N’MSDASQL’, @datasrc=N’Some_ODBC_Name’

      EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N’Some_MySQL_Server_Name’,@useself=N’False’,@locallogin=NULL,@rmtuser=NULL,@rmtpassword=NULL

      GO

      EXEC master.dbo.sp_serveroption @server=N’Some_MySQL_Server_Name’, @optname=N’collation compatible’, @optvalue=N’false’
      GO

      EXEC master.dbo.sp_serveroption @server=N’Some_MySQL_Server_Name’, @optname=N’data access’, @optvalue=N’true’
      GO

      EXEC master.dbo.sp_serveroption @server=N’Some_MySQL_Server_Name’, @optname=N’dist’, @optvalue=N’false’
      GO

      EXEC master.dbo.sp_serveroption @server=N’Some_MySQL_Server_Name’, @optname=N’pub’, @optvalue=N’false’
      GO

      EXEC master.dbo.sp_serveroption @server=N’Some_MySQL_Server_Name’, @optname=N’rpc’, @optvalue=N’false’
      GO

      EXEC master.dbo.sp_serveroption @server=N’Some_MySQL_Server_Name’, @optname=N’rpc out’, @optvalue=N’false’
      GO

      EXEC master.dbo.sp_serveroption @server=N’Some_MySQL_Server_Name’, @optname=N’sub’, @optvalue=N’false’
      GO

      EXEC master.dbo.sp_serveroption @server=N’Some_MySQL_Server_Name’, @optname=N’connect timeout’, @optvalue=N’0′
      GO

      EXEC master.dbo.sp_serveroption @server=N’Some_MySQL_Server_Name’, @optname=N’collation name’, @optvalue=null
      GO

      EXEC master.dbo.sp_serveroption @server=N’Some_MySQL_Server_Name’, @optname=N’lazy schema validation’, @optvalue=N’false’
      GO

      EXEC master.dbo.sp_serveroption @server=N’Some_MySQL_Server_Name’, @optname=N’query timeout’, @optvalue=N’0′
      GO

      EXEC master.dbo.sp_serveroption @server=N’Some_MySQL_Server_Name’, @optname=N’use remote collation’, @optvalue=N’true’
      GO

      EXEC master.dbo.sp_serveroption @server=N’Some_MySQL_Server_Name’, @optname=N’remote proc transaction promotion’, @optvalue=N’true’
      GO

    5. The SSIS data flow should use an ADO.NET source. Do not rely on the “table or view” data access mode. Instead, use a SQL command. I’ve noticed SSIS has problems reading the meta data correctly at times and you may need to CAST some of the fields to resolve this issue. Sometimes it makes the column to long or too short. Pay attention to the data types on the source to see how SSIS may have mucked up the lengths. I don’t remember what causes this, but it seemed to relate to nullability and string data types if my memory is correct. I would recommend sending this to a data-reader destination and use the data-viewer to view the data to see if it looks correct. You may also need to add a data conversion step between the source and the destination to convert from unicode to non-unicode.

    If you determine the problem is with the ODBC connection, then you may want to try these settings:

    1. Flags 1: Return matched rows instead of affected rows; Allow big result sets; Use compression; Treat BIGINT columns as INT columns.

    2. Flags 2: Don’t promt when connecting.

    3. Flags 3: Include table name in SQLDescribeCol(); Disable transaction support.
      Debug: Log queries to myodbc.sql.

    4. SSL Settings: Leave it empty if this is not over
      SSL.

    Clicking Test should return Connection Successful. If this works, then you should be able to get Toad for MySQL to work with it.

    If you go the Linked Server route, then make certain the ODBC name matches exactly to the defined data source. I believe we found this was case sensitive, but I’m not entirely sure anymore.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.