Press "Enter" to skip to content

Category: Linux

Planned Failover of Availability Groups on Kubernetes

Anthony Nocentino runs a test:

When building the sql-on-k8s-operator, I wanted to make sure it could handle both planned and unplanned failovers. The easy case is a planned failover, where you deliberately move the primary role to another replica. The harder case is an unplanned failover, where the primary pod just disappears. The operator needs to handle both.

I recently ran a full planned failover rotation on a three-replica SQL Server Availability Group managed by sql-on-k8s-operator, and I want to show you exactly what happens inside SQL Server and the operator during each hop. If you’ve been following my Introducing the SQL Server on Kubernetes Operator post, this is the logical next step: what does the error log actually look like during a planned failover, what does the operator do in response, and how long does the whole thing take?

I ran the same three-hop rotation twice: once with an idle 5GB database to establish a baseline, and once under a sustained TPC-C workload with HammerDB. In this post, I’ll walk through the SQL Server error log entries, the operator’s reconcile behavior, and the timing data for both runs. In the next blog post, I’ll show what happens during an unplanned failover. Let’s go.

Click through to see how it all works.

Leave a Comment

SQL Server Kubernetes Operator

Anthony Nocentino shares a new project:

Are you considering replatforming your SQL Server workload due to recent vendor changes, but still need high availability and disaster recovery? You’re not alone. One of the challenges with running SQL Server on Kubernetes is that there’s no Kubernetes operator available. That means no automated lifecycle management, no automatic failover, and no standard way to bootstrap an Always On Availability Group on Kubernetes.

I’m excited to share it today as an open-source project: sql-on-k8s-operator. Let’s go.

Click through to see what it entails. All in all, that’s really cool.

Leave a Comment

Personalizing the Linux Command Line

Thomas Williams wraps up a series:

For an even better prompt, I’m a fan of “Oh My Posh” https://ohmyposh.dev/. Once installed, my prompt looks like below, shown in a Python Git repository directory – with the Oh My Posh prompt displaying my username, the directory name, the Git branch and files needing commit, the current Python version (because I’m in a Python project directory with uv), and lastly the time it took to complete the previous command and whether the command was successful:

Click through for the remainder of Thomas’s advice. My main thing about personalizing the Linux command line is just making sure I get that .bashrc file everywhere I can, as it’s neat to have a bunch of useful commands and shortcuts, but then you get dumped on a new shell without your .bashrc and you’re struggling even harder.

Comments closed

More Command Line Personalization

Thomas Williams continues to personalize the command line:

In my last post, I customised my Linux command line with 4 dotfiles. Putting the time into finding my way around the command line, and learning Linux commands, becomes more important on a Linux server because there’s no GUI.

I’ll continue tweaking in this post by modernising two classic commands I use daily, and adding two helper packages.

Read on for a few Linux packages that make life easier.

Comments closed

Personalizing the Command Line in Linux

Thomas Williams messes with the command line:

This post is part 1 of quality-of-life changes I make when I first log in to a new Linux server. I primarily use bash (though I also have zsh set up on some machines):

  • .hushlogin
  • .inputrc
  • .vimrc
  • .bashrc

Click through for some examples of customization. I’m not sure if Thomas will get to this in the series, but I like using powerline for more advanced customization.

Comments closed

Changing SQL Server on Linux Editions

Vlad Drumea swaps the edition:

In this post I cover the steps required to change (downgrade or upgrade) the edition of a SQL Server instance running on Linux.

In my previous post I’ve went through the steps of installing SQL Server 2025 on Ubuntu 24.04 LTS.
While the process is pretty straight-forward, there might be cases where someone can accidentally specify the wrong edition and only notice afterwards.

Luckily, the edition can be changed with just a few commands.

It’d be neat if it worked the same way for Windows.

Comments closed

25 Years of SQL Server Central

Steve Jones has a retrospective:

The oldest article we have on the site is Tame Those Strings! Part 4 – Numeric Conversions, by me. It’s dated 2001-04-18, though I think that’s a date we picked when we converted all the content from one database to another. The founders agreed sometime during Feb 2001 to jointly run SQL Server Central. Since we each owned the copyright of our articles from another site, we migrated several articles to build up our content library. This was back when AndyBrian, and I all had full-time jobs and managed the site during breaks, nights, and weekends.

That was 25 years ago.

I think there are a lot of DBAs who cut their teeth on SQL Server with the help of SSC. I know I was one of them, having been a SQL Server Central e-mail subscriber for a very long time. Not 25 years, but 15+, at least.

It was one of the best pieces of advice I received from a poker buddy who was a database architect: first thing in the morning, spend about 20 minutes reading articles. It’s time that nobody else will come in to bother you, and you can focus on learning and self-growth without needing to follow the ebbs and flows of the day.

That blended quite well with some good advice from Sean McCown to set aside an hour a day for learning and experimenting.

Comments closed

Building an Ubuntu VM from Powershell Script

Vlad Drumea has a script:

I needed a fresh Ubuntu VM in VirtualBox this weekend so I figured I can take this opportunity to refresh my PowerShell based process.

Prerequisites

For this VM I’m using the following:

  • Oracle VirtualBox 7.2.6 r172322 running on a Windows host.
  • The installation media (ISO file) for Ubuntu 24.04.3 LTS.
  • 51GB of available space on the drive where the VM will live.
    Note that the default Ubuntu install is ~10GB, but I want the extra space to be able to install other stuff later on.

Click through for the script and explanation of the process. It’s not entirely automated, but Vlad does get to the Ubuntu installation point via Powershell and then takes it up from there.

Comments closed

SQL Server Container Startup Scripts

Andrew Pruski notices a change:

Hmm, ok we have a script /opt/mssql/bin/launch_sqlservr.sh and then the sqlservr binary is called.

I swear this wasn’t always the case, have I seen that before? Started to doubt myself so spun up a pod running an older version of SQL (2019 CU5) and took a look: –

It looks like this was a somewhat recent change, but with it comes an interesting new capability that Andrew shows off.

Comments closed