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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2003-07-02 : 07:59:52
|
| Von writes "Hello there, I need your help creating an SQL agent. The database we are using is fed syslog information and is updated continously with information like hostnames, date, time etc. Can you please help me with some code that will allow me to monitor the number of entries for any given time interval. When a certain threshold or number of entries is exceeded at a given time, an alarm or trigger needs to be activated that sends an Email notification to me. For example, if say there are in excess of 100 entries in 5 minutes, i would like for a trigger/alarm to go off.Once we get this out of the way, i would like to be able to configure the threshold as well as the time interval. But lets focus on the first thing though before we get this happening.Cheers" |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-07-02 : 11:48:12
|
| How far have you gotten in the code? Show us what you've done so far. Really all that needs to happen is a job be created that does a COUNT(*) on your table. If COUNT(*) is greater than 100, then it should run xp_sendmail. The job should just run a stored procedure and kick off every five minutes. Stored procedures accept input parameters so it can easily be coded so that it can accept the treshold values.Tara |
 |
|
|
|
|
|