SQL Server 2005 Services

  • Does anyone know how i can ensure all SQL Server 2005 Services are running and somehow either re-start the services when they stop or notify me so i can address the issue?

    The other day my SQL Server Agent service stopped for no reason but it was not evident to me until four days later when i noticed the backups did not run.

    Can i somehow ping these services periodically via a script and notify myself when they are down?

    Any suggestions are appreciated.

  • Hi..

    I start use powershell too to do this because i have some servers to monitor. But there is a "problem"...this script have to run every n minutes. So the OS have a trigger..called eventtrigers.

    When the sql server service stopped ou run generate one event in EventViewer and you can create a OS trigger to eventid for this. example lets say eventid to stopped service is 7036..then you can create a eventtriger to this eventid and call one program in .vbs to send email (or in porwershell or in c#..etc..etc).

    So you dont have to run a script every n minutes.

    I use this in another job to know when a failover in cluster occurs.

    Ex :

    eventtriggers /create /s ServerName /user Domain\User /p P@ssw0rd /tr "FailOver - Service Name" /eid 1069 /l system /t error /tk C:\Email.exe

    This Email.exe sends a email when a event type 1069 occurs.

    You can see more in

    http://technet.microsoft.com/en-us/library/bb490901.aspx

    $hell your Experience !!![/url]

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

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