如何在 SQL 代理作业中执行存储过程?
问题描述:
我使用的是 SQL Server 2008,我需要从 SQL Server 代理运行 SQL 作业.我是 SQL Server 作业的新手,我想定期从 SQL Server 作业执行存储过程.但是除了copy &我没有找到在哪里指定执行的存储过程.粘贴 SQL 命令.
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.
这是我的屏幕截图:
任何想法如何分配存储过程以在 SQL Server 作业中执行?
Any ideas how to assign stored procedure to execute in SQL Server Job?
答
你只需要在窗口中添加这一行:
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?