Database Maintenance Scripting Done Right

Why write your own when you can download a prewritten preventative maintenance script for SQL Server?

Kevin Kline, SolarWinds

February 15, 2011

2 Min Read
ITPro Today logo in a gray background | ITPro Today

I first wrote about useful database maintenance scripts on my SQLBlog account way back in 2008. Hmmm - now that I think about it, I first wrote about my own useful database maintenance scripts in a journal called SQL Server Professional back in the mid-1990's on SQL Server v6.5 or some such. But I digress...

Script


No, Not that kind of Script!

Anyway, I pointed out a couple useful sites where you could get some good scripts that would take care of preventative maintenance on your SQL Server, such as index defragmentation, updating statistics, and so forth. One of the script kits came directly from Microsoft's internal database management team. But, alas, they haven't published any updates in quite a while.

On the other hand, the other set of scripts came from Ola Hallengren, who has done a great job keeping his scripts up to date.Recently, Ola added support for updating column statistics, both in a generalized update and also updates for only those columns whose statistics have been modified. He's added some other goodies to the latest release, which you can read about here, http://ola.hallengren.com/Versions.html for all details.

In addition, I'd like to remind you of the white paper I wrote a while back called Automating DBA Processes, which covers many aspects of database automation and cherry picks some of the best practices from many different thought leaders, such as Ola, Michelle Ufford (blog | @sqlfool) who will be speaking at the 24HOP soon, and Allen White (blog | twitter).

Enjoy!-Kev
 Twitter at kekline
 More content at http://KevinEKline.com  

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like