SSIS 2014 Lookup Transformation with SQL Server Destination - ssis

I am trying to implement a Lookup Transformation in SSIS 2014 to load "no match output" into "SQL Server Destination", but I got errors at runtime:
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Test dataflow" (58) failed with error code 0xC02020C7 while processing input "SQL Server Destination Input" (74). 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.
As source task the "OLE DB Source" is used.
The Lookup Transformation uses the no cache mode.
In "SQL Server Destination"-Task: "Table lock" and "Check constraints" are checked and the timeout is set to 30.
What am I doing wrong? Could please someone help to solve this error?

Per my knowledge you cannot use SQL Server Destination while loading data, coming from Lookup Transformation.
You need to use OLE DB Destination.

Related

SSIS Package to copy data from one to another error

I have setup a SSIS package to copy over some data from one table to another. At first I tried doing from one server to another server, did not succeed. Then I tried it doing within the same server, no luck again. I followed couple tutorials/videos how to do it and followed the exact pattern.
However here's what I tried to do:
Create a "Data Flow Task"
Under "Data Flow" tab create an "OLE DB Source" and "OLE DB Destination"
Configure the "OLE DB connection manager" and setup the column mapping, verify connection status for both source and destination
When I run the package I get following errors
Here are the 5 errors that are in the above figure,
[OLE DB Destination 2] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "STLEDGSQL01.MES_DEV" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
[SSIS.Pipeline] Error: OLE DB Destination failed validation and returned error code 0xC020801C.
[SSIS.Pipeline] Error: One or more component failed validation.
Error: There were errors during task validation.
[Connection manager "STLEDGSQL01.MES_DEV"] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.".
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Client unable to establish connection".
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Registry information is corrupt or missing. Make sure the provider is installed and registered correctly.".
Now I have tried applying couple of solution that I found in stackoverflow and out in the internet, such as following but nothing helped me so far.
Set delay validation property at package level to True from false
Change ProtectionLevel to EncryptSensitiveWithUserKey
Any help is greatly appreciated!
For anyone who's interested or had the same issue as mine, I just found the answer. I was using the wrong TargetServerVersion in project properties. My SQL server is 2016 and it was defaulted to 2019 automatically in this property page. I did change it back to 2016 and yes it all starts working.
I suggest that you do not use SSIS to move data around inside a database. Just use a stored prcedure or script. Here is a sample script that will copy data from one table to another, but only for data that doesn't exist in the target.
insert into targettable (PrimaryKeyColumn,Column1,Column2,Column3)
select PrimaryKeyColumn,Column1,Column2,Column3
from sourcetable SRC
where not exists (
select *
from targettable TGT
where TGT.PrimaryKeyColumn = SRC.PrimaryKeyColumn
)

SSIS Package fails when writing from Excel to ODBC iSeries destination in Batch Mode

I am a complete novice at this so please bear with me.
I have written an SSIS package that takes Excel data, does Data conversion and then inserts into an Iseries table using an ODBC Connection.
When I select Table - row by row as the destination mode, the package works fine, but is extremely slow writing to the iSeries. All records are written. So there is no issue with the Excel data, or the Data Conversions.
However, if I change the ODBC Destination Data Access Mode to Table Name - batch mode the package fails with the following 3 errors:
[ODBC Destination FileName [160]] Error: SQLSTATE: HYC00, Message: [IBM][System i Access ODBC Driver]Driver not capable.;
[ODBC Destination FileName [160]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "ODBC Destination FileName.Inputs[ODBC Destination Input]" failed because error code 0xC020F453 occurred, and the error row disposition on "ODBC Destination FileName.Inputs[ODBC Destination Input]" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "ODBC Destination FileName" (160) failed with error code 0xC0209029 while processing input "ODBC Destination Input" (171). 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.
I cannot work out whether it is a configuration issue within my iSeries ODBC driver configuration or a flag or something within the SSIS that I need to change?
As I say, I'm a complete novice so if you need any additional information please ask, and if I need to do any debugging or tracing, please explain to me how to do this.
I am running Windows 11 and the package and Excel file are on my laptop with a VPN connection to the iSeries.

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.

Handing SSIS validation failures

I'm trying to implement the SSIS package failure handler. I've added onError Event handler on whole package and failure operation the task where i'm expecting an error in the control flow.
The main task of the package is to pick up some data from the db,
the error handler is Send Mail Task sending email message with error description.
Now, I'm trying to emulate a common error: I make some changes in the SQL query (for example, set incorrect name for one of the columns) and try to run the package.
What i see is that package fails on validation stage and does not even proceed to execution, saying
Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occured. Error Code 0x80040E14. An OLE DB record is available. Source "Microsoft SQL Server Native Client 11.0"
Hresult 0x80040E14 Description "Statement(s) could not be prepared"
Description "The multipart identifier "MyTable.SomeWrongField" could not be bound".
Error: "OLE DB Source" failed validation and returned validation status "VS_BROKEN".
It doesn't even procceed to execution, failing right after validation.
How to set the error handle so it handles EVERY error, even the issue like this (incorrect sql request)?
Thanks.
A Validation error is the SSIS equivalent of a syntax error. There is no opportunity for recovery as the execution is dead in the water. OnTaskFailed and OnError won't catch this type of error (which is one of the reasons we no longer implement error notification from within our packages themselves)

"Not enough storage" Error When Trying To Select Destination Table in SSIS

I am building an SSIS package and getting an error when setting "Name of the table or the view" in the OLE DB Destination editor.
SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred.
Error code: 0x8007000E. An OLE DB record is available.
Source: "Microsoft SQL Native Client 10.0" Hresult: 0x8007000E
Description: "Not enough storage is available to complete this operation.".
Failed to open a fastload rowset for "[dbo].[MyTable]".
Check that the object exists in the database.
Exception from HRESULT: 0xC0202040 (Microsoft.SqlServer.DTSPipelineWrap)
But, the table is definately there.
What could be causing this error?
Try saving the package and exiting from BIDS. Then start again, and try fixing the destination component.
It's only complaining about the table because it was in the process of handling that table at the time of the Out of Memory exception. It has a one track mind about that - failure setting up table == table does not exist.