How to import existing database from SQL Server into MySQL? - mysql

Is there any software that I can use to do this, or do I need to create a dump file from SQL Server that is compatible with MySQL?

If you can get the MySQL ODBC driver installed you can do the transfer with SQL Server management Studio (or whatever they're calling it now).
It doesn't do a great job with metadata so you'll probably have to deal with the constraints manually, as well as tweak the column definitions, but it will transfer the data.

Related

Create MySQL database from .mdf and .ldf files from SQL Server 2008

I have some .mdf and .ldf files of database size greater than 10 GB with me.
I want to create a MySQL database using the same.
Is there any provision in MySQL to do it?
Please consider that MySQL and SQL Server 2008 can not be installed on the same machine (or even the same network) in my current setup.
I don't have enterprise edition of SQL Server management studio in our network and will not be able to install it.
Is there any other elegant way to export data from SQL Server 2008 and import it in MySQL?
I don't think it is possible without attaching.
If you find a way how to attach it, you can use some specific migrating tools like this.
Some tools allow to create database specific queries from another solution, that need to be only executed on your side.
The MDF and LDF files belong to Microsoft SQL Server and use Microsoft's own binary format, so you cannot connect these files to other database management systems. The only approach I can think of, is to script out the database code and data from the SQL Server database to a text file (.sql file), and import this file into MySQL.

SSIS linked to a mySQL server

in SQL server it's possible to link a mySQL server into msSQL and query it using SSMS for example. I want to try this and use SSIS to do some transformations and store all the data on this mySQL database.
\I read that there a several ways to link to mySQL into the msSQL server. OLE DB, mySQL ODBC etc etc.
2 questions:
Are there any limitations i might run into when i will use a combination of SSIS and mySQL instead of msSQL?
When i link a mySQL database into msSQL and i write a query in SSMS, do i write the queries in mySQL language or msSQL language. For example the difference in TOP and LIMIT
I have worked with a linked MySQL Server from SQL Server in the past and ran into some issues.
Querying MySQL from SSMS (SQL Server)
Once you have created a linked server you would imagine you should be able to use the four-part name and query the tables in MySQL but it doesnt allow you. for example you cannot do something like...
Select * from MySqlServer.DbName.Schema.TableName
For some reason it throws an error. So the question whether I can use T-SQL in SSMS to query a Linked MySQL Server? Nope, unfortunately not.
But alternatively Microsoft recommends using OPENQUERY to execute queries to a linked server.
When using OPENQUERY, SQL Server does not try to parse the query, it just sends it to the linked server as it is. which means you can/should be able to write MySQL in SSMS using OPENQUERY and it will work.
Using SSIS with MySQL
Even though SSIS is Microsoft's tool that comes with SQL Server but it is a proper ETL tool which can read data from multiple sources and send data to many types of destination.
Once you have used the appropriate driver to connect to MySQL and ported data in SSIS package , its really not relevant anymore, where the data came from? you would have access to all the SSIS tools and you should be able to use them as if the data was coming from a flat file, SQL Server or Excel sheet etc.
By using Linked Server in MSSQL you can also connect to mySql. for that you need to download ODBC drivers. and then you have to create new dsn and while creating dsn you have to insert mySql server's details. then you can further search regarding how to create Linked server on SQL SERVER. This option is very easy and Totally free. You can use OPEN QUERY FOR inserting, updating, deleting and also get the data out from mySQL.

How to migrate large amount of data from MySQL database to SQL Server database with C# service

I have a MySQL database contains large amount of data.
I wanted to write a C# service program to migrate that data into SQL Server database.(Service should work fine with Insert as well as update with out performance issue).
Please help us if there is a way to accomplish this. If there is another way to achieve this is also fine. But, the MySQL client is not present in the local machine. But we could access the database from the server.
You can use the import and export functions in sqlserver, after installing a odbc mysql

how to import database created in microsoft sql server 2005 to MySql server 5.0

I have created database in microsoft sql server 2005 can i use that particular database in mysql server 5.0 .
There is no common way to perform such kind of migration because of much of differences between these two RDBMS.
The quick suggestion can be: export you MSSQL database into SQL file, open it via favorite text editor, remove MSSQL specific instructions, and load into MySQL using mysql console tool.
This way should be OK for non-complex databases without complex constraints, foreign keys and stored procedures.
Otherwise, you'll need to rewrite these type of database artifacts using MySQL dialect.

I need to convert my Mysql database to SQL Server 2005 database

I need to convert my Mysql database to SQL Server 2005 database, Is there any tools available for this conversion.
I will suggest a generic, standards-based, platform-independent approach, applicable to any two databases. Taken streight from an answer to another question, you can use any of the following tools:
SQL Workbench, using the WbCopy command
an ETL tool, like Pentaho Data Integration
DDLUtils
All of these will allow you to tweak the migration process to some degree (e.g. batch size).