Sql-server – Best tool to optimize SQL Server (not the queries, but the database itself)

sql server

Does anyone know what is the best tool to optimize an entire SQL Server database?

I'm not talking about how to write the queries but more how to manage the database file, indexes, paging and fragmentation.

PAINFUL TRUTH
The eternal fight between tools vs DBAs is still there …but what I just wanted to know the basics till the product grows and then I can hire a non grouchy DBA :–)

Best Answer

I'd echo @Mark Storey-Smith's comment - a competent DBA is the best way to go here. You can't really automate a well tuned SQL Server but a good DBA can setup various maintenance items to keep it running well.

Sounds like you were asking a lot about maintenance so one great spot to look for some scripts to help setup a best of breed monitoring solution is Olla Hallengren's Maintenance Solution scripts explained on Olla's site here.

That will help ensure you are at least doing the important maintenance items (Index rebuilding/reorganizing, statistics updating, backups, updating statistics, checking database integrity, etc.)

As far as the ongoing optimization, I'd suggest picking up a copy of the Professional SQL Server 2008 Internals and Troubleshooting book. It has just the right amount of internals knowledge to help you understand the "why" behind best practices and contains plenty of practical examples for implementing the best practices.

Or I'd recommend the same Internals & Troubleshooting book but for SQL Server 2012. Contains some great chapters just for your question. Like how to perform a SQL Server Health Check, by Glenn Berry.