我试着使用:sp_send_dbmail发送SMTP邮件在SQL Server 2008 R2快速
但我得到了以下错误:
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.
我也尝试使用此代码来发送SMTP邮件在SQL Server 2008中R2 EXPRESS: http://www.freevbcode.com/ShowCode.asp?ID=6699
但我收到以下错误:
Msg 15281, Level 16, State 1, Procedure sp_OACreate, Line 1
SQL Server blocked access to procedure 'sys.sp_OACreate' of component 'Ole Automation Procedures' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Ole Automation Procedures' by using sp_configure. For more information about enabling 'Ole Automation Procedures', see "Surface Area Configuration" in SQL Server Books Online.
我去了“Facets”检查那里的安全选项,但没有关于“Surface Area Configuration”的内容!它是否缺少,因为我正在使用Express版本的SQL Server 2008 R2?还是我走错了方向?
如果您有任何更好的代码/建议在SQL Server 2008中发送邮件,请让我知道。谢谢!
工作一种享受。好一个! – paulH 2012-12-19 13:19:37
设置DataBaseMailEnabled = true后我不需要重新启动 – sreimer 2013-07-24 15:09:44
使用SQL Express为我工作Microsoft SQL Server 2008 R2(SP1) - 10.50.2500.0(X64) – 2013-09-10 15:39:35