Answered by:
DATABASE MAIL Problem

Question
-
Hi All,
I m not able to send Test mail from Database mail in sql 2005. I m getting the following error:
Msg 14641, Level 16, State 1, Procedure sp_send_dbmail, Line 77
Mail not queued. Database Mail is stopped. Use sysmail_start_sp to start Database Mail.
Please advise.
Rahul Soni SQL DBA- Moved by Phil Brammer Thursday, September 17, 2009 1:15 PM Moving to the Engine forum. This is not an SSIS question. (From:SQL Server Integration Services)
Thursday, September 17, 2009 11:49 AM
Answers
-
Hi,
Based on your description, your problem is that the database mail couldn’t start. To troubleshooting the issue, you need to follow the general steps:
1. To determine if Database Mail is enabled by using the following statements:sp_configure 'show advanced', 1; GO RECONFIGURE; GO sp_configure; GO
If the run_value is not 1, Database Mail is not enabled. Execture the following code to enable database mail:
sp_configure 'Database Mail XPs', 1; GO RECONFIGURE; GO
Then, restore the sp_configure procedure to its default state.
sp_configure 'show advanced', 0; GO RECONFIGURE; GO
2. Sending database mail requires a member of the DatabaseMailUserRole. You could execute the following statement to list all members of the DatabaseMailUserRole:EXEC msdb.sys.sp_helprolemember 'DatabaseMailUserRole'
If the user is not a member of the DatabaseMailUserRole, try to add users to the DatabaseMailUserRole role, use the following statement:
sp_addrolemember @rolename = 'DatabaseMailUserRole',@membername = '<database user>';
3.Send Database Mail, users must have access to at least one Database Mail profile. To list the users (principals) and the profiles to which they have access, execute the following statement.EXEC msdb.dbo.sysmail_help_principalprofile_sp;
If the user has no access to the profile, try to use the Database Mail Configuration Wizard to create profiles and grant access to profiles to users.
4. Start the database mail again.
For more information, please see http://technet.microsoft.com/en-us/library/ms187540.aspx
If there are any more questions, please let me know.
Thanks.
***Xiao Min Tan***Microsoft Online Community***- Marked as answer by Xiao-Min Tan – MSFT Tuesday, September 29, 2009 11:15 AM
Monday, September 21, 2009 5:04 AM
All replies
-
Use this below statement in management studio and then try again: This will start the service broker .
USE
msdb ;
GO
EXECUTE
dbo.sysmail_start_sp ;
GO
Regards,
Raju- Proposed as answer by Manish Sharma - ETL Thursday, September 17, 2009 1:08 PM
Thursday, September 17, 2009 11:52 AM -
Hi All,
I m not able to send Test mail from Database mail in sql 2005. I m getting the following error:
Msg 14641, Level 16, State 1, Procedure sp_send_dbmail, Line 77
Mail not queued. Database Mail is stopped. Use sysmail_start_sp to start Database Mail.
Please advise.
Rahul Soni SQL DBA
The error message tells you what to do.
execute this SP sysmail_start_sp
Hope this helps !!
Please close the thread once answered
Sudeep My BlogThursday, September 17, 2009 12:11 PM -
I executed this SP before posting this thread......
It does not work at all.
Rahul Soni SQL DBAThursday, September 17, 2009 1:11 PM -
I executed this SP before posting this thread......
Database Mail is not active by default. To use Database Mail, you must explicitly enable Database Mail by using either the Database Mail Configuration Wizard , the sp_configure stored procedure, or by using the Surface Area Configuration facet of Policy-Based Management.
It does not work at all.
Rahul Soni SQL DBA
please check the following link
http://msdn.microsoft.com/en-us/library/ms175887.aspx
Let us TRY this | Don’t forget to mark the post(s) that answered your question- Proposed as answer by Sudeep Raj Thursday, September 17, 2009 1:19 PM
Thursday, September 17, 2009 1:17 PM -
I ahve configured Database Mail already
Rahul Soni SQL DBAThursday, September 17, 2009 1:22 PM -
Hi,
Based on your description, your problem is that the database mail couldn’t start. To troubleshooting the issue, you need to follow the general steps:
1. To determine if Database Mail is enabled by using the following statements:sp_configure 'show advanced', 1; GO RECONFIGURE; GO sp_configure; GO
If the run_value is not 1, Database Mail is not enabled. Execture the following code to enable database mail:
sp_configure 'Database Mail XPs', 1; GO RECONFIGURE; GO
Then, restore the sp_configure procedure to its default state.
sp_configure 'show advanced', 0; GO RECONFIGURE; GO
2. Sending database mail requires a member of the DatabaseMailUserRole. You could execute the following statement to list all members of the DatabaseMailUserRole:EXEC msdb.sys.sp_helprolemember 'DatabaseMailUserRole'
If the user is not a member of the DatabaseMailUserRole, try to add users to the DatabaseMailUserRole role, use the following statement:
sp_addrolemember @rolename = 'DatabaseMailUserRole',@membername = '<database user>';
3.Send Database Mail, users must have access to at least one Database Mail profile. To list the users (principals) and the profiles to which they have access, execute the following statement.EXEC msdb.dbo.sysmail_help_principalprofile_sp;
If the user has no access to the profile, try to use the Database Mail Configuration Wizard to create profiles and grant access to profiles to users.
4. Start the database mail again.
For more information, please see http://technet.microsoft.com/en-us/library/ms187540.aspx
If there are any more questions, please let me know.
Thanks.
***Xiao Min Tan***Microsoft Online Community***- Marked as answer by Xiao-Min Tan – MSFT Tuesday, September 29, 2009 11:15 AM
Monday, September 21, 2009 5:04 AM