I'm busy reviewing my SQL Maintenance plans and I'm a bit confused with the recovery model option on the databases, specifically related to point in time recovery.
Here is my scenario:
- I have two maintenance plans
- One that does hourly transaction log backups
- another that does a daily full backups (but first a transaction log backup before the full backup)
- All databases are set to use the simple recovery model.
Here are my Questions
- Seeing that the recovery model is set to simple and msdn states that the simple recovery model does not support point-in-time recovery - Does this mean that I won't be able to use my transaction log backups to restore the database in a disaster to an hour before it happened?
- Which backup should be done first, the database backup or the transaction log backups?
Articles that I'm busy reading say I should do the database backup first and then the transaction log backup else I will get maintenance plan errors, but I'm currently first backing up my transaction logs and then data databases and I'm not getting any errors.
My final solution (Maintenance Plan)
Set all databases to use the FULL recovery model. Then:
Hourly Maintenance Plan:
- Check sufficient hard drive space for backups
- Make Transaction Log Backups
- Archive transaction log backups (zip the .trn files)
- FTP the archived transaction log backups offsite
Daily Maintenance Plan:
- Check sufficient hard drive space for backups
- Do a full database backups followed by transaction log backups
- Archive backups (zip the .bak and .trn files)
- FTP the backups offsite
Weekly Maintenance Plan:
- Check database integrity
- Rebuild indexes
- Cleanup history older than 4 weeks
- Delete .bak and .trn files older than 4 weeks
- Delete archived backups (zip file) older than 4 weeks
If any task fails a notification email is sent. A success email is also sent when the daily and weekly task finish successfully.
Note of testing your maintenance plans. My first backups got corrupted by the ms windows ftp.exe not configured correctly to use passive mode. SO CHECK YOUR BACKUPS :)