How to schedule a stored procedure?

后端 未结 2 1474
佛祖请我去吃肉
佛祖请我去吃肉 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: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.

提交回复
热议问题