Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Execute the Database Mail Stored procedures in scheduler Expand / Collapse
Author
Message
Posted Thursday, February 4, 2010 3:14 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Friday, June 13, 2014 1:03 AM
Points: 90, Visits: 386
Hi Guys,
How can we execute the Database mail stored procedures in scheduler.

Thanks,
Ram.
Post #859461
Posted Thursday, February 4, 2010 4:27 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Yesterday @ 3:00 PM
Points: 4,175, Visits: 4,257
Pinal Dave has an article that describes how to do this:

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


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/

Post #859502
Posted Thursday, February 4, 2010 4:27 AM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Yesterday @ 9:56 AM
Points: 416, Visits: 566
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
Post #859503
Posted Thursday, February 4, 2010 4:30 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Yesterday @ 3:00 PM
Points: 4,175, Visits: 4,257
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/

Post #859506
Posted Friday, February 5, 2010 2:55 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Friday, June 13, 2014 1:03 AM
Points: 90, Visits: 386
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.
Post #860271
Posted Friday, February 5, 2010 5:38 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Yesterday @ 3:00 PM
Points: 4,175, Visits: 4,257
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/

Post #860360
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse