
Archive:
- November 2026 (6)
- October 2026 (6)
- September 2026 (5)
- August 2026 (8)
- July 2026 (8)
- June 2026 (7)
- May 2026 (7)
Search site:
Tags:
Availability Groups (3) Concurrency (3) debian (4) docker (2) Execution Plans (7) Indexes (4) internals (12) linux (7) MongoDB (2) MR2 (2) Optimization (7) Performance (9) Performance Tuning (3) postgres (8) Powershell (3) RCSI (2) SQL Server (32) Statistics (2) Version Store (2) windows server (3)
Categories:
Docker (2) Linux (5) MongoDB (2) PostgreSQL (8) Powershell (2) SQL (1) SQL Server (33) Windows Server (3)
Category: SQL Server
-
Setting up a SQL Server Availability Group

In this post, we’ll walk through how to set up a SQL Server Always On Availability Group (AG). I have two Windows Servers – SQL01 and SQL02. Both are set up in a Windows Server Failover Cluster (see this post for more detail on that). Now we’ll walk through the steps that are required within…
-
Query Store – How to Inject a Hint

In this post, we’ll look at a feature in SQL Server Query Store that was introduced in SQL Server 2022. I absolutely love Query Store, I use it so much I can barely remember what life was like without it. One of the things that has been great about Query Store since its early days…
-
Setting Up a Windows Cluster

In this post, we’ll walk through setting up a Windows Server Failover Cluster (WSFC). This is a requirement of SQL Server Availability Groups, something which we’ll be using on this blog and so I will be setting one up that can be used in the home lab I use to write my blogs. A Windows…
-
Installing SQL Server on Linux

SQL Server on Linux – one of those things that you can’t believe actually exists – two worlds you never thought would collide. For years, Microsoft and Linux were very much apart, until the announcement in 2015 that Microsoft Loves Linux. SQL Server on Linux was launched in 2017 and whilst I won’t get into…
-
How SQL Server Solves the Halloween Problem

It’s that time of year again when ghouls and spooks surface and database bloggers write about an issue that shares its name with Halloween. Around mid to late October, you often come across database blogs about a phenomenon that dates all the way back to the mid-1970s: the Halloween Problem. This is my take on…
-
Seasonal Clock Changes and SQL Server

In this post we’ll look at the behaviour of a SQL Server application that needs to deal with events that are logged over the period of a UK clock change where the clocks change from GMT (Greenwich Mean Time) to BST (British Summer Time). The Problem Let’s say we have an events table with a…
-
Using Files in UNC Paths with PowerShell in SQL Server Agent

In this post, we’ll look at how PowerShell job steps may have issues connecting to network locations from within SQL Server Agent job steps. Timeless Backup Job When working with SQL Server backups, I bet we’ve all seen agent jobs that look like this: It’s a classic backup job – run the backup using T-SQL…
-
Optimizing Window Functions in Derived Datasets

In this post, we’ll look at some interesting behaviour I’ve stumbled across with window functions and derived datasets in SQL Server. I came across a query in a workload that was looking to get the most recent thing per group, a representative example in the Stack Overflow 2010 Database is below. The database is provided…
-
Filtered Indexes and Plan Parameterization

In this post, we’ll look at how filtered indexes in SQL Server work when the query is parameterised on the column of the filtered index. The query The following query in the Stack Overflow 2010 Database, provided under cc-by-sa 4.0 licence from Stack Exchange Data Dump, will find all users with the name John whose…
-
Reseed Identity – Can it Cause Clashes?

I recently had cause to reseed an identity column on a table in SQL Server, which got me wondering “If we reseed an identity column to a value lower than the existing identity values in the column, could it cause a clash?” Because why wouldn’t you wonder if you can cause something to break, whilst…