r/SQLServer • u/TheSpideyMan • Oct 28 '25
Question Switching a Windows Server 2022 WFC with a SQL 2022 AG from VNN to DNN
Are there any good technical articles on migrating a Windows Server 2022 WFC cluster running a SQL 2022 AG from VNN (virtual network name) to DNN (distributed network name)? The documentation on this appears to be a little sparse.
Any pointers on doing without downtime would be appreciated.
2
Upvotes
•
u/AutoModerator Oct 28 '25
After your question has been solved /u/TheSpideyMan, please reply to the helpful user's comment with the phrase "Solution verified".
This will not only award a point to the contributor for their assistance but also update the post's flair to "Solved".
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/TheSpideyMan Oct 28 '25
These are OnPrem multi-subnet SQL 2022 AG’a originally deployed with WFC’s with VNN. We need to move the AG nodes in one data center to another data center and re-IP while we are failed over to the over data center.
1
u/Lost_Term_8080 Oct 28 '25
You deploy them side by side. The instructions MS has are really vague as to what the setup does and at some time in the last year the PowerShell script they had, had a bug in it but I think it has since been corrected.
You cannot use the same port for the DNN and the VNN, and the VNN cannot use the same port as the SQL instance uses as its primary port.
If you are using read only routing, be cautious. There is a bug in either read only routing and/or several SQL clients and multisubnetfailover=true that may bubble up after you enable DNN. In my case, enabling DNN caused all connection strings with multisubnetfailover=true and applicationintent=Readonly to break after they had worked for several years where the secondaries were not set to be readable. Read only routing had been soft disabled by setting the read only routing list to include only the primary node.
I never quite figured it out the exact nature of the bug, but it involved those four things:
Readonly routing enabled
ApplicationIntent=true
Multisubnetfailover=true
Secondary replicas not set to readable
In pre-testing it worked fine, broke in production and then after building around 40-50 test availability groups was able to make it break with the same error message and then was unable to get it to work again in test after that.
In theory, you deploy the VNN and nothing changes then you move one app at a time to use the DNN.
In what broke in my environment, deleting the DNN did not fix the broken connections to VNN listener and we had to recover by changing connection strings to get rid of applicationIntent - rebuilding the VNN listener may have fixed it, but wasn't what we did
1
u/dbrownems Microsoft Employee Oct 28 '25 edited Oct 30 '25
If you're already mult-subnet you shouldn't need a DNN or a ILB.
Configure DNN Listener for Availability Group - SQL Server on Azure VMs | Microsoft Learn
You just create the AG listener with an IP address from each subnet, and the cluster guarantees that at most one of the IPs will be online at any time. Whichever node brings the name resource online will only attempt to bring the subnet-local IP address online, and this IP address is already associated with the VM in Azure Networking.*
*The whole reason a DNN or ILB is necessary in a single-subnet cluster is that Azure Networking won't allow a VM to dynamically bring a new IP online.