Ok, so I have a .sql file that i exported from MySQL Workbench and now I want to import it into Microsoft SQL Server Express Edition for linux, and I'm not sure how I should go about doing that, any suggestions?
Asked
Active
Viewed 636 times
0
-
2To a first approximation you can use `sqlcmd` to run the script, but it will almost certainly fail on subtle incompatibilities between the MySQL SQL dialect and T-SQL (the dialect SQL Server uses) and will need tweaking. Microsoft actually has a [migration guide](https://datamigration.microsoft.com/scenario/mysql-to-sqlserver) for this scenario, though the tools mentioned run on Windows only (but the scripts produced would run on a Linux instance just as well). – Jeroen Mostert May 14 '20 at 12:57
2 Answers
1
If you export the data into csv or some other delimited format, I think you will be more successful.
If able to connect to your db in Linux with version of SQL Server Management Studio, there is an option - Right click on your DB in SSMS, Select Tasks -> Tasks -> Import Flat File. I am using SQL Server Management Studio 15.0.18330.0. I hope this helps.

Craig Gers
- 544
- 3
- 9
0
If your Linux SQL database has sight of your MySQL database and you have an ODBC driver loaded for my SQL (on Linux), there may be another, importing it directly from MySQL, without going through an intermediary step.

Craig Gers
- 544
- 3
- 9