How to schedule a stored procedure?

后端 未结 2 1472
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-09 04:21

How do I schedule a stored procedure in Sql Server 2005 that it runs once at the start of every month (and on database startup)?

相关标签:
2条回答
  • 2020-12-09 04:44

    You will need to create a job using the SQL Server Agent.

    0 讨论(0)
  • 2020-12-09 04:58

    In SQL Server Management Studio, go expand the SQL Server Agent node under the DB server, right click the Jobs folder and select New Job...

    (If the SQL Server Agent node does not appear, you may be missing the required permissions)

    That will take you through a wizard to schedule a sproc to run on whatever schedule you want.

    In terms of how to get a sproc to run on db startup, see this article.

    0 讨论(0)
提交回复
热议问题