x
login about faq Site discussion (meta-askssc)

How do I create a job that emails output to users?

How do I create a job that emails output to users? This is for a nightly status report. Thanks.

more ▼

asked Sep 20 '11 at 08:54 AM in Default

colibri gravatar image

colibri
151 9 15 15

(comments are locked)
10|1200 characters needed characters left

2 answers: sort oldest

You can enable Database Mail and then use msdb.dbo.sp_send_dbmail in a SQL script to send the emails. Execute the SQL script in a SQL Agent job to control when the email goes out.

more ▼

answered Sep 20 '11 at 09:00 AM

David Wimbush gravatar image

David Wimbush
4.2k 25 29 31

(comments are locked)
10|1200 characters needed characters left

What version of SQL Server are you using. Database mail is your best option for SQL 2005/2008. Then there is always Powershell. You could always step it up a notch and use SSRS with a subscription.

more ▼

answered Sep 20 '11 at 09:08 AM

Tim gravatar image

Tim
31.5k 20 30 116

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x19
x11

asked: Sep 20 '11 at 08:54 AM

Seen: 491 times

Last Updated: Sep 20 '11 at 08:54 AM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.