Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2001
    Chicago, Illinois, USA

    Unanswered: Database Mail failure

    Have code where, when a used performs a certain action, I use the sp_send_dbmail to send an eMail to another user.

    Sometimes it works, sometimes it doesn't, and here is the issue . . .

    Apparently, the Database Mail service terminates, automatically, after a certain period of inactivity. The parameter is controlled in SQL Server Management Studio>>Management>>Database Mail>>Configure Database Mail>>View or Change System Parameters under the parameter Database Mail Executable Minimum Lifetime. Microsoft's default setting for this parameter is 600 seconds, or 10 minutes.

    That is all fine and good, except it appears that when you send an sp_send_dbmail while this process is in its terminated state, the process fails to re-initiate and the eMail is not sent, and no error is reported.

    After a bit of research, I've changed that parameter to something much longer than 10 minutes, and that will server my purposes temporarily.

    But I would like to solve the actual problem.

    Why is it that sp_send_dbmail fails to re-initiate the Database Mail service?

    In case you've done the same research as I, the SQL Server Agent Alert System has long been configured with a valid mail session profile and the mail does work when the Database Mail service is up and running.

    Maverick Software Design

    (847) 864-3600 x2

  2. #2
    Join Date
    Feb 2004
    In front of the computer
    Provided Answers: 54
    dbmail is a vicious trick played by an evil programmer years ago.

    Database Mail is the solution.

    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Jan 2003
    Provided Answers: 17
    I didn't know you wrote dbmail, Pat.

    But isn't what Ken is using Database Mail?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts