Home Blog Page 2

The SQL Genie (T-SQL Tuesday #086)

6
At some point a long time ago, when I was first getting serious about SQL Server, I became aware of an open secret. You see, there was this special Microsoft alias called “sqlwish.” Those in the know could send an e-mail and pass along suggestions for improving the product. And they wouldn’t just vanish into...

T-SQL Tuesday Rules of Engagement

0
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

5
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

11
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

18
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

19
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,...

Popular Posts