Finding and stopping rogue SQL traces

Introduction A common cause of mysterious performance issues are traces that have been left running. Naïve use of traces can leave many traces running—traces that are slowing down the application by consuming critical resources. This happens because the SQL Server Performance Analyzer process is killed or trace sessions forgotten. In analyzing an issue, many traces…


SQL Server performance investigation

Introduction I frequently help teams inside and outside of Microsoft investigate SQL Server database performance issues. As well, I monitor some large internal SharePoint databases to understand their performance characteristics and to make sure we are improving our overall performance. Here are some of the queries I use to investigate performance issues and monitor performance….


Top 25 most dangerous programming errors

The paper “Top 25 Most Dangerous Programming Errors” ( is an interesting study of the families of programming errors that lead to security issues. The paper is based on input from a wide variety of security experts and is worth reading. The complete list of errors is at From a T-SQL perspective, however, it…


T-SQL casing conventions feedback

Thanks everyone for the great blog and email comments on how we should deal with T-SQL casing conventions.   There was a lot of interesting feedback on casing conventions for T-SQL. In summary, the main feedback was Default capitalization should follow the documentation Capitalization has value for all the non-Visual Studio tools people use Intellisense…