Home Authors Posts by Adam Machanic

Adam Machanic

Adam Machanic helps companies get the most out of their SQL Server databases. He creates solid architectural foundations for high performance databases and is author of the award-winning SQL Server monitoring stored procedure, sp_WhoIsActive. Adam has contributed to numerous books on SQL Server development. A long-time Microsoft MVP for SQL Server, he speaks and trains at IT conferences across North America and Europe.

T-SQL Tuesday Rules of Engagement

Just over seven years ago (wow, does time fly!) I launched T-SQL Tuesday. The core idea is simple: Each month, one blogger acts as “host.” He or she is responsible for choosing an interesting topic in or related to the SQL Server realm. Then a bunch of other bloggers all write articles on that...

Temporal Tables: Connect Item Round Up

I've been thinking a lot about SQL Server 2016 temporal tables of late. I think it's possibly the most compelling feature in the release, with broad applications across a number of different use cases. However, just like any v.1 feature, it's not without its faults.I created a couple of new Connect items and decided to see...

sp_whoisactive for Azure SQL Database – Attempt #2

Over a year ago now I announced a rough port of sp_whoisactive to Azure SQL Database. This worked thanks to Microsoft finally aligning the Azure DMVs to the box product DMVs...until Microsoft decided to rip out one of the key DMVs, sys.dm_os_sys_info and its ms_ticks column. This column is the key to unlocking various...

SQLQueryStress: The Source Code

Back in 2006, I created a very simple tool called SQLQueryStress. The goal of this tool was to enable the user to test a single query under some form of load -- up to 200 simultaneous threads.I wrote this tool primarily for a book I was working on at the time, and used it...

sp_whoisactive and Azure SQL Database

I've received a number of requests over the past couple of years for an Azure-specific version of sp_whoisactive. Given the combination of a lack of interesting DMVs available in Azure and my general lack of interest in all things Azure related, creating a modified version of the proc has not exactly been a top...

Re-Inventing the Recursive CTE

Working with hierarchies in SQL Server never fails to be absolutely fascinating.On the face of things they’re super-easy to model and seem to fit perfectly well: parent_key, child_key, self-referencing FK, and you’re done. But then you go to query the thing and there is a complete breakdown.Prior to SQL Server 2005 the product included...

Next-Level Parallel Plan Forcing: An Alternative to 8649

"Even experts with decades of SQL Server experience and detailed internal knowledge will want to be careful with this trace flag.  I cannot recommend you use it directly in production unless advised by Microsoft, but you might like to use it on a test system as an extreme last resort, perhaps to generate a...

Capturing Attention: Writing Great Session Descriptions

One of the best ways we can differentiate ourselves and further our careers is to get out of the office… and onto a stage. Presenting can give you name recognition; open doors to new opportunities; help you gain a deeper understanding of technology (teaching a topic often forces you to learn it at a...

CloudSeeder: CLR Stored Procedures For Creating CPU Pressure

Sometimes, in the interest of testing various scenarios that your server might encounter, it's useful to be able to quickly simulate some condition or another. I/O, memory, CPU pressure, and so on.This latter one is something I've been playing with a lot recently. CPU pressure in SQL Server creates all sorts of interesting side-effects,...

Thinking Big (Adventure)

If the title of this post doesn't have you scratching your head, you may have been paying very rapt attention last time you saw me speak.I love the portability of AdventureWorks and the fact that anyone can download it. Since it was released I've used it almost exclusively for demos in talks I've written....

Popular Posts