使用Sql Server 2008安排作业

编程入门 行业动态 更新时间:2024-10-27 00:28:58
本文介绍了使用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安排作业

本文发布于:2023-11-24 08:44:55,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1624518.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:作业   Sql   Server

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!