Send Mail

  • Hi,

    I got a job to run a script at a fixed time and the result should send to the recipient .Please help in doing so.

    Iam using SQL 2008.

    Thanks in advance.

  • What you want is probably sp_send_dbmail. Look that one up, play with it a bit, and see if it'll do what you need.

    Another possibility, of course, is SSRS. That'll be more complex, but it can do the job.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • First you need to setup mail profile (check following post) and use that profile in msdb.dbo.sp_send_dbmail procedure

    http://www.sqlservercentral.com/blogs/databaseexpertisecom/2010/05/12/database-mail-set-up-in-sql-server-2008/

  • Thanks for the reply.

    Is there any process like the result which runs at job scheduler can be send mail like?

  • Is there any process like the result which runs at job scheduler can be send mail like?

    Sorry I didnot understand your question.

    If you want to send outcome (success or failure) of scheduled job, create an operator (expand SQL server agent-> Operators) and then specify this operatior in Notifications (Job Properties -> Notifications)

  • Not clear on what you're asking for.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply