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 04, 2010 3:14 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Friday, May 17, 2013 3:01 AM
Points: 83, Visits: 320
Hi Guys,
How can we execute the Database mail stored procedures in scheduler.

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


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Wednesday, May 22, 2013 6:19 AM
Points: 3,833, Visits: 4,052
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 04, 2010 4:27 AM


SSC-Addicted

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

Group: General Forum Members
Last Login: Tuesday, March 19, 2013 2:45 AM
Points: 416, Visits: 521
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 04, 2010 4:30 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Wednesday, May 22, 2013 6:19 AM
Points: 3,833, Visits: 4,052
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 05, 2010 2:55 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Friday, May 17, 2013 3:01 AM
Points: 83, Visits: 320
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 05, 2010 5:38 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Wednesday, May 22, 2013 6:19 AM
Points: 3,833, Visits: 4,052
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