Start a remote service from SQL??

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

  • Looks like the SQL Server service account does not have enough privileges to start service on the remote server.

  • It also looks like you're trying to turn your SQL Server into an application server. What are you attempting to accomplish that you need to start a service on a remote machine via T-SQL?

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • are you trying to do this from a SQL Agent job? because then the account that runs the Agent would need the permissions.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply