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...
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
) who will be speaking at the 24HOP
soon, and Allen White (blog