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 experience implementing?
A:
You could setup a Windows Scheduled Task that hits an ASP.NET page to do the clean up.
RedFilter
2010-02-02 23:51:06
Or a Windows scheduled task that *just* performs the clean up (no page hittage needed)
onupdatecascade
2010-02-03 00:11:33
I would use the web page because a) let's you run remotely if you need to, and b) keeps your code in the same place...
RedFilter
2010-02-03 02:05:00
+4
A:
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).
Remus Rusanu
2010-02-03 00:11:14