SSIS Package Runs from Catalog, not from SQL Server Agent (Same User)

二次信任 提交于 2020-02-05 02:39:07

问题


I have a SSIS package, developed for SQL Server 2012, that uses a script component to open an Excel workbook and execute a macro. This package runs in visual studio, and I am able to deploy to SQL Server 2012.

In SQL Server, I am able to execute the package by selecting it from the Integration Services Catalogs and Right Click --> Execute... (with 32-bit runtime). I understand that this executes the package as the user that I am logged in to the server as. The package executes successfully in this scenario.

When I create a SQL Server Agent job to execute the package nightly, I have created a proxy user with the same domain user that I used to log into the SQL server it fails with the following error:

The Execute method on the task returned error code 0x80070002 (Could not load file or assembly 'Microsoft.VisualStudio.Tools.Applications, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.). The Execute method must succeed, and indicate the result using an "out" parameter.

I have ensured that the SQL Server Agent job is also using the 32-bit runtime. Since the proxy user is also the user that I logged into the SQL Server with, I do not believe it is a permissions issue (at least for that user).

Does SQL Server Agent have other permissions that need to be granted?


回答1:


Try giving read/write permissions to the SQL Database Engine Service account NT SERVICE\MSSQL$<Instance Name> (Where <Instance Name> should be replaced by the installed instance name):

  • Configure File System Permissions for Database Engine Access
  • SSIS - Problems while executing package from SQL Server Agent Job



回答2:


It appears that the issue was with the service account attempting to open Excel. I updated the DCOM to use a specified user to open excel, based on this answer, and the job will now run via SQL Server Agent.




回答3:


I found that:

Enter "Job step properties"

There enter "Configuration" -> "Advanced"

and check "32-bit runtime"

Solved my issue.



来源:https://stackoverflow.com/questions/57186227/ssis-package-runs-from-catalog-not-from-sql-server-agent-same-user

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!