SSIS MySQL Copying Table to SQL Server - mysql

I want to copy tables from MySQL to SQL Server.
ADO.NET source using the MySQL connection.
OLE DB destination, SQL Server.
The statement is a full copy so no big deal there. When I hit the play button, after a while an error pops up. I set a DataViewer and started all over again, running it from inside the DataFlow while checking the DataViewer. After a while (this time it took longer) the error.
Error: 0xC02090F5 at Data Flow Task, ADO NET Source 1: The component
"ADO NET Source" (1) was unable to process the data. Fatal error
encountered during data read.
Error: 0xC0047038 at Data Flow Task,
SSIS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The
PrimeOutput method on component "ADO NET Source" (1) returned error
code 0xC02090F5. The component returned a failure code when the
pipeline engine called PrimeOutput(). The meaning of the failure code
is defined by the component, but the error is fatal and the pipeline
stopped executing. There may be error messages posted before this
with more information about the failure.
Any idea on this error?

this took me few days to figure out...so I thought I would share my notes
How to connect and load data from MySQL to SQL Server
1 - Download the 32 bit ODBC driver.
go to the MySQL website and download: “mysql-connector-odbc-5.2.4-ansi-win32.msi” NOTE: Do not use the 64 bit driver on BIDS 2008. BIDS 2008 is 32 bit. You will get a mismatch error when creating SSIS’s connection manager: “The specified DSN contains an architecture mismatch between the Driver and Application”
2 - Create a User DSN You need to open the using windows 32 ODBC admin tool. DO NOT open the regular ODBC admin, in control panel. Open the ODBC admin located here: c:\Windows\SysWOW64\odbcad32.exe. If you use the default ODBC admin…it will not work. Additionally you must create a “User DSN” - NOT a System DSN. Otherwise it will not show up in SSIS NOTE: the screens look the same so you will have no way of knowing whether you are in 32 BIT ODBC Admin tool or not.
3 – Create a new SSIS package and create an ADO.NET connection manager AND ADO.NET SQL Server destination.
4 – Change the Source ADO.NET properties. You will get validation errors and your package will not run. You need to change the “ValidateExternalMetadata” to FALSE (in the “Advanced Editor” dialog box) of the ADO.NET source It will also give you metadata error…that’s ok…just click ok. It will still pull the metadata (column names/data types). You cannot select the tables as you would in SQL server. You need to type the SQL select statement.
5 - Run the package and should run and load normally.

Related

SSIS Package Works in VS but not in SSIS because of ODBC Data Flow Task Error

We have a test package that was designed using VS2017 that has one "Data Flow Task" object with "ODBC Source" and "ODBC Destination" objects within it. The package is simply trying to move records from table 'Table_1' to table 'Table_2' in the same SQL Server 2014 database named 'Test'.
When we execute the package from VS2017, it runs successfully.
However, when we import that package into SSIS, and then run the package directly from there, we get the following error messages (see screen shots below):
The version of ODBC Destination, clsid {51B271F1-3B7E-4875-870E-62A0456FE2AD} is not compatible with this version of the DataFlow.
The version of ODBC Source, clsid {F8600F4A-E321-42F4-AA59-DA00FA374EA5} is not compatible with this version of the DataFlow.
The component is missing, not registered, not upgradeable, or missing required interfaces. The contact information for this component is "ODBC Destination;Connector for Open Database Connectivity (ODBC) by Attunity; Attunity Ltd.; All Rights Reserved; http://www.attunity.com;7".
Any ideas as to what is causing these errors?
Couple side questions / interesting notes:
Why is it referencing Attunity? We are not using the Attunity connectors. We are using ODBC. I don't even have Attunity installed on this machine (I did at one point but uninstalled it).
If you don't use the DataFlow task with the OBDC driver and just use a simple 'Execute SQL Task' object in the package that runs a simple 'INSERT INTO Table_2...' statement, the package runs in SSIS. There is something wrong with using the Data Flow Task.
Screen shots:
Here you can see the package is running successfully in VS2017:
The package was imported into SSIS:
When you run it in SSIS, it fails with the following errors:
Found the answer from other posts.
First, change the TargetServerVersion property for the project to the version of SQL Server you are using for SSIS as explained by the links below and the screen shot shows.
The version of ODBC source is not compatible with this version of the dataflow
SSIS: version of ODBC source is not compatible with this version of the dataflow
After you do that, you may run into an error that states something like the following:
[ODBC Destination [2]] Error: The AcquireConnection method call to the connection manager MyConnectionManager failed with error code 0xC0014009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
If you get that error, change the Run64BitRuntime property to 'True' for the project as explained by the link below and the screen shot shows.
‌https://social.msdn.microsoft.com/Forums/sqlserver/en-US/eb9e6826-b650-433b-bab9-16da214efd99/the-acquireconnection-method-call-to-the-connection-manager-mydatabaseodbc-failed-with-error-code?forum=sqlintegrationservices

