Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Help with SQL 2008 Maintenance Plan

$
0
0

Hoping this is the right forum...

We've been running a one-database SQL Server since converting from Access in 2010. The database backup type is Full. A Maintenance Plan was created at the outset consisting of 3 sub plans: Daily, Differential and Log Backups. The Daily runs overnight and performs these tasks: 1) Rebuild Index, 2) Update Statistics, 3) Check Database Integrity, 4) Maintenance Cleanup, 5) History Cleanup, and 6) Database Backup. Tasks 1 & 2 run against our one database named ALIS. The other tasks include the system databases. The Differential runs every 2 hours and the Log Backups every 15 minutes during business hours from 8 am to 9 pm, 7 days a week.

The database size is currently 21.5 GB. The log size has been growing in step with the database and lately crossed the 13 GB mark. With the company closed on Dec 26th, I used the opportunity to shrink the log down to its minimum, roughly 300 MB, then I resized it to 5 GB. This morning, after the Daily ran, the log size is back up to 13 GB with 98.7% log space used. After a Log Backup the log space used is 0.31%. I assume this is because the Full backup type is logging the Daily's Index work.

I'm asking for suggestions about how to avoid the Transaction Log bloat. My strategy would be to update the Daily sub plan by switching the database type from Full to Simple before Task 1 then switching it back from Simple to Full after Task 2. If anything happened during those tasks we could recover from the previous night's Full and the day's last Differential.

I'm not sure how I would accomplish this switching as I didn't author the original Maintenance Plan nor do I have any experience with these. I'm guessing that I would add an Execute T-SQL Statement task along the lines of:

ALTER DATABASE ALIS SET RECOVERY SIMPLE;
GO

and place it first in the list of Tasks. Then insert another of these between Tasks 2 and 3:

ALTER DATABASE ALIS SET RECOVERY FULL;
GO

Is this what you would do? Any other suggestions?

Thanks!


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>