本文介绍了使用Sql Server 2008安排作业的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个存储的proc,它从运行查询返回行数的计数.我想安排一个运行此存储的proc的作业,并在count为0时向人们发送电子邮件. 我如何使用SqlserverAgent-> jobs做到这一点. 非常感谢.
Hi, I have a stored proc that returns a count of number of rows from running a query. I want to schedule a job that runs this stored proc and emails people if count is 0. how do I do this using SqlserverAgent-->jobs. Many thanks .
推荐答案检查此链接: www.howtogeek /howto/database/sending-automated-job-email-notifications-in-sql-server-with-smtp/ [ ^ ] Check this link: www.howtogeek/howto/database/sending-automated-job-email-notifications-in-sql-server-with-smtp/[^]
不是确定您使用的是哪个版本的SQL Server.但是,您可能会发现以下信息对此有用. 发送电子邮件. msdn.microsoft/en-us/library/ms175887.aspx msdn.microsoft/en-us/library/ms190307.aspx 要创建新作业并在该作业中配置存储过程. msdn.microsoft/en-us/library/ms190268.aspx 安排您的工作. msdn.microsoft/en-us/library/ms191439.aspx Not sure which version of SQL Server you are using. However you may find below information useful for this. To send emails. msdn.microsoft/en-us/library/ms175887.aspx msdn.microsoft/en-us/library/ms190307.aspx To craete a new Job and configure your Stored Procedure in the Job. msdn.microsoft/en-us/library/ms190268.aspx To schedule your Job. msdn.microsoft/en-us/library/ms191439.aspx
有一种更简单的方法. msdn.microsoft/en-us/library/ms190307.aspx [ ^ ] 我是从存储过程中调用此函数的,响应是立即的.我不必为此设置任何其他功能. There is an easier way. msdn.microsoft/en-us/library/ms190307.aspx[^] I called this from a stored procedure and the response was immediate. I did not have to set up anything additional for this to work.
更多推荐
使用Sql Server 2008安排作业
发布评论