SSIS failing to get column value and setting it to NULL - sql-server

I have an SSIS package that reads data from an Oracle table and puts it into a Netezza table. For some reason, SSIS cannot read a specific column value (2% of the records) as shown in the screenshot here.
The column type in Oracle is NUMBER(3) and in my Netezza table it's SMALLINT. Any idea why this might be happening?
The error columns do not give me any information either.
What I have tried so far:
Tried to get a better Error Description using this MSDN article.
Reduced batch size from the default 1000, to 100.
Thanks in advance for any help.
EDIT
I let it fail and here are the error messages I am getting. I have 4 GB memory on the my laptop. Could that be an issue?
[DESTINATION_TABLE 2] Error: Open Database Connectivity (ODBC) error occurred. SQLExecute returned error while inserting row 35244
[DESTINATION_TABLE 2] Error: Open Database Connectivity (ODBC) error occurred. state: 'HY008'. Native Error Code: 51. Operation canceled
[DESTINATION_TABLE 2] Error: Open Database Connectivity (ODBC) error occurred. state: '01000'. Native Error Code: 1. Unable to write nzlog/bad files
[DESTINATION_TABLE 2] Error: Open Database Connectivity (ODBC) error occurred. state: '01000'. Native Error Code: 1. Unable to write nzlog/bad files
[DESTINATION_TABLE 2] Error: Open Database Connectivity (ODBC) error occurred. state: 'HY000'. Native Error Code: 46. ERROR: External Table : count of bad input rows reached maxerrors limit
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "DESTINATION_TABLE" (2) failed with error code 0x80004005 while processing input "ODBC Destination Input" (13). 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.
[SOURCE_TABLE [63]] Error: Failed to add row to output buffer.
[SOURCE_TABLE [63]] Error: Open Database Connectivity (ODBC) error occurred.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on SOURCE_TABLE returned error code 0x80004005. 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.

Did you try data conversion in your data flow? Try to convert numeric to (DT_I2)in SSIS and then it shall work I believe

Related

SSIS Error when running and receiving data from Oracle

I am having two servers; one has SQL Server another one has Oracle. SSIS package is setup to receive data from Oracle into SQL Server.
Trying to figure out the below error.
OnError,ServerNameAB,Domain\UserID,pkgLoad_Data,{794F09AE-9188-4F94-AC4F-950361612345},{D131842F-59AF-450A-BE1E-3E7EBB812345},3/14/2022 7:26:01 PM,3/14/2022 7:26:01 PM,-1071610805,0x,An exception has occurred during data insertion, the message returned from the provider is: A transport-level error has occurred when receiving results from the server. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)
OnError,ServerNameAB,Domain\UserID,Data Flow Task,{7c7246a7-64e3-4866-9314-534074112345},{D131842F-59AF-450A-BE1E-3E7EBB812345},3/14/2022 7:26:01 PM,3/14/2022 7:26:01 PM,-1073450974,0x,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.
Troubleshooting tried:
rebooting the "receiving data" server
restarting SSMS
update: Below are the correct settings...

SSIS Failed to retrieve long data for column XXXX

I have an SSIS package (SQL 2017) that is importing data from an Access database to SQL Database.
It errors out with the following error:
[Source - MaintenanceDetails [140]] Error: Failed to retrieve long data for column "JobNotes".
[Source - MaintenanceDetails [140]] Error: There was an error with Source - MaintenanceDetails.Outputs[OLE DB Source Output] on Source - MaintenanceDetails. The column status returned was: "DBSTATUS_UNAVAILABLE".
[Source - MaintenanceDetails [140]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Source - MaintenanceDetails.Outputs[OLE DB Source Output]" failed because error code 0xC0209071 occurred, and the error row disposition on "Source - MaintenanceDetails" 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_PRIMEOUTPUTFAILED. The PrimeOutput method on Source - MaintenanceDetails returned error code 0xC0209029. 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.
I've tried the following to resolve this based off other Stackoverflow questions which hasn't fixed the problem:
1) Setting a path for "BLOBTempStoragePath" and "BufferTempStoragePath"
2) Setting AutoAdjustBufferSize to False
3) Creating an Error Output to put failed errors into another tab
4) Setting "TypeGuessRows" to 0 for "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Wow6432Node\Microsoft\Office\16.0\Access Connectivity Engine\Engines\Excel"
5) I have tried using the Import/Export Wizard within Management Studio and I get the same error message.
The Connections are using:
Native OLE DB\Microsoft Office 12.0 Access Database Engine OLE DB Provider
Native OLE DB\SQL Server Native Client 11.0
Does anyone have any other suggestions for what I could try to resolve this?
What I ended up doing was as ppijnenburg described. Once I exported the Access table to a comma separated TEXT file, SSIS had no issue dealing with it at all.
I suppose the moral of the story is importing from Access to SQL Server is messy.

SSIS errors are coming while loading the dynamic excel into ssms table

