如何在 SQL 代理作业中执行存储过程?

发布于 2024-07-29 18:58:27 字数 351 浏览 1 评论 0原文

我正在使用 SQL Server 2008,并且需要从 SQL Server 代理运行 SQL 作业。 我是 SQL Server 作业的新手,我想从 SQL Server 作业定期执行存储过程。 但我没有找到除了copy & 之外在哪里指定执行的存储过程。 粘贴 SQL 命令。

这是我的屏幕快照:

在此处输入图像描述

有什么想法如何分配存储过程在 SQL Server 作业中执行吗?

I am using SQL Server 2008 and I need to run a SQL Job from SQL Server Agent. I am new to SQL Server Job and I want to execute a stored procedure regularly from a SQL Server Job. But I did not find where to specify the executed stored procedure other than copy & paste SQL commands.

Here is my screen snapshot:

enter image description here

Any ideas how to assign stored procedure to execute in SQL Server Job?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

何以畏孤独 2024-08-05 18:58:27

您只需将此行添加到那里的窗口:

exec (your stored proc name) (and possibly add parameters)

您的存储过程被称为什么,它需要什么参数?

You just need to add this line to the window there:

exec (your stored proc name) (and possibly add parameters)

What is your stored proc called, and what parameters does it expect?

怪我闹别瞎闹 2024-08-05 18:58:27

正如 Marc 所说,您运行它就像从命令行运行一样。 请参阅 MSDN 上的创建 SQL Server 代理作业

As Marc says, you run it exactly like you would from the command line. See Creating SQL Server Agent Jobs on MSDN.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文