SSIS Failed to retrieve long data for column XXXX - sql-server

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.

Related

Getting "External table is not in the expected format." error while trying to import an Excel File in SSIS

I am trying to import an Excel file (.xls) via SSIS to a table in SQL Server. But SSIS doesn't seem to recognize the file as a valid Excel file. I get the following errors:
Error 1:
[Excel Source [86]] Error: SSIS
Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.
The AcquireConnection method call to the connection manager "Carga Base Original" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
Error 2:
[SSIS.Pipeline]
Error: Excel Source failed validation and returned error code 0xC020801C.
Error 3:
[Connection manager "Carga Base Original"] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available.
Source: "Microsoft Access Database Engine"
Hresult: 0x80004005
Description: "External table is not in the expected format".
My connection manager properties is an Excel Source, its properties look like this:
I am passing the Excel file path through a variable. The Excel file looks OK and is not corrupted. I tried to put a fix Excel path, try to put it in Connection String property (fix path and variable), but nothing of this helped.
Can anyone please help me?
The main error is:
External table is not in the expected format
This happens when the Excel file is corrupted and cannot be opened by Access Database Engine (OLE DB provider) even if you can open the file from Excel. In a similar case opening the file manually and saving it as a new file may do the trick.
In my case saving the mail-merged reference Excel file as .xls (Excel 97 - 2003) worked. .xlsx provoked the "External table is not in expected format" error message but .xls did not.

SSIS Package Inoperable After Upgrade of Visual Studio

