PSExec的权限从SQL作业运行 [英] Permissions for PSExec run from SQL job

查看:127
本文介绍了PSExec的权限从SQL作业运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在CMDExec类型的SQL Job步骤中具有以下内容(详细信息已更改):

I have the following in a CMDExec type SQL Job step (details changed):

D:\path\PSExec.exe \\servername -accepteula -u "domain\username" -p password D:\path\executable.exe

这很好. 但是,我在SQL Server中为该用户正在使用的同一用户帐户设置了一个代理,因此您会认为我不需要-u和-p参数. 但是,如果我不提供它们,则会出现错误:

This works fine. However, I have set up a proxy in SQL Server for the same user account - which the job is using, so you'd think I wouldn't need the -u and -p arguments. But if I don't supply them I get the error:

Unhandled Exception: System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

来自SQL Server,因为远程可执行文件以相同的用户上下文连接到SQL.

which is from SQL Server, because the remote executable connects to SQL as the same user context.

为什么这不起作用,我可以在不将凭证包含在工作详细信息中的情况下使其起作用吗? (或批处理文件或类似文件)

Why doesn't this work, and can I make it work without including the credentials in the job detail? (or a batch file, or similar)

谢谢

P.S.如果有帮助,通过远程可执行文件连接的SQL Server与运行该作业的SQL Server相同!

P.S. The SQL Server connected to by the remote executable is the same one as the job is run in, if it helps!

推荐答案

原因是因为Kerberos未运行!

The reason is because Kerberos is not running!

感谢LinkedIn SQLDBA小组的Marc Jellinek:)

Thanks to Marc Jellinek on LinkedIn SQLDBA group :)

这篇关于PSExec的权限从SQL作业运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