Here’s a really useful article on how to schedule backups and to run SQL scripts without using SQL Agent.
http://www.diaryofaninja.com/blog/2011/02/14/howto-quick-amp-dirty-sql-express-scheduled-backup
This is particularly relevant for SQL Server Express installations where agent isn’t available.
The pertinent part of this is using Windows scheduler to execute the a .sql script via SQLCMD.
SQLCMD.EXE -S .\sqlexpress -E -i C:\DbScripts\BackupDatabases.sql
Another tip I’ve picked up recently is using the Windows forfiles command to delete files over x number of days. Here’s the example syntax.
FORFILES /P C:\MyPath\ /S /M *.bak /D -5 /C “cmd /c del @file”
Thanks for the link, I’m glad you enjoyed the post!
Like your blog, keep up the great work!