I have the following step of the CMDExec SQL job (details changed):
D:\path\PSExec.exe \\servername -accepteula -u "domain\username" -p password D:\path\executable.exe
It works great. However, I configured the proxy server in SQL Server for the same user account that the job uses, so you would have thought that I didn't need the -u and -p arguments. But if I do not give them, I get an 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 credentials in the job details? (or batch file or similar)
thank
PS SQL Server associated with the remote executable is the same as the job if it helps!
sql-server-2008 sql-job psexec
CompanyDroneFromSector7G Nov 19. 2018-12-11T00: 00Z
source share