I deployed ssis package on sql server 2012. Thereafter scheduled a sql job to run this ssis package weekly. When I started a job for the first time, it failed with following error.
The job failed. The Job was invoked by User MyDomain\MyUserName. The last step to run was step 1 (scheduling ssis package).
I am sure there is some issue with permissions, however I am not able to resolve this.
This package is deleting a content of a folder present on my desktop. SQL Server instance is running on my machine. I am on a standalone machine.
After searching lot of articles I got an article which helped me identifying actual error :- Identifying issue
Login sql server instance
Navigate to Integration Service Catalogs
Right Click on your SSISDB catalog and select All Reports -> Standard reports -> All Executions
For your folder, click on All Messages for failed task
Here you will see your error
In my case error was "Access to path 'C:\Users\MyUser\Desktop\Test Folder' is denied". To note there is a section Caller in this report who is trying to access this folder, in my case it was
NT SERVICE\SQLSERVERAGENT
.
Go to this folder, right click -> Properties -> Security Under Group/username click Edit -> Inside new pop up Add new user Now if you are trying to find NT SERVICE\SQLSERVERAGENT user, you won't find since its under a service account which means you will see a user named
SERVICE
. This is the user you need to add to this folder.
As soon as I added this, my job started running :)
我在sql server 2012上部署了sis软件包。此后,安排了一个sql作业每周运行一次此sis软件包。
当我第一次开始工作时,它失败并出现以下错误。
工作失败。作业由用户MyDomain\MyUserName调用。
的最后一步是步骤1(计划sis软件包)。
在我的情况下,错误是"访问路径'C: "用户""我的用户""桌面""测试文件夹"被拒绝"。请注意,此报告中有一个"呼叫者"部分正在尝试访问此文件夹,在我的情况下是
NT SERVICE\SQLSERVERAGENT
。
转到此文件夹,右键单击->属性->安全
在"组/用户名"下,单击"编辑"->在新弹出窗口中添加新用户
现在,如果您要查找NT SERVICE\SQLSERVERAGENT用户,您将找不到该帐户,因为该帐户位于服务帐户下,这意味着您将看到一个名为
SERVICE
的用户。这是您需要添加到此文件夹的用户。
我添加此代码后,我的工作开始运行:)