I am trying to load excel into SSMS Tables dynamically. I am facing the below issues. i kept REASON field length as max for the data type of nvarchar(max).
I tried with nvarchar(4000), still receiving the same errors.
[Excel Source [12]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E21.
An OLE DB record is available. Source: "Microsoft Access Database Engine" Hresult: 0x80040E21 Description: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".
[Excel Source [12]] Error: Failed to retrieve long data for column "REASON".
[Excel Source [12]] Error: There was an error with Excel Source.Outputs[Excel Source Output].Columns[REASON] on Excel Source.Outputs[Excel Source Output]. The column status returned was: "DBSTATUS_UNAVAILABLE".
[Excel Source [12]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Excel Source.Outputs[Excel Source Output].Columns[REASON]" failed because error code 0xC0209071 occurred, and the error row disposition on "Excel Source.Outputs[Excel Source Output].Columns[REASON]" 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_PRIMEOUTPUTFAILED. The PrimeOutput method on Excel Source returned error code 0xC0209029. 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.
I can't share the data here since it's client data. Please let me know on this will be appreciated.

How to transfer data from a text file into the database

I have data from sysssislog table in notepad (.txt) file, and I need to transfer data into the SQL server database.
I made table in sql server. Data should be to transfer in table using SSIS packages. During the work appeared to me this error.
Does anyone know how to solve it? Thanks a lot
[OLE DB Destination [113]] 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: "Violation of PRIMARY KEY constraint 'PK__sysssisl__3213E83F530E2571'. Cannot insert duplicate key in object 'dbo.sysssislog'. The duplicate key value is (0).".
[OLE DB Destination [113]] Error: SSIS Error Code
DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "OLE DB Destination.Inputs[OLE DB Destination Input]" failed because error code 0xC020907B occurred, and the error row disposition on "OLE DB Destination.Inputs[OLE DB 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 "OLE DB Destination" (113) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (126).
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.
[Flat File Source [56]] Error: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Flat File Source which returns error code 0xC02020C4. 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.
SSIS messages can be confusing at times because it looks like there are more errors than there really are. In this case, the first error is key: Violation of PRIMARY KEY constraint All of the others after it are letting you know there was at least one error preventing the task from completing.
Check your mapping and ensure that you're not entering duplicate values into whatever Primary Key you've set for the table.
You can Use BCP to Import your data into SQL Server database:
Here is a simple command for importing data from file:
C:\example.txt into table dbo.example.
bcp dbo.example in 'C:\example.txt' -T -SserverName\instanceName

SSIS 2008 R2 Completes But Gives Error "Violation of PRIMARY KEY constraint"

I've found a number of links on this but so far not the one with an answer.
Issue: SSIS 2008 R2 package importing data from many tables (about 160) of SQL 2000 database (conversion project) into new structures. This has run cleanly a number of times. To be clear, the data appears to be actually importing correctly. However, the last 3 times, I've run into this error. The Task (54) Source (269) shown in the message below is the last step and item in the step.
I've confirmed that the table mention as a "duplicate key violation" actually has the same 49166 records as the source. It seems like it almost just has issue with threading or the time that has elapsed (long running query). I have TRUNCATED the 5 tables in the final step and re-run that single Task 54 and it completes just fine, all green.
It would be good to not have to go hunting through the process due to red herrings. Any idea on how to address this so it reports cleanly?
Thanks
Error message below:
Executed as user: [masked]. Microsoft (R) SQL Server Execute Package Utility Version 10.50.6000.34 for 64-bit Copyright (C) Microsoft Corporation 2010. All rights reserved. Started: 4:36:46 PM Error: 2015-05-20 16:36:48.49 Code: 0xC0016016 Source: Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available. End Error Error: 2015-05-20 16:36:48.50 Code: 0xC0016016 Source: Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available. End Error Error: 2015-05-20 17:19:33.78 Code: 0xC0202009 Source: Data Flow Task 54 Destination 269 - cadNotificationStatus [396] Description: 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 10.0" Hresult: 0x80004005 Description: "The statement has been terminated.". An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80004005 Description: "Violation of PRIMARY KEY constraint 'PK__cadNotif__25843E4F1B0907CE'. Cannot insert duplicate key in object 'dbo.cadNotificationStatus'. The duplicate key value is (4, 2).". End Error Error: 2015-05-20 17:19:33.79 Code: 0xC0209029 Source: Data Flow Task 54 Destination 269 - cadNotificationStatus [396] Description: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "input "OLE DB Destination Input" (409)" failed because error code 0xC020907B occurred, and the error row disposition on "input "OLE DB Destination Input" (409)" 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. End Error Error: 2015-05-20 17:19:33.79 Code: 0xC0047022 Source: Data Flow Task 54 SSIS.Pipeline Description: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Destination 269 - cadNotificationStatus" (396) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (409). 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. End Error Error: 2015-05-20 17:19:33.81 Code: 0xC02020C4 Source: Data Flow Task 54 Source 269 - cadNotificationStatus [218] Description: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020. End Error Error: 2015-05-20 17:19:33.81 Code: 0xC0047038 Source: Data Flow Task 54 SSIS.Pipeline Description: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "Source 269 - cadNotificationStatus" (218) returned error code 0xC02020C4. 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. End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 4:36:46 PM Finished: 5:19:34 PM Elapsed: 2568.01 seconds. The package execution failed. The step failed.
As per the error, it is failing while to inserting duplicate records in 'dbo.cadNotificationStatus' table. Is there any logic to import only new records from source table which is in SQL 2000, which are not present in destination table? If no, data flow task importing data into this table is going to fail.
It looks like, it is running successfully because you are truncating the table and then importing the whole data again. If you can provide more info regarding source query, it will be more clear.
Just to be 100% sure I would redirect rows to a flat file that are causing you the issue. This will allow you to see what line item is causing the failure or triggering the error message. This link shows a good tutorial of how to do that:
http://www.techbrothersit.com/2013/07/ssis-how-to-redirect-invalid-rows-from.html
Also it looks like you have more going on in your error output from a security perspective based on the below:
Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information.
My guess is that someone else created this package and used: "EncryptSensitiveWithUserKey"...
I would recommend:
While importing the package to SQL Server choose Protection Level: Either
1- Don't save sensitive data.
Or
2- Rely on Server Storage and roles for access control.

Resources