-3

I have a .Net console application that extracts data from webapi and fill 5 tables on a MS SQL Server database.

Now I have to export these tables to a MySql Database. How can I do that in an easy way?

The Console Application is coded with Visual Studio 2015 (C#).

Is it possible to use LinqToSql on a MySql Database ?

Or is it possible to use MySql as Destination Server on Microsoft Integration Service ?

Thanks

Chandan Rai
  • 9,879
  • 2
  • 20
  • 28
DarioN1
  • 2,460
  • 7
  • 32
  • 67
  • 1
    Possible duplicate of [How to export data from SQL Server 2005 to MySQL](http://stackoverflow.com/questions/129/how-to-export-data-from-sql-server-2005-to-mysql) – Tab Alleman Mar 06 '17 at 18:34

1 Answers1

-2

I Solved the problem by editing the .Net Console application in order to implement a loop-insert in MySql Database using MySql.Data.MySqlClient.

It is not fast for big data loading but it works properly.

DarioN1
  • 2,460
  • 7
  • 32
  • 67
  • "It's not fast" is a serious problem when talking about databases. You should check how bulk loading works on MySQL instead. Check [LOAD DATA INFILE](https://dev.mysql.com/doc/refman/5.7/en/load-data.html). SSIS is also a good option, certainly better than writing your own console program. You could transfer data directly from a SQL Server source to a MySQL destination, *and* perform transformations – Panagiotis Kanavos Mar 07 '17 at 08:42
  • I agree, but SSIS is not present in my environment. The only thing I can use is a console application. – DarioN1 Mar 07 '17 at 14:19
  • Are you sure? The `Export Wizard` in SSMS actually generates SSIS packages that can be scheduled for execution. – Panagiotis Kanavos Mar 07 '17 at 14:43
  • Anyway, you *can* export the data to a file that can be used with LOAD DATA statement or mysqlimport. – Panagiotis Kanavos Mar 07 '17 at 14:49