While Microsoft provided connectors for Oracle, Teradata, and SAP BI for SSIS 2008, there are many other database systems left out of the mix. Fortunately, SSIS is exceptionally flexible in connecting to various data sources and allows other vendors to provide native support. The MySQL team did just that with Connector/NET 6.0, their ADO.NET provider. This tool allows us to use the the ADO.NET connections in SQL Server Integration Services to easily connect to MySQL. This is a walk through on how to connect to MySQL with SSIS 2005 utilizing the Connector/NET 6.0 ADO.NET provider.
- Download and install MySQL Connector/NET 6.0
- Start a new Integration Services project in BIDS
- Right-click in Connection Managers and create a new ADO.NET Connection
- In the Provider dropdown, expand .Net Providers and select MySQL Data Provider. Press "OK"
- Fill out the Server name, User name, Password and select the database name for the target MySQL server. Be sure to test the connection and press “OK”
- Rename the connection to “MySQLDB”
- Open up the Toolbox and drag a Data Flow Task from the toolbox onto the Control Flow surface
- Double-click the Data Flow Task to switch to the Data Flow view
- Create a new variable, “MySQLResult” with the Data Type of Object. We will be using this as the final destination for the data, so we don’t need to connect to a file or database to store the data from this test
- Drag a new DataReader Source component onto the Data Flow surface
- Double-click the DataReader Source to open the Advanced Editor. On the Connection Managers tab, select the previously-created MySQLDB connection
- Switch to the Component Properties tab and enter the SQL query in the SqlCommand property. Note that the query must be compatible with MySQL syntax, not SQL Server.
- Switch to the Column Mappings tab to verify that the query is successful and the all the columns were pulled from the database. When done, press “OK”.
- Create a new Recordset Destination by dragging it from the toolbox to the Data Flow surface
- Drag the green Data Flow Path from DataReader Source to Recordset Destination, so they connect
- Double-click the Recordset Destination to open its Advanced Editor
- Under Custom Properties, select the dropdown for VariableName and select the variable we created before, User::MySQLResult
- Switch to the Input Columns tab and select those columns that you want stored in the Recordset Destination. When complete, click “OK”
- Right-click the green Data Flow Path and choose “Data Viewers…”
- Select “Data Viewers” from the left pane and click the “Add…” button
- Under the General tab, select Grid and press “OK”
- Run the package
- If you’ve done everything correctly, you should see a Data Reader Output Data Viewer window pop up with the contents of the query we specified earlier.
SQL Server Integration Services makes connecting to other systems very easy. The MySQL ADO.NET provider works well, but requires more configuration than a native Source component.


















good instruction. How to push data to MySQL from SQL 2005
Hi,
This is a great article to introduce the mySQL in SSIS. I found it to be very helpful.
However, I am having trouble trying to figure out how to use this mySQL ADO in the Data Transformation section inside the Data Flow?
Basically, based on the result of a ConditionalSplit, it will either retrieve data from mySQL or doing something else.
I was able to retrieve data using this connector as the Source or Destination, but not in the Transaformation.
Any suggestion?
TIA,
Ting
Well done! Very Clear
I don’t seem to have the DataReader Source in my toolbox, only the destination. Even if reset the toolbox it doesn’t seem to appear.
Has this option been removed from 2008??
Thanks,
BIDS = SQL Server Business Intelligence Development Studio
What is BIDS??? (step #2)
@cesar
The Data Viewer is just a way to visualize the data – you’re not supposed to extract data from it.
What you probably want is an OLE DB Destination or Flat File Destination instead of the Recordset Destination to permanently store the data somewhere.
so then ?? how to use that dataGrid ??