Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 SQL Server Administration (2012)
 how to be alerted if sql agent goes down

Author  Topic 

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2015-01-07 : 14:11:51
I have a problem that sql agent has gone down and I didn't konw

How can I set up an alert if sql agent goes down?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2015-01-07 : 14:16:37
Do you have any monitoring software such as SCOM? If you don't have any software, you could setup a Powershell script on a central server to check the state of services. Just run the script on an interval so that you are made aware quickly.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2015-01-08 : 01:02:22
what is the best way

powershell didn't work as it's not a mail server
Go to Top of Page

ahmeds08
Aged Yak Warrior

737 Posts

Posted - 2015-01-08 : 01:20:24
check if this helps
http://sqlish.com/alert-when-sql-server-agent-service-stops-or-fails/

Javeed Ahmed
https://www.linkedin.com/pub/javeed-ahmed/25/5b/95
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2015-01-08 : 01:29:40
why doesn't powershell work?Do you have powershell installed?
There are some powershell get-service status check examples on this post - http://www.sqlserver-dba.com/2013/01/sql-server-working-with-windows-services-examples-and-powershell-.html


Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2015-01-08 : 01:36:06
the problem with powershell is it didn't send the email as the sql server is not a mail server

can I use an external mail server to send the email alert?
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2015-01-08 : 01:39:37
Yes, you can use an external mail server.Assuming the relevant levels of authority are in place. Use this example to explore sending email through powershell -http://www.sqlserver-dba.com/2012/01/sql-server-send-email-using-powershell.html

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2015-01-08 : 11:49:44
Why does it matter if SQL Server is a mail server to use Powershell? It is irrelevant.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2015-01-12 : 01:45:31
When you set up monitoring - and if the SQL Agent Service is set to Automatic, configure the monitoring agent to automatically start the service if it is not on. If this fails , trigger an alert

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2015-01-12 : 02:45:03
>>When you set up monitoring - and if the SQL Agent Service is set to Automatic, configure the monitoring agent to automatically start the service if it is not on. If this fails , trigger an alert


Where do I do this - this sounds like what i want
Go to Top of Page
   

- Advertisement -