how tu run agent with cmd commmand

  • Hello!

    Does anybody know how to run sqlserver agent, but not with the service manager, I mean with something as a cmd command ?

    Thanks!!!!


    L.I. Amaury C.R.

  • If you can get netsvc (comes with NT reskit I think), you can...

    NETSVC "SQLServerAgent" \\servername /start    <use stop to stop and query for status>

     

  • Much easier way...

    net start sqlserveragent

    You want to stop it?

    net stop sqlserveragent

  • If you are trying to do this on an MSCS cluster, you should use the CLUSTER command with the RESOURCE sub-command.

    /just in case...

     

    hth JG

     

  • With netsvc you can run the command remotely from another machine, and get the option just to see the status.  Good for routine check scripts

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

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