Permissions for PSExec run from SQL job
Asked Answered
M

1

0

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

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'.

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)

Thanks

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

Malignity answered 19/11, 2012 at 13:2 Comment(0)
M
1

The reason is because Kerberos is not running!

Thanks to Marc Jellinek on LinkedIn SQLDBA group :)

Malignity answered 22/11, 2012 at 10:27 Comment(1)
I've linked back to this post from a more recent question here, where scenario is different, but the error message is the same: #47872316Selectivity

© 2022 - 2025 — McMap. All rights reserved.