0

How can I migrate mysql tables to an already existing sql database.I have tried using sql server migration assistant for mysql tool, but it migrates entire database to a new database in sql server.Is it possible to transfer mysql tables to existing sql database?

Please help

Surabhil Sergy
  • 1,946
  • 1
  • 23
  • 40
Youv
  • 75
  • 1
  • 5
  • 12

3 Answers3

0

If you have MySQL workbench and you only need the table structures you can select the tables that you need then: Right Click > Copy to clipboard > Create Statement

Then past these into your new database an excecute

Sofian
  • 61
  • 4
0

you can create a linked server the target system; this way you can import the tables selecting the data into the new tables on sql server.

if you already have the DDL migrated then you can fill the tables otherwise you can create the tables while copying the data.

with little scripting you can have the SQL code needed to copy the data ready in minutes.

there are many SO posts about interacting with MySQL from SQL-Server:
Can't create linked server - sql server and mysql
SELECT * FROM Linked MySQL server
Do I have to use OpenQuery to query a MySQL Linked Server from SQL Server?

Community
  • 1
  • 1
Paolo
  • 2,224
  • 1
  • 15
  • 19
0

Have you tried the Import/Export Wizard from within SQL Server Management Studio - it's essentially SSIS (an ETL tool) behind the scenes. It allows you to select specific objects, do transforms and such. I'd expect you'd be able to use a standard ODBC driver.

MSSQLTips has an article that seems relevant: https://www.mssqltips.com/sqlservertutorial/2205/mysql-to-sql-server-data-migration/

Peter Schofield
  • 939
  • 7
  • 13