How to automatically run a stored procedure on scheduler basis?

后端 未结 3 393
终归单人心
终归单人心 2021-02-01 09:52

I want to execute a stored procedure automatically at every night. How can I do it. Please guide me with steps to achieve this target.

Thanks in advance.

3条回答
  •  青春惊慌失措
    2021-02-01 10:21

    You can create a job with the SQL Server Agent.

    enter image description here

    Right-click on the Jobs folder to open the menu, select New Job:

    enter image description here

    When you create a new job a window will open and you will provide the details of you job that you want to create. Including:

    • Name - in the General tab
    • Steps - can run a SQL script, SSIS package, stored procedure
    • Schedule - recurring, weekly, daily, etc. at the frequency that you pick.

    Here is a Step by Step by Guide to creating a SQL Job

提交回复
热议问题