|
|
Question : email notification on ms sql
|
|
Hi,
Do we need to install MSOutlook or outlook web express on the server to be able to send mail when a job has completed?
Thanks.
|
Answer : email notification on ms sql
|
|
//from the site # Q: How do I use XPSMTP, for sending SQL Agent Alerts and job notitications? A: Since SQL Agent does not use SQL Mail, but relies on a different MAPI based mail implementation (named SQL Agent Mail), which is hosted in a separate DLL (SEMMAP.DLL), it is not possible to replace the SQL Agent Alerts and job notifications directly with an SMTP based solution.
Technically you could achieve it by replacing the SEMMAP.DLL file with one that implements an SMTP based mail, which is something I have tried and works, but since replacing Microsoft DLL's renders your system unsupported this is not a viable solution that can be publicly shippped.
You can add extra job steps to your jobs to send a success or failure email, however this requires extra logic and does not cover the Alert scenario. Tibor Karaszi (SQL Server MVP) created a solution for Alerts using XPSMTP, which is available on http://www.dbmaint.com/SmtpAlerter.asp # Q: How do I use XPSMTP for send email from a Database Maintenance Plan? A: The Database Maintenance Wizard uses xp_sendmail to send emails when executing the database maintenance plan. One solution therefore is to drop the existing xp_sendmail extended stored procedure and create a stored procedure with the same name and owner in the master database, that has the exact same parameters (names and data types) as the original xp_sendmail. Here you find an example of a stored procedure named xp_sendmail.
Alternatively you can use Db Maint, which provides better maintenance plans and includes SMTP based mail support. See http://www.dbmaint.com for details.
>>Error: connecting to server smarthost
This is an indication that you do not have a smarthost defined or the smarthost entry can not be resolved. The default hostname that XPSMTP is using for sending e-mail is named "smarthost". To override this you have to supply the @server parameter, with a valid hostname pointing to an SMTP server. If the SMTP does not listen on the default SMTP socket port 25, you can override the used port using the @port parameter.
To determine if a smarthost defined use ping:
"are there any draw backs when we install MSOutlook on th sql server?" as long as ur comp is behind a firewall then dont worry about oultook would u be using outlook with exchange, much better.
|
|
|
|
|