SQL Server AG Patching with Ansible: Tasks Jun 10, 2025

In my last post, we defined the prerequisites needed for patching.  Before applying the patch, we need to make sure the variables are set and that we're dealing with a healthy AG.  With those out of the way, we're ready to build out the remaining tasks.  

  • tasks/cleanup.yml
  • tasks/failback.yml
    ...
Continue Reading...
SQL Server AG Patching with Ansible: Prerequisites May 07, 2025

Defining the prerequisites before you start patching is extremely important.  I'm not talking about making sure your Ansible control node is set up and testing access to your SQL Server AG replicas (very important as well, but a different subject).  

Nope, I'm talking about making sure that the exe...

Continue Reading...
SQL Server AG Patching with Ansible: Creating Your Role Structure Apr 30, 2025

Ansible's inventory file is fundamental for defining and organizing the servers to be managed in a SQL Server Availability Group.  It serves as the "address book" for Ansible to use when patching these instances. 

Next up are roles. 

We'll build an example role as part of this blog series (disclai...

Continue Reading...
SQL Server AG Patching with Ansible: Building the Perfect Inventory File Apr 22, 2025

In my previous post, we explored the concept of rolling updates for SQL Server Availability Groups and how Ansible can transform this complex process into a streamlined, repeatable operation. We discussed the benefits of automation and outlined a high-level strategy for implementing this approach.

...
Continue Reading...
Beyond Manual Patching: Automating SQL Server AG Updates with Ansible Apr 15, 2025

Over the past few weeks in the AutomateSQL Insiders Community, we've been discussing SQL Server patching.  More specifically patching Availability Groups in a rolling fashion.  This technique keeps your replicas up to date while maintaining minimal downtime. 

Automated patching is nothing new.  You...

Continue Reading...
Install SQL Server Management Studio 21 (Preview) Using Ansible Nov 13, 2024

SQL Server Management Studio 21 (Preview) was announced last week at PASS Data Community Summit 2024.  It has some cool new features that are available in the preview.  

You can check those out here.

If you're familiar with Ansible, you know how easy it is to deploy software. I'll share a playbook...

Continue Reading...
Two Methods to Configure SQL Server Aliases Aug 03, 2024

Edition: Saturday, August 3rd, 2024

A few weeks ago I needed to configure replication between two SQL Server 2022 named instances, on separate networks.  In this configuration, the publisher would push data to the subscriber and all related replication jobs would reside at the publisher.  

It's be...

Continue Reading...
Ansible By Examples - Simplify SQL Server Patching Jul 13, 2024

Edition: Saturday, July 13th, 2024

On July 9th, 2024, Microsoft released a GDR update for multiple editions of SQL Server.  As a DBA, you may be planning how to install this update in your lower environments (DEV, QA, UAT, etc.), tested, and then deploy to production.

However, you may have also ex...

Continue Reading...
Ansible By Example - How I Use Ansible Roles Jul 06, 2024

Edition: Saturday, July 6th, 2024

As you begin creating playbooks to automate your work, you'll soon discover they can become many 100s of lines of YAML. 

Ansible Roles, allow you to group tasks, variables, handlers, and other artifacts.  Today, I'll focus on an example role I've built and used to...

Continue Reading...
Ansible By Example - How I Use Ansible Vault Jun 29, 2024

Edition: Saturday, June 29th, 2024

Storing passwords in plain text files is a big problem.  Such as the SA password when working with SQL Server.   But how do you automate the installation of SQL Server and store the password securely?

If you're using Ansible, it's easy.  

Let's jump in. 

What i...

Continue Reading...
Ansible By Example - How to Use Ansible Templates for SQL Server Configuration Files Jun 22, 2024

Edition: Saturday, June 22nd, 2024

SQL Server's configuration files can be a little daunting at first glance.  There are over 50 options which can be set.  Usually, these are supplied when using the installation wizard.  But, what if you needed to automate the installation of SQL Server?  That's wh...

Continue Reading...
Ansible By Example: Ansible Facts on Windows Jun 15, 2024

Edition: Saturday, June 15th, 2024

No one wants to build a new SQL Server instance, release it to production, and immediately request a maintenance window to fix a configuration issue.

Has this ever happened to you before?  I've experienced it a few times, and it doesn't reflect well on the DBA te...

Continue Reading...
1 2