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

Thomas Bratt picture Thomas Bratt · Nov 4, 2009 · Viewed 89.8k times · Source

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 table
  • An alternative would be to modify the insert query but this is probably less efficient
  • SQL Server Express Edition does not have the SQL Server Agent

Related Questions:

Answer

Raj More picture Raj More · Nov 4, 2009

Since SQL Server express does not come with SQL Agent, you can use the Windows scheduler to run a SQLCMD with a stored proc or a SQL script.

http://msdn.microsoft.com/en-us/library/ms162773.aspx