这个选项是在服务器启用SQL Mail。有两个值,一个是0表示SQL Mail不可用(默认值),另一个为1表示SQL Mail可用。

执行下面代码:

EXEC master..xp_sendmail 
    
@recipients = 'test@mailaddress.com'--测试邮件地址
    @subject = 'SQL Server mail test',
    
@message = 'Hello, Insus.NET.'

 

如果SQL Mail没有在服务器启用,会显示: 

SQL Mail XPs Options


启用SQL Mail:

SP_CONFIGURE 'show advanced options'1;
GO
RECONFIGURE;
GO
SP_CONFIGURE 
'SQL Mail XPs'1; --1启用,0禁用。
GO
RECONFIGURE;
GO

 

相关文章:

  • 2021-05-18
  • 2021-11-14
  • 2022-12-23
  • 2022-12-23
  • 2021-06-06
  • 2021-06-29
  • 2022-02-13
猜你喜欢
  • 2021-11-23
  • 2022-02-26
  • 2022-12-23
  • 2021-06-20
  • 2021-12-15
  • 2021-08-12
  • 2022-02-05
相关资源
相似解决方案