user2774034
user2774034

Reputation: 21

Exception has been thrown by the target of an invocation in SSIS

I have a SQL job created on SQL Server Agent with Type:Operating System(CmdExec). I have the following error in the log file generated.

Source: ST_CheckSrcFile Description: Exception has been thrown by the target of an invocation.

And this is executed correctly when the command line is executed on the Server System thru cmd.

Anybody have a clue why this could be happening?

Upvotes: 1

Views: 11695

Answers (1)

billinkc
billinkc

Reputation: 61211

Yes, you have a coding issue. What that issue is, cannot be determined from your question's current lack of detail.

Since it works fine outside of Agent but fails from within, my prime assumption would be that you are accessing a file or network resource and the account SQL Agent uses, or the designated proxy for Job Steps of type CmdExec, do not have access to the resource.

It could resolved by simply using a UNC instead of a mapped drive letter or by granting the acccount rights to file system on the location machine or a myriad of other approaches but unless we know what the code is doing, we can't be more specific than this.

Upvotes: 5

Related Questions