Author Archives: Andy Hogg
A Couple of notes on the STRING_AGG function
Just a couple of quick notes from playing around with the T-SQL STRING_AGG function. As it says on the tin (well in the online documentation actually) “STRING_AGG is an aggregate function that takes all expressions from … Continue reading
You’re out of order! You’re out of order! The whole result is out of order!
The question of where NULL marks should appear within an ordered result is an interesting one. The SQL standard states that NULLs should be placed together, but it is left to the implementation as to whether they appear … Continue reading
Generate SSRS Subscription E-Mail Address Lists from AD with PowerShell
It takes a lot of time to create SSRS e-mail subscription recipient lists when there are a large number of recipients, and all you have are the recipients’ human names. I wrote a PowerShell function to take a list … Continue reading
Repairing Dropped SSAS Performance Counters
My last post covered rebuilding dropped performance counters for the SQL Server (Relational Engine). However SQLSentry Performance Advisor can also monitor Analysis Services, which from time to time is prone to the same dropped performance counter malady. If you’re suffering … Continue reading
SQL Sentry Tips and Tricks
I’ve used the SQL Sentry product suite (Performance Advisor and Event Manager) for some time now. It’s a great product, which has proven its value time and time again. As well as experience in implementing and using the product, I … Continue reading
If You Can’t Stand the Heat, Stay Out of the Kitchen
The Data Warehouse luminary Dr Ralph Kimball once made an analogy in one of his books comparing a Data Warehouse to the kitchen of a busy restaurant. He said that if we were running a restaurant, we would never allow … Continue reading
Get-Curry | Look-Disinterested – How PowerShell has a part time job working in a takeaway on the Tottenham Court Road
Stepping out the other day for a quick lunchtime takeaway, my conversation with the staff went something like this:- Me: “Hi there”. Server: <Looks at me like I’ve just asked to defecate in his hat> Me: “May I have a … Continue reading
The Truth about Cats and Dogs (Why Stored Procedures don’t use Filtered Indices)
With SQL Server 2008 came an interesting enhancement – the filtered index. This is a really useful tool when trying to deal with columns containing a wildly unbalanced distribution of values. For example in a database of medical patients, where … Continue reading
Confusing Signage in SQL Server 2008 R2 Service Pack 2
The other day whilst applying SQL Server 2008 R2 Service Pack 2 to an instance, I had cause to cancel out of the installation. I did this at the pre-flight check stage by clicking the “Cancel” button. Upon doing this … Continue reading
Puzzling Lock Escalation Behaviour in a Partitioned Table
Here’s some lock escalation behaviour that I found interesting and thought I’d share. This is a link to all the T-SQL in this blog if you’d like to play along with me:- Play along with SQL Let’s start by creating a … Continue reading