Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server / March 2008

Tip: Looking for answers? Try searching our database.

Alerts to be emailed to our team

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Daniel - 06 Mar 2008 21:02 GMT
We have a few procedures we want to monitor for issues... and want to know
how to enable alerts to notify our team when there is an issue..

We have error logging enabled within the procedure.. which is writing the
errors to a table, but unless we go out and view that table we dont know if
the procedure failed...

So what can we use within the SQL2005 to send our team an email that the
procedure failed?

we have alerts working with our scheduled Jobs but want to use it to alert
of the errors as they are written to the table or within the procedure..

whatever is easier...

Signature

ASP, SQL2005, DW8 VBScript

Russell Fields - 06 Mar 2008 21:18 GMT
Daniel,

Provided this is not high-velocity stuff, but is fairly rare, you could add
an ON INSERT trigger to your audit table.  That trigger could then do
something such as:

1. Use sp_send_dbmail to email your group
2. Use sp_start_job to start a SQL Agent job that could do whatever you
want, including sending the email.
3. Use RAISERROR to raise an alert that is configured to email, page, etc,
whoever you want to have know about this.

And so on.

If the errors were frequent it would probably be better to skip the trigger,
but create a scheduled job that occasionally runs (every hour?) and reports
on recent activity.

RLF

> We have a few procedures we want to monitor for issues... and want to know
> how to enable alerts to notify our team when there is an issue..
[quoted text clipped - 10 lines]
>
> whatever is easier...
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.