Asked by:
is possible to change sql alwayson from single subnet to multi subnet?

Question
-
All replies
-
not
//Get location by given IP address string ipAddress = "2001:4898:80e8:b::189"; Response<IpAddressToLocationResult> result = client.GetLocation(ipAddress); //Get location result country code Console.WriteLine($"Country code results by given IP Address: {result.Value.IsoCode}");
-
-
Hello, I think you can do it via SSMS or T-SQL like this, test it in a non-production environment first:
ALTER AVAILABILITY GROUP [my_ag]
MODIFY REPLICA ON
N'<replica_server_name>'
WITH (SECONDARY_ROLE (ALLOW_CONNECTIONS = NO),
AVAILABILITY_MODE = SYNCHRONOUS_COMMIT,
FAILOVER_MODE = MANUAL,
SECONDARY_WSFC_SERVICE_ACCOUNT = '<domain>\<account>',
SECONDARY_WSFC_SERVICE_ACCOUNTPWD = '<password>',
ADD_SECONDARY_ROLE_MEMBER_DSN = '<DSN_name>',
ADD_SECONDARY_ROLE_MEMBER_NET_ADDRESS = '<IP_address>',
ADD_SECONDARY_ROLE_MEMBER_SUBNET = '<subnet_name>')
my_ag is the name of the availability group that you want to modify.replica_server_name is the name of the replica server that you want to add a subnet to.
domain\account is the Windows domain and account that the secondary WSFC service should run under.
password account password.
DSN_name is the name of the DSN that should be used for the secondary replica.
IP_address is the IP address of the secondary replica.
subnet_name is the name of the subnet that you want to add.
Tell me if it worked for you.
Best Regards, Rui.
-
-
After the cluster feature has been added to each SQL Server VM, you are ready to create the Windows Server Failover Cluster.
To create the cluster, follow these steps:
Use Remote Desktop Protocol (RDP) to connect to the first SQL Server VM (such as SQL-VM-1) using a domain account that has permissions to create objects in AD, such as the CORP\Install domain account created in the prerequisites article.
In the Server Manager dashboard, select Tools, and then select Failover Cluster Manager.
In the left pane, right-click Failover Cluster Manager, and then select Create a Cluster.
Create Cluster
In the Create Cluster Wizard, create a two-node cluster by stepping through the pages using the settings providedRegards,
Rachel Gomez
-
Yes, it is possible to change a SQL AlwaysOn deployment from a single subnet to multi-subnet. However, it is recommended to plan for multi-subnet deployment from the beginning to ensure high availability and disaster recovery.
When deploying AlwaysOn Availability Groups in a single subnet, all the replicas are connected through a single network. This creates a single point of failure for the entire deployment. If the network goes down, all the replicas will be unavailable, resulting in downtime for the application.
In a multi-subnet deployment, the replicas are spread across different subnets, providing redundancy in case of network failure. In this deployment, you can configure the listener to use multiple IP addresses and DNS names associated with each subnet. This allows the listener to automatically switch to the secondary IP address if the primary IP address becomes unavailable, providing continuous availability to the application.
To change a single subnet deployment to a multi-subnet deployment, you will need to reconfigure the network settings for each replica, update the listener configuration to include multiple IP addresses and DNS names, and update the connection strings in the application to use the listener DNS name. It is recommended to plan and test the multi-subnet deployment thoroughly before making any changes to the production environment
-
Yes, it is possible to change a SQL AlwaysOn deployment from a single subnet to multi-subnet, but it is recommended to plan for multi-subnet deployment from the beginning to ensure high availability and disaster recovery.
- Proposed as answer by DotNetDeveloper95 Thursday, February 23, 2023 1:41 PM