I'm trying to insert some id from MySQL Table T1
in Server A, into MySQL Table T2
in Server B inside an SSIS package.
I've tried ADO.NET source for reading data and ADO.NET destination and it gives me this error:
[ADO NET Destination [2]] Error: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SqlServer.Dts.Pipeline.ADONETDestination.PreExecute() at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPreExecute(IDTSManagedComponentWrapper100 wrapper) [SSIS.Pipeline] Error: ADO NET Destination failed the pre-execute phase and returned error code 0x80004003.
Actually, I've solved the problem by inserting into a SQL Server table and then run the Insert
statement through a linked server with this statement:
EXEC(@Insert) AT [LinkedServerName]
I wonder if there is a better solution?
You will need to install MySQL ODBC connector to the machine where SSIS is running first. You can download it here. Then you can create ODBC connection to MySQL in SSIS and use ODBC data source and destination. You will have to specify installed connector in the "Driver" property of ODBC connection.
User contributions licensed under CC BY-SA 3.0