Solved

Unable to send email in SQL 2005

Posted on 2010-08-23
9
664 Views
Last Modified: 2012-05-10
When I run test email in Database mail in SQL 2005 Management Studio, I got an error below
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------
ADDITIONAL INFORMATION:

Service Broker message delivery is not enabled in this database. Use the ALTER DATABASE statement to enable Service Broker message delivery. (Microsoft SQL Server, Error: 14650)

Can anyone tell me what I can do to resolve this?
Thanks.
0
Comment
Question by:atlasdev
  • 5
  • 4
9 Comments
 
LVL 12

Expert Comment

by:mcv22
ID: 33506616
0
 

Author Comment

by:atlasdev
ID: 33506731
After reading the article, I think the problem in my issue is that my MSDB database's service broker is not enabled. I am trying to enable the service broker on MSDB database. I used the query below

USE master ;
GO

ALTER DATABASE AdventureWorks SET ENABLE_BROKER ;
GO

However, it takes forever to the query to finish. I think something is wrong here. When I checked the process info, I see the query's process wait type is LCK_M_X.
Is there something else I need to do to enable the service broker?
0
 
LVL 12

Expert Comment

by:mcv22
ID: 33506742
Try running:


ALTER DATABASE msdb SET ENABLE_BROKER ;

instead of doing it in the AdventureWorks database
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:atlasdev
ID: 33506747
Actually I am using ALTER DATABASE msdb SET ENABLE_BROKER. I forgot to change it in my previous post.
0
 
LVL 12

Expert Comment

by:mcv22
ID: 33506777
Its likely some other session is blocking your attempt to enable the service broker. Run the following in a new query window:

select blocking_session_id from sys.dm_exec_requests where session_id = SPID

where SPID is the sessionID of the query window trying to enable service broker.
0
 

Author Comment

by:atlasdev
ID: 33506794
I ran your query and see that SQLAgent-Alert Engine is the process blocking my query process.
0
 

Author Comment

by:atlasdev
ID: 33506804
I tried to delete that process of SQLAgent-Alert Engine but it keeps coming back. I can restart the query again but the SQLAgent -Alert Engine keeps coming back at the same time, too.
0
 
LVL 12

Accepted Solution

by:
mcv22 earned 250 total points
ID: 33506810
Try stopping the SQL Server Agent windows service and then trying to enable service broker in MSDB
0
 

Author Comment

by:atlasdev
ID: 33506817
Thank you very much. The testing email is working now.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
I have a large data set and a SSIS package. How can I load this file in multi threading?
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question