How to check if my DB mails are running?

  • Hello all,

    Greetings!

    I have a situation eating my head! We have around 6-7 servers of 2005 and 2008 version and I am expected to check if the emails are running fine on all of them.

    The problem here is, in most of the databases the SMTP settings are stored in some table and XP_SMTP_SENDMAIL procedure is used to fire mails using the details. While with some latest databases I have SP_SEND_DBMAIL procedure used (i.e. I have profile created on the server).

    The SMTP settings are allowed to change from the application, which can cause the mails to go down.

    What I have thought of is, using linked servers to fetch all SMTP data to send mails. But in this case I have to use XP_SMTP_SENDMAIL procedure, which I don't want to considering the advantages of SP_SEND_DBMAIL.

    What could be best possible solution for this?

    Many Thanks in advance.

    Regards,

    Shardul.

  • If you're using DBMail (sp_send_DBMail), then all the e-mails are queued and logged in msdb, and you can query the relevant tables for status, etc., pretty easily. That's what I do to check on that.

    - 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

  • Thanks for that. Ya, msdb sysmail tables are on the options, but my main target is to get identified first if mails on some db is down. I think I may have to send periodic mails say every week can do the job.

Viewing 3 posts - 1 through 2 (of 2 total)

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