本帖最后由 shushan_918 于 2014-06-06 13:45:23 编辑

解决方案 »

  1.   

    本帖最后由 wufeng4552 于 2014-06-06 13:54:22 编辑
      

  2.   

    EXEC msdb.dbo.sp_send_dbmail
    @recipients = '[email protected],[email protected]',
    @body = '<h3>测试邮件</h3>',
    @subject = '测试邮件',
    @body_format='html'消息 15281,级别 16,状态 1,过程 sp_send_dbmail,第 0 行
    SQL Server 阻止了对组件 'Database Mail XPs' 的 过程 'dbo.sp_send_dbmail' 的访问,因为此组件已作为此服务器安全配置的一部分而被关闭。系统管理员可以通过使用 sp_configure 启用 'Database Mail XPs'。有关启用 'Database Mail XPs' 的详细信息,请参阅 SQL Server 联机丛书中的 "外围应用配置器"。这个是什么。
    报了个这样的错。
      

  3.   

    这种我们一般不会用数据库来操作,通常是写VBS脚本文件,放在服务器上定时跑,用JMail发邮件。
      

  4.   


     启用 Database Mail 扩展存储过程
     sp_configure 'show advanced options', 1;
    GO
    RECONFIGURE;
    GO
    sp_configure 'Database Mail XPs', 1;
    GO
    RECONFIGURE
    GO
      

  5.   


     启用 Database Mail 扩展存储过程
     sp_configure 'show advanced options', 1;
    GO
    RECONFIGURE;
    GO
    sp_configure 'Database Mail XPs', 1;
    GO
    RECONFIGURE
    GO
    这个试过了。不行啊。
      

  6.   


     启用 Database Mail 扩展存储过程
     sp_configure 'show advanced options', 1;
    GO
    RECONFIGURE;
    GO
    sp_configure 'Database Mail XPs', 1;
    GO
    RECONFIGURE
    GO
    这个试过了。不行啊。你发送邮件配置了吗?
      

  7.   

    设置一个Job啦,在sql agent 里面配置
      

  8.   

    我只能说,我改用程序做了
    太伤不起了。用sql需要很多配置是嘛?需要配置写什么额?真的不懂。分数太少,没人管。。