Monday, March 19, 2012

e-mail notifications

Hi!
I'm a beginner in SQL Server. Sorry in this a stupid question but I dont have a clue.

I'm sending an e-mail when a backup ends and I want to know how can I change the subject and the body text of this notifications.

Is that possible? How can I do it?

Thanx in advance!is this backup a scheduled job? is there anyway for you to know how this backup is being done? using a DTS package??|||Yes, is a scheduled job. Why? Is this a problem?
Is better to use a DTS package? I haven't worked with this before...|||You can add a step in the job that uses xp_sendmail - passing the subject/body you want.|||Originally posted by rnealejr
You can add a step in the job that uses xp_sendmail - passing the subject/body you want.

because the backup is a job it uses the SQL server agent mail system, which is different from SQL Mail. by setting up the operator to get a msg you are useing the SQL Sever Agent mail system, which is very limited. To get greater flexability you need to use SQL mail, and the only way to get access to that is to use the xp_sendmail procedure in connection with a DTS package.
Jim|||Jim,

You don't need to use a dts package - you can run xp_sendmail within a step.|||Originally posted by rnealejr
Jim,

You don't need to use a dts package - you can run xp_sendmail within a step.

Very true didnt even think about that
Jim|||THANK YOU ALL!!
I'm going to try that way. I hope this works... :-\

No comments:

Post a Comment