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 |
|
vinoo128
Starting Member
9 Posts |
Posted - 2009-01-21 : 12:09:25
|
| Hi all,The requirement is to send email based on if the data was written to a table for a certain time period?I know that we can write a procedure to check if the data is there.Can anyone help me with associating that procedure with raising alerts/notifications if the data is not present?Thanks in anticipation |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-21 : 12:30:11
|
| seems like what you need is configure a sql job which checks for data and sends notifications via email. |
 |
|
|
vinoo128
Starting Member
9 Posts |
Posted - 2009-01-21 : 12:46:25
|
| Ok...so to make it simpler,i have a stored procedure which will run through a SQL job and give me a return code(0 or -1).Based on that return code i want to send email to operators.What should i associate the return code to in SQL job so as to generate alerts/notification? |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-21 : 12:48:58
|
| you can make sql job execute a t-sql query. just use a variable to receive the return code and use IF condition to check if 1 and use sp_send_dbmail to send mail inside if block |
 |
|
|
|
|
|