SSIS package fails in SQL Agent Job but not at design time

  • I have a simple lookup transformation and direct no matching rows to destination.  I've verified a million times, there are no duplicate key, and package runs perfectly during design time.  But once I run the package through SQL agent job, I'm getting duplicate key error as if lookup transformation is skipped.

    Error message:

    Executed as user: xxxxx/xxxx. Microsoft (R) SQL Server Execute Package Utility Version 15.0.4178.1 for 32-bit Copyright (C) 2019 Microsoft. All rights reserved. Started: 11:15:00 AM Error: 2021-12-01 11:15:10.58 Code: 0xC0202009 Source: Microsite GL Monthly Data Load OLE DB Destination [67] 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__GLJourna__6AD8EB82D6888BE6'. Cannot insert duplicate key in object 'dbo.GLJournalStage'. The duplicate key value is (400-11100020211).". End Error Error: 2021-12-01 11:15:10.58 Code: 0xC0209029 Source: Microsite GL Monthly Data Load OLE DB Destination [67] 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: 2021-12-01 11:15:10.59 Code: 0xC0047022 Source: Microsite GL Monthly Data Load SSIS.Pipeline Description: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "OLE DB Destination" (67) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (80). 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 DTExec: The package execution returned DTSER_FAILURE (1). Started: 11:15:00 AM Finished: 11:15:10 AM Elapsed: 9.672 seconds. The package execution failed. The step failed.

  • Got it working.  I completely forgot I need to create a proxy account!

Viewing 2 posts - 1 through 1 (of 1 total)

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