views:

38

answers:

2

Hi,

Currently I am dealing with a large dataset and some queries are executing several hours. In the meantime I am doing other things. In order to use time efficiently I have been thinking about implementing the logic to send email or SMS message after the query is complete so I can analyze the data.

I know how to do it by writing custom application but wouldn't like to reinvent the wheel if any similar solution already exists. Does anyone of you know if there already exists any notification system that could be used for this purpose?

Thank you

+2  A: 

SQL Server has sp_send_dbmail built in. You could run that as the last step of your batch.

Joe Stefanelli
+1. That was where I was going when I asked about the platform, but I got sidetracked. Good for you!
David Stratton
+1  A: 

You can also execute the procedure from a job and use the notification email to send you an email. This would also give you the side benefit of having execution history.

http://blog.sqlauthority.com/2008/08/23/sql-server-2008-configure-database-mail-send-email-from-sql-database/

And see this post about sending using regular ol' email to send SMS messages.

Brad