Solved

sql agent alerts

Posted on 2014-03-12
5
347 Views
Last Modified: 2014-03-17
On my servers I wanted to configure the sql alerts. I used the script provided by BrentOzar from this website: http://www.brentozar.com/blitz/configure-sql-server-alerts/
The problem is that parameter @delay_between_responses=60 is set to 60 seconds, and I don't want to be flooded with emails every minute. Now I want to change this settings to 2hours.
Is there any automatic way to do this. I have a lot of sql servers and I don't want to do this mannualy alert by alert
0
Comment
Question by:dedri
5 Comments
 
LVL 33

Expert Comment

by:knightEknight
ID: 39923805
Can't you just change the value from 60 to 7200 in the script?

  @delay_between_responses=7200
0
 

Author Comment

by:dedri
ID: 39924670
executing the script will generate an error message because the alerts have been already created on servers.
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 39933458
What is the problem with the answers? Did they not work?

What you should probably do is create a nightly scheduled task that runs every night and can read/write to a central point. Then you don't have to touch the servers manually the next time. Just put a new command in the batch file.
0
 
LVL 35

Accepted Solution

by:
David Todd earned 500 total points
ID: 39933559
Hi,

Looking up sp_add_alert gives
http://technet.microsoft.com/en-us/library/ms189531.aspx

scroll down to the bottom and find sp_update_alert posted there
http://technet.microsoft.com/en-us/library/ms178616.aspx

I think that if you do a search and replace on Brent's script, and change sp_add_alert to sp_update_alert, and change the response delay value, then you'll be okay.

I think a value in the 10 minute range will be good. That is, by the time you or a colleague is paged, and you find your computer and connect in will take around 10 minutes. If a particular alert on a particular server goes off with ponderous regularity you have two or three options - create a rule on the alert mailbox and put those emails in a sub-folder; increase the delay on just that alert on that server; disable the alert on that server (bad idea)

HTH
  David
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now