Hi how to copy a SQL server database to mySQL database
-
Hi , I need to create a tool to copy SQl server database into a mysql database.Could you please help me to get an idea of this ?.Do I need to use transaction?.How to avoid foreigh key conflicts ? with warm regards. :|
-
Hi , I need to create a tool to copy SQl server database into a mysql database.Could you please help me to get an idea of this ?.Do I need to use transaction?.How to avoid foreigh key conflicts ? with warm regards. :|
Have you checked this article Migrating from Microsoft SQL Server and Access to MySQL[^].
Denver Thomas wrote:
Could you please help me to get an idea of this
If you want to create a tool, one way is that: - you get the schema information from MSSQL and create ddl scripts using MySQL syntax (or execute ddl against MySQL) - you dump the data from MSSQL and import it to MySQL If you need, there are several tools to use. For example, you can use SSIS in MSSQL and transfer data with it also bcp can be used to dump the data in MSSQL. Or you can do everything in code (depending on your needs).
Denver Thomas wrote:
Do I need to use transaction
Well, since this is a conversion tool it's not necessary since you can always start again from the 'beginning'. Just take care that you don't have to do everything again. For example, if you have imported data to 100 tables and then table 101 fails, you just delete that table's contents and start loading it again.
Denver Thomas wrote:
How to avoid foreigh key conflicts
First load data and after that create foreign keys.
The need to optimize rises from a bad design.My articles[^]