Error while executing SSIS package to data migration from SQL 2012 server to MySql

I'm trying to migrate data from MS Sql server 2012 to MySql server (5.1) using SSIS packages
Here is my data flow task which retrieves data using query from SQL Server and pumps to Mysql (one of its columns contains blob type)
and properties
Tried with ODBC connection manager and ADO.net(odbc driver) manager for destination.
The following is the error I'm facing, it is failing after inserting some records into MySql which I'm not able figure out the reason/ solution:
Error: 0xC020844B at DFT Finding Attachment, ADO NET Destination 2: An exception has occurred during data insertion, the message returned from the provider is: The connection has been disabled.
Error: 0xC0047022 at DFT Finding Attachment, SSIS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "ADO NET Destination" (2) failed with error code 0xC020844B while processing input "ADO NET Destination Input" (9). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.
The issue is with MySql max_allowed_packet, it set to 1MB so it's failing while iserting large blobs, so the answer is icreate it to 64MB
set global max_allowed_packet=64M
I'd suggest to add a Data Conversion task into the Data Flow, between Source and Destination and make sure all the data types are converted properly, before inserting into the MySQL table.
I often experienced that SSIS cannot convert the datatypes by default.

SSIS Package fails - Unable to retrieve column information from the data source

I am getting the following messages when writeing data in a dataflow to an updates table, that had been truncated in a previous SSIS step in the same package.
Error: 0xC0202009 at DF - Main, OLE DB Dest - Dim Customer Temp [345]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x8007000E.
Error: 0xC020204A at DF - Main, OLE DB Dest - Dim Customer Temp [345]: Unable to retrieve column information from the data source. Make sure your target table in the database is available.
Error: 0xC004701A at DF - Main, SSIS.Pipeline: OLE DB Dest - Dim Customer Temp failed the pre-execute phase and returned error code 0xC020204A.
The table does exist, (I created it a few days ago) the package is running in Visual Studio 2010 against a SQL Server 2012 database. The database is up and running and I can access the table bot before and after running the package.
The SSIS connection is running under windows authorisation, using my userid/session.
I've been writing SSIS packages since DTS days and have never seen a case where the package could not retrieve meta data, while running, for a table before. Any thoughts.
Note I can go into the OLEDB DB Destination and bring up the columns and prieview the data before running the package in debug mode, where it fails.
Any thoughts?
I have changed the OLE DB provider and issue was resolved.
Problem statement
Using Sql Server Data tool 2015, when package run the following errors appears.
Resolution:
Follow below steps to resolve this problem.
Open Sql server management studio.
Connect server.
Go to Security>>Login.
Select user, go to properties by right click on it.
a. Go to user mapping tab.
b. Select the destination database and assign db_owner and db_reader. Click OK.
Run package and it will work, hopefully mentioned steps helps you in your scenario as well.

SSIS - MySQL source: Could not create a managed connection manager

I'm using VS 2012 with SQL Server Data Tools installed. I have an ADO NET Source, which uses the .Net Providers\MySQL Data Provider and am trying to push some data to an OLE DB Destination, which uses a normal SQL Server Native Client 11.0 provider. Everything seems ok, I can preview data from the source and columns are mapped well - but when I run the project I get the following error:
[ADO NET Source [2]] Error: ADO NET Source has failed to acquire the connection {47479EC0-98BC-4664-A8F9-0FF0278969FD} with the following error message: "Could not create a managed connection manager.".
[SSIS.Pipeline] Error: ADO NET Source failed validation and returned error code 0xC0208449.
Most Google hits talk about setting the Run64BitRuntime to false. Mine is greyed out and defaulted to false already. Any other suggestions?
I ended up using an ODBC connection and was able to follow this post step by step to get an alternative route working:
SSIS MySQL Copying Table to SQL Server

Error code 0x80004005 when executing package as a scheduled job

The error message is:
POSTGRES dm_genders_d failed validation and returned error code
0x80004005.
I've seen several references to this almost assuredly being a permissions issue, which sounds right to me, but I have been completely unable to identify the relevant permissions.
The Postgres connection is using ODBC. The package is moving data from PostgreSQL to SQL Server. Currently both 32bit and 64bit drivers exist, but I haven't seen how to choose between them.
I have made all of the recommended changes to 32 bit for the job.
We are using Windows Authentication.
I've set up a proxy to execute the job as my user.
None of this has alleviated this error.
UPDATE: Yes, the 32 bit data source has been defined, and it is being used.
I had this error and I could solve it by Add ODBC connection in the "system DSN" instead of "User DSN" tab.
Start > ODBC Data Sources
Also I ran package with 32-bit runtime
for this: right click on your job in SQL Server Agent > properties > steps > edit
in the window that appear (Job Step Properties) you can set 32-bit runtime. (below picture)