0

We have hundreds of servers and 99% of them have AOAG strategy. Patching takes HOURS since we need to patch secondaries (Windows patch) , wait to complete, manually fail over to the other node, Patch Windows, failback and let everything as it was.

how do you guys work with this assuming many of people here will have way more servers than me.

Let the windows shutdown sql server by itself is not an option, we need to Failover to be sure nothing will break. Im thinking about a powershell that would read all primaries in a group of servers, and failover, then wait for its patching, run again to see where sre the secondaries and failback but this seems even more work.

1 Answer 1

1

Patching SQL Server on Windows is a necessary monthly chore DBAs need to be involved in and this applies especially for clusters and AGs. And yes, this takes hours.

At most large organisations I have worked for, Windows servers are patched monthly out of hours (non prod servers and prod secondaries during work hours or overnight, stand-alone prod servers are usually at weekends). The SQL Server patching is usually timed to coincide with these schedules.

Some DBAs use PowerShell to script the patching of AG Secondaries using Update-DbaInstance from dbatools.io (that includes the option to restart Windows) and others prefer to RDP onto the server and and kick this patching off manually.

Note: you can keep the secondaries and primaries at a different patch level so sometimes patching occurs on 2 separate time periods/days for the same AG. Patching only secondaries means downtime is eliminated or only recorded as time to failover.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.