job ssis in ssms versus local solution - ssis

I have a job ssis that truncate a table and insert into this table.
When i launch the package in visual studio, all works well but when I put the job on sql server and launch it with ssms, it doesn't works. there is a primary key conflict when inserting..so i'm asking why its working in visual studio and not on sql management studio..
I log one table after the truncate and the count return 0 rows..so the truncable command works well.
I use the same user to launch the package in visual studio or ssms.
I use ole db datasource and destination.
here is the complete error message :
Executed as user: DOMAIN\USER. Microsoft (R) SQL Server Execute Package Utility Version 13.0.5149.0 for 64-bit Copyright (C) 2016 Microsoft. All rights reserved. Started: 14:46:04 Error: 2018-10-11 14:46:08.01 Code: 0xC0202009 Source: Data Flow Component OLE DB Destination [104] 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 11.0" Hresult: 0x80004005 Description: "The statement has been terminated.". An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Violation of PRIMARY KEY constraint 'PK_STA_TABLE'. Cannot insert duplicate key in object 'dbo.STA_TABLE'. The duplicate key value is (19).". End Error Error: 2018-10-11 14:46:08.01 Code: 0xC0209029 Source: Data Flow Component OLE DB Destination [104] Description: 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. End Error Error: 2018-10-11 14:46:08.01 Code: 0xC0047022 Source: Data Flow Component SSIS.Pipeline Description: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "OLE DB Destination" (104) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (117). 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: 2018-10-11 14:46:09.50 Code: 0xC02020C4 Source: Data Flow Component Data Source T_TABLE [2] Description: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020. End Error Error: 2018-10-11 14:46:09.50 Code: 0xC0047038 Source: Data Flow Component SSIS.Pipeline Description: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Data Source T_TABLE 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: 14:46:04 Finished: 14:46:10 Elapsed: 5.781 seconds. The package execution failed. The step failed.
Thank you.

Related

Is it possible to continue the SSIS if one OLE DB source is offline? Always got this error

TITLE: Package Validation Error
Package Validation Error
ADDITIONAL INFORMATION:
Error at Data Flow Task 1 [EA OLE DB Source [191]]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "ea.prenlyn.net.ROWriter.RowReadOnly3P" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
Error at Data Flow Task 1 [SSIS.Pipeline]: EA OLE DB Source failed validation and returned error code 0xC020801C.
Error at Data Flow Task 1 [SSIS.Pipeline]: One or more component failed validation.
Error at Data Flow Task 1: There were errors during task validation.
Error at Package [Connection manager "ea.prenlyn.net.ROWriter.RowReadOnly3P"]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft OLE DB Driver for SQL Server" Hresult: 0x80004005 Description: "Login timeout expired".
An OLE DB record is available. Source: "Microsoft OLE DB Driver for SQL Server" 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 OLE DB Driver for SQL Server" Hresult: 0x80004005 Description: "Named Pipes Provider: Could not open a connection to SQL Server [53]. ".
(Microsoft.DataTransformationServices.VsIntegration)
BUTTONS:
OK
Created a data flow with 3 sources of db from different OLE DB. Just try to disconnect one OLE DB and SSIS will not proceed. Is there a solution to not include the OLE DB that goes offline?

Violation of PRIMARY KEY constraint error on import of Data

I have a table in SQL Server called Services. It has a primary key on the Service_ID field.
I deleted some data and am trying to reimport data from a CSV file.
I am getting the errors below. It mentions a violation of Primary Key.
However if I query the table searching for a record with that Service_ID value then it does not find it - results are empty. So why am I getting this error?
Copying to [dbo].[Services] (Error)
Messages
Error 0xc0202009: Data Flow Task 1: 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: "The statement has been terminated.".
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Violation of PRIMARY KEY constraint 'PK_Services'. Cannot insert duplicate key in object 'dbo.Services'. The duplicate key value is (538629).".
(SQL Server Import and Export Wizard)
Error 0xc0209029: Data Flow Task 1: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Destination - Services.Inputs[Destination Input]" failed because error code 0xC020907B occurred, and the error row disposition on "Destination - Services.Inputs[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.
(SQL Server Import and Export Wizard)
Error 0xc0047022: Data Flow Task 1: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Destination - Services" (90) failed with error code 0xC0209029 while processing input "Destination Input" (103). 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.
(SQL Server Import and Export Wizard)
Error 0xc02020c4: Data Flow Task 1: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020.
(SQL Server Import and Export Wizard)
Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Source - Services_csv 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.
(SQL Server Import and Export Wizard)
Duplicate key was in my import data not the table.

SSIS OLE Destination several error output

I have a problem...
I have an OLE DB error that occurred in INSERT statement than conflicted with the FOREIGN KEY constraint.
SSIS package eturn this 3 errors:
[OLE_DEST PollOptionUserResult [43]] 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: "The statement has been terminated.".
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "The INSERT statement conflicted with the FOREIGN KEY constraint "FK_PollOptionUserResult_PollUserResult". The conflict occurred in database "dw_ismsES", table "ten.PollUserResult", column 'PollUserResultID'.".
[OLE_DEST PollOptionUserResult [43]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "OLE_DEST PollOptionUserResult.Inputs[OLE DB Destination Input]" failed because error code 0xC020907B occurred, and the error row disposition on "OLE_DEST PollOptionUserResult.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_DEST PollOptionUserResult" (43) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (56). 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.
When I try redirect error to my error_table, it internally for some reason take the last one and no the first one I need.
How I can obligate it to take the first one error?
In my case (SSIS 2008), I created an OnError event in the package level, so every error happening in the package would be logged, regardless of where they happened. When I take this approach, all 3 errors should be logged in my error table. I.e.
Please try this approach and see what you get.

SSIS Error Code DTS_E_OLEDBERROR: 0xC0202009

I created a new package today, it gets info passed down from a Master package that runs other packages as well. My master package pulls the connection info from a config file at runtime. Protection level = DontSaveSensitive. Using Windows Authentication. It works fine locally but when I run it from a job it gives me the error below.
Any ideas or constructive comments are welcome!
Code: 0xC0202009 Source: DFT - Insert Into StageSites Source DB TEICommon [1] Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E14. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80040E14 Description: "Statement(s) could not be prepared.". An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80040E14 Description: "Invalid column name 'SuspendedDate'.". An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80040E14 Description: "Invalid column name 'FirstShipmentDate'.". End Error Error: 2016-10-28 10:38:02.50 Code: 0xC004706B Source: DFT - Insert Into StageSites SSIS.Pipeline Description: "component "Source DB TEICommon" (1)" failed validation and returned validation status "VS_ISBROKEN". End Error Error: 2016-10-28 10:38:02.50 Code: 0xC004700C Source: DFT - Insert Into StageSites SSIS.Pipeline Description: One or more component failed validation. End Error Error: 2016-10-28 10:38:02.50 Code: 0xC0024107 Source: DFT - Insert Into StageSites Description: There were errors during task validation. End Error
Update: [Fixed]
I solved the issue by updating my schema in the database my ETL query was pulling from.
Here are your actual errors:
"Invalid column name 'SuspendedDate'.".
"Invalid column name 'FirstShipmentDate'.".
You are querying a table (in the component Insert Into StageSites) , expecting those columns to exist when they do not. Since you say it works locally but not from a job, the most likely explanation is that your DataSource is connecting to a different server when the job runs it than the one it connects to locally. Check the connection string in the .config file on the server that the job points to.

how to deploy SSIS package to sql server instance

i have created one SSIS package for importing data from Excel to Sql DB.
i also deployed it on SQL SERVER Instance,but when i am runing that package throw job its gives some error.
ERROR: "Microsoft (R) SQL Server Execute Package Utility Version 10.50.2500.0 for 32-bit Copyright (C) Microsoft Corporation 2010.
All rights reserved. Started: 11:03:12 Error: 2013-03-19 11:03:12.84 Code: 0xC0202009
Source: Package2 Connection manager "Excel Connection Manager" Description: SSIS Error Code DTS_E_OLEDBERROR.
An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available.
Source: "Microsoft JET Database Engine" Hresult: 0x80004005
Description: "The Microsoft Jet database engine cannot open the file ''.
It is already opened exclusively by another user<c/> or you need permission to view its data.".
End Error Error: 2013-03-19 11:03:12.84 Code: 0xC020801C
Source: Creating Staging for Data Excel Data Source [1]
Description: 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.
End Error Error: 2013-03-19 11:03:12.84 Code: 0xC0047017
Source: Creating Staging for Data SSIS.Pipeline
Description: component "Excel Data Source" (1) failed validation and returned error code 0xC020801C.
End Error Error: 2013-03-19 11:03:12.84 Code: 0xC004700C
Source: Creating Staging for Data SSIS.Pipeline Description: One or more component failed validation.
End Error Error: 2013-03-19 11:03:12.84 Code: 0xC0024107
Source: Creating Staging for Data Description: There were errors during task validation.
End Error DTExec: The package execution returned DTSER_FAILURE (1).
Started: 11:03:12 Finished: 11:03:12 Elapsed: 0.219 seconds.
The package execution failed. The step failed.,00:00:00,0,0,,,,0
I am using 32 bit OS,.XLS Excel file for import,which is MS EXCEL 2003.
I need solution cananybody help me....???
The reason your package is failing is because you have the excel file open. Close the file and try running the package again.
Error Message: "The Microsoft Jet database engine cannot open the file ''.
It is already opened exclusively by another user or you need permission to view its data.".