Right now we have a maintenance plan which looks like this:
- backup all databases
- clean old backups (> 24 hours)
This job runs every day. Every now and then this script crashes during backup step so we are left with all old backup files.
We want to rewrite this maintenance plan so it runs like this:
- backup database 1
- clean old backup for database 1
- backup database 2
- clean old backup for database 2
- etc...
For the first we can use built in actions. Is there any simple approach for the last method described? Or do we have to script it completly?
We don't want to add all databases manually because then we have extra maintenance work everytime somebody adds a new database which also results in potenitially unbackuped databases.