Solved

Why does mail sproc get triggered?

Posted on 2010-11-10
6
237 Views
Last Modified: 2012-05-10
In sql server 2005, I'm getting the error below when trying to run a sproc.  The sproc doesn't reference mail and I'm not sure why this happens.  I have the same db on another server that doesn't throw this error.  What might be causing this?

Msg 15281, Level 16, State 1, Procedure sp_send_dbmail, Line 0

SQL Server blocked access to procedure 'dbo.sp_send_dbmail' of component 'Database Mail XPs' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Database Mail XPs' by using sp_configure. For more information about enabling 'Database Mail XPs', see "Surface Area Configuration" in SQL Server Books Online.
0
Comment
Question by:brettr
  • 3
  • 3
6 Comments
 
LVL 58

Expert Comment

by:cyberkiwi
ID: 34106252
http://msdn.microsoft.com/en-us/library/ms190307%28SQL.90%29.aspx

The error message already indicates what you need to so, go to Surface Area Configuration and enable it.

start\Programs\SQL Server 2005\Configuration Tools\Surface Area..
Bottom link "for features"
Pick "database mail" from the left tree, on the right, click tick "Enable.."
0
 

Author Comment

by:brettr
ID: 34106327
Thanks.

What is triggering that sproc?  I don't recall ever integrating it.
0
 
LVL 58

Accepted Solution

by:
cyberkiwi earned 500 total points
ID: 34106401
How often does it happen?
You could set up a SQL Profiler trace and capture for where (rpc started/sql batch started/sp stmt started) LIKE '%sp_send_dbmail%' and wait for it to be captured!  That will tell you the application name that caused it to fire.

It is also possible some sql agent job is attempting to send job completion notifications.
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

Author Closing Comment

by:brettr
ID: 34106448
Thanks.
0
 

Author Comment

by:brettr
ID: 34106561
Oh no.  I don't see the database mail option for the problem machine.  What does that mean?  I see it on the other machine.
0
 
LVL 58

Expert Comment

by:cyberkiwi
ID: 34106630
Okay you can check using (run in query window)

exec sp_configure 'Database Mail XPs'

Result of the "run_value" column is what is currently being used (1=on, 0=off)

If that returns the error

"The configuration option 'Database Mail XPs' does not exist, or it may be an advanced option."

Then use this whole block below:

exec sp_configure 'show advanced options', 1
reconfigure
exec sp_configure 'Database Mail XPs'
exec sp_configure 'show advanced options', 0   -- reset the advanced options setting
reconfigure
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

This article will describe one method to parse a delimited string into a table of data.   Why would I do that you ask?  Let's say that you need to pass multiple parameters into a stored procedure to search for.  For our sake, we'll say that we wa…
Introduction This article will provide a solution for an error that might occur installing a new SQL 2005 64-bit cluster. This article will assume that you are fully prepared to complete the installation and describes the error as it occurred durin…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 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

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now