MYSQL to SQL 2008 migration - mysql

We get a MYSQL 5.0 dataset each month (1.7gig) and I need to create a process to migrate this to a SQL Server 2008.
This seems a little harder than I first thought...
I've tried a few ways:
Using the Import wizard
Setting up a linked server
I've also tried different ways:
Using the .net Framework Dataprovider for MYSQL
Using MYSQL ODBC 5.1 driver.
If I try options 1 + 1 (Wizard, using odbc), I get "unable to retrieve column information",
Option 2 + 4, I get a message: "Cannot get the column information from OLE DB provider "MSDASQL" for linked server "server name"."
This feels like a cache, or size issue, because if I limit the rows I return to less than 300,000 it works. This is more annoying as the main table is over 1.2 million rows.
So my questions two parts: Am I doing this the right or wrong way, and have I missed something obvious?

You can use SQL Server Integration Services to connect to the MySQL database and pull the data you need over. The SSIS team blog has a walk-through for connecting to MySQL at Connecting to MySQL from SSIS. Once you build your SSIS package, you can re-use it each time you get a new data dump.

Related

SQL Server data export to mysql using SSIS

I'm trying to export data from SQL Server to MySQL using ODBC and I get an error while trying to form a destination point on SSIS.
What seems to be the problem? The table exists in MySQL
UPDATE I have found that the problem is the missing license key because i am using MySQL Provider MySQL Provider Cherry
Does anyone know any free alternatives for MySQL Providers using SSIS Ole Db? I know that ADO .Net has it, but is there an Ole Db free alternative?

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.

Transfer SQL Server Objects Task and Azure SQL - USE statement is not supported to switch between databases

I am using SSIS package Transfer SQL Server Objects task in order to transfer some tables from local SQL Server database to Azure SQL.
My task fails with the following error "USE statement is not supported to switch between databases. Use a new connection to connect to a different database."
I have read that this error occurs because master database is used and can be fixed by prefixing table names (for the tables to be transferred) with a database name. Unfortunately I cannot do that because when selecting table names there is no option to add database name as prefix - only schema name. So I am stuck here. Any suggestions?
Transfer SQL Server Objects task is using SMO in the background, which then uses the "USE" statement. This makes Transfer SQL Objects incompatible for connecting to Azure SQL Database.
My recommendation is to use Azure SQL Data Sync if you are only synchronizing tables: https://msdn.microsoft.com/library/azure/hh456371.aspx
Let me know how you go with it.
Julie

Migrate big tables from MySql to MsSql

I have a big database around 46GB in Mysql format and I managed to convert all the database to MSsql except two tables, the biggest ones. When I try to migrate those 2 tables, one by one , after a while I get the error message "The connection has been disabled"
I encreased the timeout from SSMA option from 15 to 1440 and decreased the bash from 1000 to 500 and same thing, The tables have 52 mil rows and 110 milion rows with 1,5 GB and 6.5 GB.
I tried incremential version but I don't have a unique id to use
What can I do to migrate them
Thank You
You should be able to use SQL Server Integration Services (SSIS). You can create a dataflow that pulls from MYSql and dumps the Data into MSSQL.
You'll need to create a Data flow task that includes an OLE Database Source and connect it to an OLE Database Destination.
I had the same problem using SSMA. I managed to migrate 100+ million rows of a table with 40+ columns.
I assume you've done the configuration well.
You need to ensure that there is no activity in the MSSQL database. No SELECTS over those tables and no any other activities.
Check out the two tables' structures to ensure they are fine. You can run the SSMA project only for those two tables.
Hope this helps.
I had the same issue and fixed by using the following configuration described here in detail: MySql 5.6 to MSSql server 2014 migration : ExecuteReader requires an open and available Connection
Also, I have documented the whole MySQL to MSSQL migration process here: Migrate Data and Schema from MySQL to SQL Server

Is it possible to Connecting MYsql with sql server?

I am using an open source software which support mysql and i create application that uses asp.net 4.0 and sql server 2008....
Is it possible to Connecting MYsql with sql server ?
I want every insertion and updating should be made to both database servers as they have same schema of tables but one is mysql and other is sql server 2008 ?
kindly explain step by step if possible
hope this will help,this shows step by step connection
http://www.codeproject.com/Articles/29106/Migrate-MySQL-to-Microsoft-SQL-Server
You can use linked server in MS SQL Server.
From the documentation - A linked server allows for access to distributed, heterogeneous queries against OLE DB data sources.
Have a look at sp_addlinkedserver function.