April 7, 2009 at 4:36 pm
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.
April 7, 2009 at 5:21 pm
check it: http://www.sqlteam.com/article/monitoring-sql-server-agent-with-powershell
Looks promising.
April 7, 2009 at 5:56 pm
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
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply