February 4, 2010 at 3:14 am
Hi Guys,
How can we execute the Database mail stored procedures in scheduler.
Thanks,
Ram.
February 4, 2010 at 4:27 am
Pinal Dave has an article that describes how to do this:
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
February 4, 2010 at 4:27 am
Do you want to send mail from OS scheduler? If yes then you can use sp_send_dbmail procedure in msdb database, Check http://sql-articles.com/articles/dba/database-mail article
Regards..Vidhya Sagar
SQL-Articles
February 4, 2010 at 4:30 am
Another article from Microsoft:
http://msdn.microsoft.com/en-us/library/ms186352.aspx
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
February 5, 2010 at 2:55 am
Thanks for sending the articles,now we have the stored procedures for send mail.
We wanted to schedule or creating the task for that stored procedure(send mail).Can anyone help us on it.
Thanks,
Ram.
February 5, 2010 at 5:38 am
I just remembered that I did this before and I believe that I used s a Execute SQL Task.
I defined the From & To as well as the body. You can define an attachment.
Sorry but I do not have the code but it was very easy once I figured out how to do this.
You can also look at sending the result to a variable and look at the MEssage Source Type and Message Source in the Send Mail Task.
Sorry that I can't recall exactly what I did but is was very straight forward.
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply