This procedure is in MSDB database.
Run
EXEC msdb.dbo.sp_addrolemember @rolename = ‘DatabaseMailUserRole’,
@membername = ” ;
To check if service broker is enabled we need to run
SELECT is_broker_enabled FROM sys.databases WHERE name = ‘msdb’
If its not enabled , we need to enable by this query.
ALTER DATABSE MSDB SET ENABLE_BROKER
To check status of database mail procedures
EXECUTE dbo.sysmail_help_status_sp ;
EXECUTE dbo.sysmail_start_sp ;
We can find it on
MSSQL.3\mssql\binn
We have to check by running this application manually. If it sends mails then it means service broker is not starting this application.
Run this code in MSDB
ALTER QUEUE [InternalMailQueue] WITH ACTIVATION (
STATUS = ON,
PROCEDURE_NAME = [dbo].[sp_ExternalMailQueueListener],
MAX_QUEUE_READERS = 1,
EXECUTE AS OWNER);
ALTER QUEUE [ExternalMailQueue] WITH ACTIVATION (
STATUS = ON,
PROCEDURE_NAME = [dbo].[sp_sysmail_activate],
MAX_QUEUE_READERS = 1,
EXECUTE AS OWNER)
June 4, 2009 at 9:05 am |
Hi,I am getting different kind of error in sending database mail from SQL server 2005 which is not included in troubleshooting database mail.I am getting the error as per the log file"MessageThe mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 5 (2009-06-01T11:03:23). Exception Message: Cannot send mails to mail server. (Command not implemented. The server response was: Error: command not implemented).)" Using the same SMTP server info and same steps I am able to send test mail from different servers. But in a particular server I am not able to send test database mail but I am able to send message through cmd prompt using telnet command.Please advice any server setup needs to be checked.
July 16, 2009 at 6:53 pm |
Is it private profile?Is SMTP Server is blocked by Firewall?