Krish
Krish

Reputation: 319

Error on C# script component of an SSIS package callled from an SQL Server agent Job

I have a C# script that is being called from an SSIS package. This script compresses files in a folderA and saves the compressed file to folderB.

When I run this SSIS package(that calls the C# script) manually from Microsoft Visual Studio, it runs successfully. However, once I deploy this package to the SSIS DB of my database server and create an SQL Server Agent Job and run this job, the package calling the C# script fails.

When I try to check the 'All Executions' report of the running SSIS project, I notice there is an error message saying, Exception has been thrown by the target of an invocation

This error message is not really informative thus, I do not know why this error happens.

Any ideas on why this error occurs or help to further narrow down my investigation?

Thank you very much!

Upvotes: 0

Views: 517

Answers (1)

Krish
Krish

Reputation: 319

The problem was because the SQL service agent was not granted write permission to the folder where the compressed file should be saved.

Upvotes: 2

Related Questions