Database mail queues messages, but will not send

  • I think there is a problem with my sql installation. I am running SQL Server 2005 Sp2 and database mail works if I execute DatabaseMail90.exe manually. I cannot even get a test mail sent though without DatabaseMail90.exe having to be executed manually. Isnt that suppose to be ran by the service broker and after master.dbo.xp_sysmail_activate is executed?

    I have tried all of the articles online and nothing has seemed to work.

    Adam Durr
    Remote DBA support
    www.bluegecko.net

  • Right click on SQL Server Agent -> Properties -> Alert System -> Mail Session

    check enable mail profile

    select Mail system as Database Mail in drop down

    And Mail Profile the as the profile you have created using Database mail wizard.

    Simple Mail Transfer Protocol (SMTP) server - see whether you have given the correct IP.

    To send Database Mail, you must be a member of the DatabaseMailUserRole database role in the msdb database.

    See to it that the services are started.

    Tanx 😀

  • Thank you for the suggestions. I have tried all of those and I am still having the same issue.

    Adam Durr
    Remote DBA support
    www.bluegecko.net

  • What is the error shown in database mail log.

    Tanx 😀

  • There is no error. The last thing in the database mail log is "activated" . When I manually run databasemail90.exe all of the queued mail messages are sent.

    Adam Durr
    Remote DBA support
    www.bluegecko.net

  • Depending on network speed and backlog of the SMTP server it may take time to deliver a Database mail. The you have to get your network people to troubleshoot the problem.

    Tanx 😀

  • checkout this link

    Tanx 😀

  • Have you tried restarting the SQL services? Before that I would go in to the Agent properties and simply select database mail profile. I've noticed this as an issue when using scripts to setup database mail since the registry entries may not be updating.

    Also make sure the profile is selected as public under mail profile security.

  • Thank you for the suggestions. The answer was I needed to add my sql service login account as a user in SQL with write access to the msdb database. After this my queued mail was being proccessed. I found the answer by looking in the event viewer for any database mail errors.

    Adam Durr
    Remote DBA support
    www.bluegecko.net

  • Isn't your SQL service account part of the default local groups that SQL Server creates during install? If so, it should've had system administrator access to the instance.

  • I have been reading security articles on SQL Server and it was recommended to remove buil-in\administrators for sql logins.

    Adam Durr
    Remote DBA support
    www.bluegecko.net

  • SQL Server creates local groups on the SQL box during installation (Under Computer Management --> Users and Groups --> Groups) as below

    Default instance: SQLServerMSSQLUser$ComputerName$MSSQLSERVER

    Named instance: SQLServerMSSQLUser$ComputerName$InstanceName

    There are groups for Agent, Analysis Services etc. If you setup your service account during installation it will by default be added to appropriate local groups. If you set it up post installation make sure you use Configuration Manager to do so, so that the correct permissions are set for the service account.

Viewing 12 posts - 1 through 11 (of 11 total)

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