Cannot load data from Excel into SQL using SSIS - sql-server

I am trying to import an excel file into the SQL server using SSIS package, but every time I try to upload this file some rows from the last don't get uploaded, to be precise 55107 should be uploaded but only 54990 gets uploaded. 117 rows are creating some problem and am not able to figure out why is that so. Please help me out in understanding this error message so that I can resolve the issue. Below is the error message I'm getting:
SSIS package "C:\Users\A670814\Documents\Visual Studio 2015\Projects\Integration Services Project1\Integration Services Project1\NDCS Towers.dtsx" starting.
Information: 0x4004300A at NDCS tower, SSIS.Pipeline: Validation phase is beginning.
Information: 0x4004300A at NDCS tower, SSIS.Pipeline: Validation phase is beginning.
Warning: 0x80049304 at NDCS tower, SSIS.Pipeline: Warning: Could not open global shared memory to communicate with performance DLL; data flow performance counters are not available. To resolve, run this package as an administrator, or on the system's console.
Information: 0x40043006 at NDCS tower, SSIS.Pipeline: Prepare for Execute phase is beginning.
Information: 0x40043007 at NDCS tower, SSIS.Pipeline: Pre-Execute phase is beginning.
Information: 0x4004300C at NDCS tower, SSIS.Pipeline: Execute phase is beginning.
Error: 0xC0202009 at NDCS tower, OLE DB Destination [280]: 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: "Unspecified error".
Error: 0xC020901C at NDCS tower, OLE DB Destination [280]: There was an error with OLE DB Destination.Inputs[OLE DB Destination Input].Columns[Copy of ID] on OLE DB Destination.Inputs[OLE DB Destination Input]. The column status returned was: "The value violated the integrity constraints for the column.".
Error: 0xC0209029 at NDCS tower, OLE DB Destination [280]: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "OLE DB Destination.Inputs[OLE DB Destination Input]" failed because error code 0xC020907D 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.
Error: 0xC0047022 at NDCS tower, SSIS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "OLE DB Destination" (280) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (293). 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.
Error: 0xC02020C4 at NDCS tower, Excel Source [156]: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020.
Error: 0xC0047038 at NDCS tower, SSIS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Excel Source 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.
Information: 0x40043008 at NDCS tower, SSIS.Pipeline: Post Execute phase is beginning.
Information: 0x4004300B at NDCS tower, SSIS.Pipeline: "OLE DB Destination" wrote 55107 rows.
Information: 0x40043009 at NDCS tower, SSIS.Pipeline: Cleanup phase is beginning.
Task failed: NDCS tower
Warning: 0x80019002 at NDCS Towers: 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\A670814\Documents\Visual Studio 2015\Projects\Integration Services Project1\Integration Services Project1\NDCS Towers.dtsx" finished: Failure.

There was an error with OLE DB Destination.Inputs[OLE DB Destination Input].Columns[Copy of ID] on OLE DB Destination.Inputs[OLE DB Destination Input]. The column status returned was: "The value violated the integrity constraints for the column.".
It looks there are many rows where [Copy of ID] column is null, or there are some constraints on the [Copy of ID] column in SQL server that are violated in some rows in the excel files.
Try deleting rows that contains no data in [Copy of ID] column, or you can filter them by adding a conditional split component and filter on the following consition
ISNULL([Copy of ID])
Or you can access to the destination SQL table using Sql server management studio, and go to the SQL table design mode, and check the option Allow null for the column [Copy of ID]
Similar Question with many useful answers: The value violated the integrity constraints for the column

Related

SSIS Package potential loss of data only in catalog

I have a package and in the Data Flow the Source Task selects data and one of the columns is ProcessingTime and is of type datetime2(7). After some checks and derived columns there is a Slowly Changing Dimension task. Which branch into 'Insert Destination' and 'Update Destination'
Now the problem is that when i run the package from a sql job I get flowing error:
Description = SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Insert Destination" (11) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (24). 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.
Description = SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Insert Destination.Inputs[OLE DB Destination Input]" failed because error code 0xC0209077 occurred, and the error row disposition on "Insert 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.
Description = There was an error with Insert Destination.Inputs[OLE DB Destination Input].Columns[ProcessingTime] on Insert Destination.Inputs[OLE DB Destination Input]. The column status returned was: "The value could not be converted because of a potential loss of data.".
Description = SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E21. An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80040E21 Description: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.".
And the bigger problem is this error does not occur in any Visual Studio or using 'Run Package...' in the catalog, only from the job.
I checked the type of the Source as the Insert Destination and both has the type DT_DBTIMESTAMP2 with scale 7.
I configured a custom 'If not exists then insert else update'-task but I'd like the native SCD task. Any suggestions? Version of SSIS is 13 (2016 version).

SSIS fails when exporting from OLEDB data to Excel File

When debugging it sais in the Output:
SSIS package "C:\Users\UserA\Documents\Visual Studio
2015\Projects\eSSIS\eSSIS\Package1.dtsx" starting.
Information: 0x4004300A at Data Flow Task 1, SSIS.Pipeline: Validation
phase is beginning. Information: 0x4004300A at Data Flow Task 1,
SSIS.Pipeline: Validation phase is beginning. Information: 0x40043006
at Data Flow Task 1, SSIS.Pipeline: Prepare for Execute phase is
beginning. Information: 0x40043007 at Data Flow Task 1, SSIS.Pipeline:
Pre-Execute phase is beginning. Error: 0xC0202009 at Data Flow Task 1,
Excel Destination 2: 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.". Error: 0xC002F445 at Data Flow Task 1, Excel Destination 2:
An error occurred while setting up a binding for the
"ShortDescription" column. The binding status was "DT_NTEXT". Error:
0xC0202025 at Data Flow Task 1, Excel Destination 2: Cannot create
an OLE DB accessor. Verify that the column metadata is valid. Error:
0xC004701A at Data Flow Task 1, SSIS.Pipeline: Excel Destination
failed the pre-execute phase and returned error code 0xC0202025.
Information: 0x4004300B at Data Flow Task 1, SSIS.Pipeline: "Excel
Destination" wrote 0 rows. Information: 0x40043009 at Data Flow Task
1, SSIS.Pipeline: Cleanup phase is beginning. Task failed: Data Flow
Task 1 Warning: 0x80019002 at Package1: SSIS Warning Code
DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but
the number of errors raised (4) 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\UserA\Documents\Visual Studio
2015\Projects\eSSIS\eSSIS\Package1.dtsx" finished: Failure.
The program '[11704] DtsDebugHost.exe: DTS' has exited with code 0
(0x0).
Someone gave the answer below on this link:
You have to include the account you use to execute the package in the
performance counters group.
I would like to try out this workaround/answer but don't know how to include the account to execute a package. Please help

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 Student, ETL Staging Process

I'm trying to perform a ETL Staging Process but keep running into this error. Turning off UAC as Microsoft suggests, setting XACT ABORT ON and all other things, nothing helps.
This is the error I get when I start debugging it on Visual Studio. Would really appreciate some assistance.
SSIS package "D:\Demofiles\Lab01\Starter\AdventureWorksETL\Stage Data.dtsx" starting.
Executing ExecutePackageTask: D:\Demofiles\Lab01\Starter\AdventureWorksETL\Extract Internet Sales Data.dtsx
Information: 0x4004300A at Extract Customers, SSIS.Pipeline: Validation phase is beginning.
Information: 0x4004300A at Extract Internet Sales, SSIS.Pipeline: Validation phase is beginning.
Information: 0x4004300A at Extract Customers, SSIS.Pipeline: Validation phase is beginning.
Information: 0x4004300A at Extract Internet Sales, SSIS.Pipeline: Validation phase is beginning.
Information: 0x4001100A at Extract Internet Sales Data: Starting distributed transaction for this container.
Information: 0x4004300A at Extract Customers, SSIS.Pipeline: Validation phase is beginning.
Information: 0x40043006 at Extract Customers, SSIS.Pipeline: Prepare for Execute phase is beginning.
Information: 0x40043007 at Extract Customers, SSIS.Pipeline: Pre-Execute phase is beginning.
Error: 0xC0202009 at Extract Customers, Customers [2]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E37.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80040E37 Description: "Invalid object name 'cdc.lsn_time_mapping'.".
Error: 0xC004701A at Extract Customers, SSIS.Pipeline: Customers failed the pre-execute phase and returned error code 0x80040E37.
Information: 0x4004300B at Extract Customers, SSIS.Pipeline: "Staging DB" wrote 0 rows.
Information: 0x40043009 at Extract Customers, SSIS.Pipeline: Cleanup phase is beginning.
Task failed: Extract Customers
Information: 0x4001100C at Extract Customers: Aborting the current distributed transaction.
Information: 0x4001100C at Extract Internet Sales Data: Aborting the current distributed transaction.
Task failed: Stage Internet Sales
Warning: 0x80019002 at Stage Data: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (2) 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 "D:\Demofiles\Lab01\Starter\AdventureWorksETL\Stage Data.dtsx" finished: Failure.
The program '[6628] DtsDebugHost.exe: DTS' has exited with code 0 (0x0).
The first line with Error in it specifies
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80040E37 Description: "Invalid object name 'cdc.lsn_time_mapping'.".
Your SSIS package errors, because the table cdc.lsn_time_mapping doesn't exist in target of your OLE DB connection. Did you specify the correct target database ?

what is Unspecified error in ssis

The ssis package consists of OLED source and OLEDB destination.Extract data from a sql 2000 server source db and load it into same database target database table.while loading 4 million rows,got error after 3 million rows..
it took 4 hours to load these many records using ssis...
please see the below error
[Ae_Data [737]] 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 10.0" Hresult: 0x80004005 Description: "Unspecified error".
[Ae_Data [737]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "input "OLE DB Destination Input" (750)" failed because error code 0xC020907B occurred, and the error row disposition on "input "OLE DB Destination Input" (750)" 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.
try changing it to a ADO.NET Destination
I had a similar issue today and non of the internet posts worked for me. The error I was getting to is similar to yours. I'm posting in case someone else has the same problem
Error: 0xC0202009 at Get fresh data, OLE DB Destination [2]: 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: "Unspecified error".
Error: 0xC0209029 at Get fresh data, OLE DB Destination [2]: 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.
Error: 0xC0047022 at Get fresh data, SSIS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "OLE DB Destination" (2) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (15). 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.
This was happening when doing an OLE DB transfer from one table to another. The problem was with the destination's table index
Tried to drill down on a particular record that was giving the problem and identified which fields were giving the problems. I managed to do through a number of trial and errors. By amending the source sql query to select different fields, until I found out which field(s) were giving me the insert problems.
Then deleted any associated indexes on that particular destination and it worked

Resources