Archive for February, 2012

RYO Maintenance Plan – Update Statistics

Another key component of any good maintenance plan is updating statistics. Statistics are what help the SQL Server optimizer choose the best execution plan for your queries. Let your stats get too far out of date, and watch your query performance tank. For me, the biggest shortcoming of the update statistics maintenance plan task is [...]

February 21, 2012  Tags: , , ,   Posted in: Maintenance  2 Comments

Using Powershell to Deploy Performance Monitor

As good little DBAs, we should be gathering baseline statistics for our database servers. These stats can give us insight into what’s changed when performance is suddenly in the toilet. They can also provide a basis for determining what systems can be consolidated, downsized, or virtualized, which has become quite the topic of discussion with [...]

February 13, 2012  Tags: , , ,   Posted in: Powershell  2 Comments

RYO Maintenance Plan – Enhancement Request

In response to my last post, I got a very interesting comment from Philip: “I would love to see a way to add logic that will verify at least X backup files for a given DB remain. Specifically, in my organization, I would like to delete all but the most recent one– even if that [...]

February 9, 2012  Tags: , ,   Posted in: Maintenance, T-SQL  No Comments

RYO Maintenance Plan – Database Backups, Part 3

I’ve covered creating my backup directories and the actual backup of the database(s). The last thing I want to do in my process is clean up any old backup files. Once again, I want to allow for some flexibility in my procedure. Much like the maintenance plan task I’m replacing, my procedure should be able [...]

February 6, 2012  Tags: , , ,   Posted in: Maintenance, T-SQL  5 Comments