SQL Express -- Cleaning House, Automation
When we develop an ASP.NET client site, we deploy a SQL Server Express database along with it. We need to run a clean-up script to check for records older than n. hours, but unfortunately I cannot schedule a job do to the limitations of SQL Express. Are there any other alternatives or suggestions for automating clean-house that anyone may have had 开发者_JAVA百科experience implementing?
Use a conversation timer and run the maintenance from an activated procedure. Sign the procedure for cross-db or server wide access.
The big advantage is that is self contained in the database and survives across database copy and backup/restore operations (a scheduled 'job' will execute after a restore on a new system).
You could setup a Windows Scheduled Task that hits an ASP.NET page to do the clean up.
精彩评论