Title: SQL Server DMVs in Action
Author: Ian Stirk
DMVs are Dynamic Management Views – they were introduced in SQL Server 2005 and further refined in SQL Server 2008. They maintain information about whats happening on on your SQL Server – in real time. They supply a snapshot of whats happening and a view of what has happened as they accumulate data since SQL Server was started.
DMVs are a very powerful, but little understood facet of SQL Server. The book has 11 chapters:
- The DMV gold mine
- Common patterns
- Index DMVs
- Improving poor query performance
- Further query improvements
- Operating System DMVs
- Common Language RunTime DMvs
- Resolving Transaction issues
- Database level DMVs
- The self-healing database
- Useful scripts
At 325 pages its not a massive book but it is packed with useful information. The first two chapters supply an overview of DMVs and some common code patterns that will be re-used throughout the book. The second chapter will repay careful reading as the themes introduced here permeate the whole book.
The books second part – chapters 3-11 – cover how to use DMVs to solve database related problems. The chapter titles speak for themselves with chapter 3 showing ways to identify missing indexes and 4 and 5 showing how to identify and improve SQL queries
Chapter 6 covers SQL Server’s interaction with the OS and the server – showing how to identify waits and blocks. Chapter 7 on the CLR is of great interest if you are using CLR code in your queries. Chapters 8 and 9 on transactions and databases are back to finding SQL Server related issues.. The last two chapters show how to pull all of this together to produce a database that can start to heal its own problems – personally I’d prefer it to make suggestions rather than implement but that is just details. The final chapter presents some useful scripts that build on the earlier chapters.
The books 100+ code snippets are ready to use and directly useful in your environment
If you work with SQL Server this is one you should have on your book case. Highly recommended