Home Authors Posts by Adam Machanic

Adam Machanic

91 POSTS 4 COMMENTS
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.

sp_whoisactive for Azure SQL Database – Attempt #2

9
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

31
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

17
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

18
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

33
"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

79
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

2
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)

6
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....

A Computer Scientist Meets T-SQL

3
There I was. A freshly printed bachelor's degree in Computer Science tucked under my arm, I walked into my First Real Job. I'd never touched the technologies I was going to work with--ASP 3.0 and SQL Server--but my employer knew that, and I figured I'd be able to pick things up relatively quickly. After...

T-SQL Tuesday #21 – A Day Late and Totally Full of It

36
“This ugly hack is only temporary,” you think. Six months later, a coworker curses your name, sacrificing a chicken to any deity that will help expedite your getting struck down by lightning, a school bus, or both.Crap code. We’ve all seen it. We’ve all created it. We’re all guilty. Yes, even you. Sometimes our...

Popular Posts