I wanna start a service on a remote machine. I use exec..xp_cmdshell 'sc \\remotemachine start messenger' From cmd on windows it works, from SQL it doesn't. The SQL account is a member of a domain admin. I tried to create a new SQL user a grant him acces to xp_cmdshell i stil get an error Error 5: Access is Denied.
First your account by which you invoke xp_cmdshell needs to be a member of sysadmin fixed role.If that's true then the xp_cmdshell will execute under the security context of the account under which sql server service is running.
After Monday and Tuesday even the calendar says W T F ....