I am having an issue with one of my SSIS projects. I developed this package over a year ago and it has run flawlessly until I upgraded Visual Studio. The original project was in VS Shell 2010. My new version is VS 2017 Pro.
The setup is pretty basic. I am pulling data from a database file (.db) using an ADO.NET source via SQLite3 ODBC driver. It pulls each table and inserts the data into a MS SQL Server table. The Target Server Version is set to SQL Server 2012. It is encrypted with password. When I say I have tried to execute the package, I'm talking within VS.
Here is the issue:
Upon executing, the package will execute the SQL statements that start the processes, when I get to the first data flow that has a pull from the database, a command window flashed briefly and closes. The package completes in error:
[Assignments [290]] Error: The Assignments was unable to process the data. Object reference not set to an instance of an object.
[Resources [801]] Error: The Resources was unable to process the data. Object reference not set to an instance of an object.
[Entries [657]] Error: The Entries was unable to process the data. Object reference not set to an instance of an object.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Resources 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.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Entries 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.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Assignments 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.
[Projects [711]] Error: The error "Column data type 66203200 is not supported by the PipelineBuffer class." occurred while processing "Projects.Outputs[ADO NET Source Output].Columns[project_id]".
[Projects [711]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Projects" failed because error code 0x80131600 occurred, and the error row disposition on "Projects.Outputs[ADO NET Source Output].Columns[project_id]" 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.
[Projects [711]] Error: The Projects was unable to process the data. Pipeline component has returned HRESULT error code 0xC0209029 from a method call.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Projects 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.
The odd things is, only some of the data sources in the Data Flow are having issues (3/6).
Here is a list of what I have changed/tired:
- I rebuilt the entire solution using VS 2017 (this worked for ~1 week)
- I tested the ODBC driver(s) (32/64). Both successful.
- I upgraded the project when opening for the first time.
- I recreated the source connection.
- I deleted and recreated the data flow.
- I deleted and recreated each data source. (Preview of data is successful)
- I updated VS to most current patching.
Nothing has worked! Any input would help.

Issues Looping through Excel Files in SSIS 2012 (Foreach ETL)

I am trying to process Excel files (2007 .XLSX) in a directory on the local machine. There have been a number of issues that have come up of which I will list. Before that let me explain what I want to do and how I have set things up and all my attempts so far.
Set Up
Microsoft Visual Studio 2012
Microsoft Windows 7 (32 bit)
Goal
Create a simple ETL to loop through Excel files in a folder and load data into a SQL server table.
Current Attempts
Note: I am very much familiar with programming and especially loops, however in SSIS I am struggling to get the Excel file from even being read.
I have tried and am doing the following:
Created a package
Created a FOREACH loop container task
FOREACH Loop Task
Set as Foreach File Enumerator
Expression assigns the Directory to the variable which has the value of the directory ('C:\Users\Me\Desktop\Excels\')
Under Variable Mappings I have specified a variable at index 0
Set to using File and Extension
For the moment I am looking at all files (.)
Note: I have used watch on debug to determine if the variables get populated. Now I have tried an expression task to build the full path before moving onto the data flow as well as just using the two variables assigned.
Data Flow (after FOREACH loop container)
Set up Excel File Source
Set up OLE DB Destination
Excel Source (inside Data Flow as the first task)
Set up the columns initially using one of the files (preview and input/output's are shown)
Note: Data is shown so the connection seems fine
Excel Source Connection Manager
DELAY VALIDATION = TRUE
EXPRESSIONS = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + #[User::excelFullPath] + "Extended Properties='EXCEL 12.0 XML;HDR=YES';"
ExcelFilePath = #[User::excelFullPath]
FirstRowHasColumnName = TRUE
Note: I have tried a combination of using the connection string and the excel file path property. I have tried those on their own.
Note: I have two Excel files in the folder for the moment. They are identical with different file names and YES the columns are the same.
Errors Received
The latest error upon RUN is:
SSIS package "C:\Users\biadmin\Desktop\0006AssocImport\0006AssocImport\Package.dtsx" starting.
Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning.
Error: 0xC0202009 at Data Flow Task, Excel Source 1 [2]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E37.
Error: 0xC02020E8 at Data Flow Task, Excel Source 1 [2]: Opening a rowset for "MAIN$" failed. Check that the object exists in the database.
Error: 0xC004706B at Data Flow Task, SSIS.Pipeline: "Excel Source 1" failed validation and returned validation status "VS_ISBROKEN".
Error: 0xC004700C at Data Flow Task, SSIS.Pipeline: One or more component failed validation.
Error: 0xC0024107 at Data Flow Task: There were errors during task validation.
Warning: 0x80019002 at Foreach Loop Container: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (6) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
Warning: 0x80019002 at Package: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (6) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "C:\Users\biadmin\Desktop\0006AssocImport\0006AssocImport\Package.dtsx" finished: Failure.
The program '[6272] DtsDebugHost.exe: DTS' has exited with code 0 (0x0).
Another Error Received Earlier
SSIS package "C:\Users\biadmin\Desktop\0006AssocImport\0006AssocImport\Package.dtsx" starting.
Information: 0x4004300A at Import RAW Excel Data, SSIS.Pipeline: Validation phase is beginning.
Error: 0xC0202009 at Package, Connection manager "Excel Connection Manager": SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft Access Database Engine" Hresult: 0x80004005 Description: "Could not find installable ISAM.".
Error: 0xC020801C at Import RAW Excel Data, Excel Source [2]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
Error: 0xC0047017 at Import RAW Excel Data, SSIS.Pipeline: Excel Source failed validation and returned error code 0xC020801C.
Error: 0xC004700C at Import RAW Excel Data, SSIS.Pipeline: One or more component failed validation.
Error: 0xC0024107 at Import RAW Excel Data: There were errors during task validation.
Warning: 0x80019002 at Foreach Loop Container: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (5) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
Warning: 0x80019002 at Package: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (5) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
SSIS package "C:\Users\biadmin\Desktop\0006AssocImport\0006AssocImport\Package.dtsx" finished: Failure.
These are not all the errors received (I did not record all of them) but at the moment its just failing on one particular error at a time.
Note
I have seen quite a few YouTube tutorials and read a few outlining the exact steps. I have seen one where they set the connection manager from a Script task before getting to the Data Flow task. I saw one where the ConnectionString property was set only to the variable that holds the Excel File Path.
Questions
What am I missing in my set up
After configuring the connection manager to look at a variable for the file is there anyway of still configuring inputs and outputs on the Excel Source task because at the moment its showing an error
What is the developer preference in SSIS for this sort of situation where I prefer to see the column mappings on the configuration box (Script or Flow)

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.

SSIS failing to get column value and setting it to NULL

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

Resources