SQL server agent Job execute stored procedure with parameters

Teena 1 Reputation point
2021-08-03T07:47:04.153+00:00

Hi,
I would like to create an sql server agent job which executes a stored procedure that has multiple parameters.

I looked at the below link but I am not sure how to proceed.

https://social.msdn.microsoft.com/Forums/en-US/6a136d77-dd92-4e7a-94c4-ff038836bff2/send-parameters-to-sql-server-agent-jobs-job-steps?forum=sqltools

Appreciate your help.

Azure SQL Database
{count} votes

1 answer

Sort by: Most helpful
  1. Anurag Sharma 17,631 Reputation points
    2021-08-03T10:33:11.943+00:00

    Hi @Teena , welcome to Microsoft Q&A forum

    I am assuming you are talking about on-premise SQL Server and not Azure SQL. Below is one stack thread that has clear steps to execute a stored procedure with input parameters. It is having one parameter but you can extend the concept to include multiple parameters. Please check the first answer in it:

    Create SQL Server Agent job for stored procedure with input parameter

    Please let me know if this helps or else we can discuss further.

    ----------

    If answer helps, you can mark it 'Accept Answer'

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.