To do a rolling upgrade of an Availability Group from Windows 2012R2, SQL 2012 to Windows 2019, SQL 2019 do I have to have an intermediary set of servers on Windows 2016? Based on the documentation it sounds like you can only go up one version (verbiage: "You can upgrade to the next version"). The only clustering component is for the Availability Group, no other roles and no services are clustered. I know SQL can go directly to 2019, it is the clustering component of the AG I am unsure about.
Rolling Upgrade Win2012R2/SQL2012 Availability Group to Win2019/SQL2019
availability-groupssql-server-2012sql-server-2019upgrade
Related Solutions
Yes, other than the 2012R2 bit what you are describing can be done, but to correct some of the terminology I think you are describing the following:
- A 4 server Window Geo cluster with 3 servers in Data Centre 1 (DC1) and one server in Data Centre 2 (DC2).
- Instance of SQL 2012 lets call it INST01 on server SQL1 in DC1. This instance will be used for your infrastructure dbs.
- Instance of SQL 2012 lets call it INST02 on server SQL2 in DC1. This instance will be used for your user dbs.
- Instance of SQL 2012 lets call it INST03 on server SQL3 in DC1. This instance will be used to run your local AOG replicas in normal running.
- Instance of SQL 2012 lets call it INST04 on server SQL4 in DC2. This instance will be used to run your DR AOG replicas in normal running.
From an always on perspective you will have:
- AOG group called ITDBS. This will exist across INST01, INST03 AND INST04. Always On Group ITDBS on INST01 would be the primary holding your infrastructure dbs and INST03 would be synchronous read only replicas (handy for reporting/scaling out) and INST04 would be asynch replicas for your DR scenario.
- AOG group called USERDBS. This will exist across INST02, INST03 AND INST04. Always On Group USERDBS on INST02 would be the primary holding your infrastructure dbs and INST03 would be synchronous read only replicas (handy for reporting/scaling out) and INST04 would be asynch replicas for your DR scenario.
The above Always On Group configuration assumes 1 AOG for each db type on each server, you will have to consider if you need to subdivide dbs if so just create more Always on groups. An AOG is basically just a way of grouping databases so they fail over as a logical consistent unit (unlike mirroring where there is no consistency across dbs in terms of failing over).
The above scenario gives you high availability with automatic failover if you wish due to synchronous replicas in DC1. It also gives you DR capability albeit with a manual failover to your SQL4 server in DC2.
If SQL1 and SQL2 are big enough you could use each as the others synchronous replicas thus avoiding the need for SQL3 (ie SQL1 sync reps would live on SQL2 and vice versa) but SQL1 and SQL2 would need to be big enough hardware to cater for the loads in the event of failure. This may save you some money. You would need to work out the costs of having SQL3 (hardware and SQL licenses) against the extra CPUs and memory you would need in SQL1 and SQL2 to run the extra load during failure.
From a licensing perspective and storage perspective quite expensive and all 4 servers need full Enterprise SQL licenses and all non shared storage.
One other possible way to save a bit on storage and everything is have a 3 server windows cluster with 2 in DC1 and 1 in DC2. Have SQL1 and SQL2 as a SQL failover active/passive cluster. This would mean in SQL2014 as long as you have Software Assurance for the license you get 28 days free failover to the passive node. This would save a lot on licensing but also storage as the 2 server SQL cluster would be using shared storage. The down side of this option is that failover is not instant as it is in your solution, there is a 20 second delay or so for the cluster service to failover (depends on disks etc). Your Always On Group would then include the FCI and the SQL3 in DC2. Also another downside of having an FCI in an AOG is you lose automatic failover, but the dbs in DC2 are asynch replicas so you wouldnt have feature anyway.
Also think about your quorum design, 3 would be a bit trickier you would need a vote from a witness disk and to use the DR server you would need to force quorum if both DC1 servers were down but once documented it is easy for your ops/dbas to follow.
Lots of info to consider, hope this helps.
How can all 4 servers have access to this drive, when I have one server in a different location on a different subnet?
Get really friendly with your network and security teams. Ask them, politely if need be, to create a file share for that folder and allow your service accounts access to said file share.
Other than the service account, this really doesn't have any involvement with SQL Server.
Best Answer
You are correct. For a Windows Cluster, you can only upgrade to the next version. Even though the Availability Group is the only resource, it is still built on Windows Clustering and must follow those upgrade rules. SQL Server can be upgraded anytime before or after upgrading the cluster.
So if you need to get from Win2012R2 to Win2019, then you would follow these basic steps.
https://learn.microsoft.com/en-us/windows-server/failover-clustering/cluster-operating-system-rolling-upgrade