automating checks

  • Hi everyone

    is there anyway i can automate checking whether SQL server agent and the SQL service is running,

    but also notifying certain people via email that its down...

    thanks

  • yisaaacs (3/27/2009)


    Hi everyone

    is there anyway i can automate checking whether SQL server agent and the SQL service is running,

    but also notifying certain people via email that its down...

    thanks

    You can use this command to see whether your server is running:

    EXEC master.dbo.xp_servicecontrol 'QUERYSTATE', 'SQLAgent'

  • Krishna (3/27/2009)


    yisaaacs (3/27/2009)


    Hi everyone

    is there anyway i can automate checking whether SQL server agent and the SQL service is running,

    but also notifying certain people via email that its down...

    thanks

    You can use this command to see whether your server is running:

    EXEC master.dbo.xp_servicecontrol 'QUERYSTATE', 'SQLAgent'

    Nice, did not know that, another tip learned

    although it'll be ironic, if MSSQLSERVER is not running, you cannot run the above command to check the service 😛

    Here is another SSC's thread to explain more

    http://www.sqlservercentral.com/Forums/Topic14726-5-1.aspx

    SQLServerNewbieMCITP: Database Administrator SQL Server 2005
  • Jerry Hung (3/27/2009)


    Krishna (3/27/2009)


    yisaaacs (3/27/2009)


    Hi everyone

    is there anyway i can automate checking whether SQL server agent and the SQL service is running,

    but also notifying certain people via email that its down...

    thanks

    You can use this command to see whether your server is running:

    EXEC master.dbo.xp_servicecontrol 'QUERYSTATE', 'SQLAgent'

    Nice, did not know that, another tip learned

    although it'll be ironic, if MSSQLSERVER is not running, you cannot run the above command to check the service 😛

    Here is another SSC's thread to explain more

    http://www.sqlservercentral.com/Forums/Topic14726-5-1.aspx

    oops sorry typo meant to say sql agent:-D

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

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