SSIS Package Execution Error: Exception has been thrown by the target of an invocation

  • My SSIS project, developed in Visual Studio 2012 under my Windows user account, includes two packages, SendMailOnly.dtsx and SendMailWithAttachment.dtsx. Both packages use a Script Task to send out an email. The first one has no attachment, and the second one has. Both packages run fine in my development environment.

    The project is then deployed to SQL Server Integration Service Catalogs, on a network SQL Server. From there, the packages are called through a SQL Server Agent job using my windows account. The first package is executed successfully, but the second one failed. The error message stated that "Script Task Error: Exception has been thrown by the target of an invocation".

    I did some researches online, and didn't find a solution.  It seemed to be a user permission issue,  however, how can I verify that? My Windows user account has read/write access to both SQL Server and the server where attachment file stored.

    Please advise and thanks in advance.

  • jay-125866 - Thursday, February 16, 2017 1:09 PM

    My SSIS project, developed in Visual Studio 2012 under my Windows user account, includes two packages, SendMailOnly.dtsx and SendMailWithAttachment.dtsx. Both packages use a Script Task to send out an email. The first one has no attachment, and the second one has. Both packages run fine in my development environment.

    The project is then deployed to SQL Server Integration Service Catalogs, on a network SQL Server. From there, the packages are called through a SQL Server Agent job using my windows account. The first package is executed successfully, but the second one failed. The error message stated that "Script Task Error: Exception has been thrown by the target of an invocation".

    I did some researches online, and didn't find a solution.  It seemed to be a user permission issue,  however, how can I verify that? My Windows user account has read/write access to both SQL Server and the server where attachment file stored.

    Please advise and thanks in advance.

    Why is SQL Server agent using your domain account details, and not a domain service account?

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • Thanks for reply.
    I'm going to ask our network administrator for advises.  Also, can you recommend a few online references about domain service account?

  • jay-125866 - Thursday, February 16, 2017 1:38 PM

    Thanks for reply.
    I'm going to ask our network administrator for advises.  Also, can you recommend a few online references about domain service account?

    Sounds like a question for the DBAs out there ...

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

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

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