Based on the Microsoft documentation provided, to connect to the primary replica using the listener name on the secondary server via tools like SSMS, you need to specify MultiSubnetFailover=True
in the Additional Connection Parameters window. This provides faster detection of and connection to the current primary replica.
Here are the steps to connect to the primary replica using the listener name on the secondary server via SSMS:
- Use RDP to connect to a SQL Server VM that's in the same virtual network but doesn't own the replica, such as the other replica.
- Open SQL Server Management Studio, and in the Connect to Server dialog box type the name of the listener in Server name:, and then select Options.
- Enter
MultiSubnetFailover=True
in the Additional Connection Parameters window and then choose Connect to automatically connect to whichever instance is hosting the primary SQL Server replica.
References: