SQL Job not failing SSIS package when it should be

  • Hi,

    I have something strange going on with a SQL Job.
    Step 1 runs a SSIS package, when I run this locally it fails due to a Primary Key Violation trying to insert a record into a table when this job runs on the server it goes to the next step but should fail, if I look at the history of the step it mentions about the Primary Key Violation but does not force it to fail, is it something wrong with the SQL Job step or the SSIS package?
    Below is the message for Step

    Message
    Executed as user: SCH\SQL_Serv. Microsoft (R) SQL Server Execute Package Utility Version 10.50.1600.1 for 32-bit Copyright (C) Microsoft Corporation 2010. All rights reserved. Started: 10:31:54 Error: 2017-10-27 10:33:43.08 Code: 0xC0202009 Source: Load into Live OLE DB Destination 1 [4259] 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_OrderDetails_1'. Cannot insert duplicate key in object 'OrderDetails'.". End Error Error: 2017-10-27 10:33:43.08 Code: 0xC0209029 Source: Load into Live OLE DB Destination 1 [4259] Description: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "input "OLE DB Destination Input" (4272)" failed because error code 0xC020907B occurred, and the error row disposition on "input "OLE DB Destination Input" (4272)" 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: 2017-10-27 10:33:43.08 Code: 0xC0047022 Source: Load into Live SSIS.Pipeline Description: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "OLE DB Destination 1" (4259) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (4272). 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: 2017-10-27 10:33:43.08 Code: 0xC02020C4 Source: Load into Live OLE DB Source [1] Description: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020. End Error Error: 2017-10-27 10:33:43.08 Code: 0xC0047038 Source: Load into Live SSIS.Pipeline Description: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "OLE DB Source" (1) 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_SUCCESS (0). Started: 10:31:54 Finished: 10:33:43 Elapsed: 109.014 seconds. The package executed successfully. The step succeeded.

    Thanks

  • Have a look at some of the suggestions in this link:
    https://www.sqlservercentral.com/Forums/Topic1556669-148-1.aspx

  • What do you have your agent job set to on completion on step failure? I'll hazard a guess that you have it set as proceed to next step, rather that Exit reporting failure.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Paulo de Jesus - Friday, October 27, 2017 5:11 AM

    Have a look at some of the suggestions in this link:
    https://www.sqlservercentral.com/Forums/Topic1556669-148-1.aspx

    Thanks I went too the Properties of the Package and changed the MaximumErrorCount from 0 to 1 and then changed the PackagetType from Default to DTSDesigner100, deployed the package to the server reran the step and it has now failed. 

    Thanks for everyones reply.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply