SQL Server Agent cannot access services on remote computer

53 Views Asked by At

I have a job I need to set up for a client that checks the status of services on local and remote servers.

This is called from a SQL agent cmdexec step to a .bat file on a remote server share.

The only problem is that it can open services to check them on the local server, but trying to open services on remote servers creates an exception access denied message.

Unhandled exception: Error occurred while checking the service: Systm.InvalidOperationException: Cannot open on computer : --> System.ComponentModel.Win32Exception: Access is denied.

If I run the bat file from the same server that SQL is on in a command prompt window, it works successfully.

What do I need to change to get this to work?

0

There are 0 best solutions below