How to run a stored procedure every day in SQL Server Express Edition?

前端 未结 11 1498
野的像风
野的像风 2020-11-28 08:06

How is it possible to run a stored procedure at a particular time every day in SQL Server Express Edition?

Notes:

  • This is needed to truncate an audit t
11条回答
  •  庸人自扰
    2020-11-28 08:50

    Since another similar question was asked, and will likely be closed as a duplicate of this one, and there are many options not mentioned in the answers already present here...

    Since you are using SQL Express you can't use SQL Server Agent. However there are many alternatives, all of which you can schedule using AT or Windows Task Scheduler depending on your operating system:

    • VBScript
    • C# command line app
    • batch file with SQLCMD
    • PowerShell

    All of these languages/tools (and many others) have the capacity to connect to SQL Server and execute a stored procedure. You can also try these Agent replacements:

    • SQLScheduler
    • Express Agent
    • Standalone SQL Agent (beta)

提交回复
热议问题