SSIS job fails when run remotely thru ssms, but runs fine on SQL Server

孤街浪徒 提交于 2020-05-13 18:05:19

问题


Installed SQL Server 2016 on a dev box, with SSIS.
Have a package that loops thru a directory and validates XML files.

The job runs fine on the SQL Server from the Integration Services Catalog and from SQL Server Agent, when executed there. Also runs fine in the local developers PC's.

The issue comes in if you connect to the SQL Server via SSMS remotely, (Same user) and try to execute the package via Integration Services Catalog, it runs but fails to loop thru files. It gives the following error: ForEach Error/Warning

But when executed on the SQL Server or thru the SQL Server Agent, the job runs fine. Only when using SSMS connecting remotely does it not loop thru the directory. Same user credentials are used. This works on SSIS 2012 /SQL Server 2012.

I have checked and adjust the DCom rights to Launch and Activate. This had no affect either.

Any ideas why this is not working on SQL Server / SSIS 2016?

Thanks,

Patrick


回答1:


Kerberos double hop issue. If you RDP into the machine and connect to the server via SSMS there, it works. Same command but from your computer's SSMS to the remote database and it throws the error/warning about no files found.

You present your credentials to SQL Server from your machine. That's one hop. SQL Server then tries to present your credentials to the file share and the account that runs SQL Server is not authorized for delegation and so it can't access that resource.

You need to have your DBA get with your Network/Active Directory administrators and have the admin account trusted.

https://blogs.msdn.microsoft.com/autz_auth_stuff/2011/05/03/kerberos-delegation/




回答2:


Please try using UNC path (\ServerName\FolderName) for the directory if not already used.



来源:https://stackoverflow.com/questions/44652568/ssis-job-fails-when-run-remotely-thru-ssms-but-runs-fine-on-sql-server

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