Sql Agent auto-start

  • Is there a way to start Sql Agent automatically after SQL and the Agent services are shutdown manually then the Agent won't auto-start when SQL does.

    Any help is much appreciated.

  • I think you have to do it manually.

  • I have a batch that checks in a period of time the status of the services..and if someone is stopped, then it starts them.

    I don't think you can do it from inside SQL.

  • I was reading an article where it states the following:

    You can run the following proc or enable it as a startup stored-proc to overcome this.

    CREATE PROC AUTOAGENT

    AS

    EXEC XP_CMDSHELL 'NET START SQLSERVERAGENT'

    go

    SP_PROCOPTION AUTOAGENT, STARTUP, TRUE

    Any comments or suggestions?

  • Tested this proc and it works fine! I'm implementing accross several of my servers. Just needed to update the SQLSERVERAGENT to reflect actual SQL Agent per box.

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

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