0

I have a requirement of migrating a cluster instance to an AlwaysON instance without changing the connection string from the application. My Existing connection string looks like- Server1\Instance1:5555.

I am planning to install the Always On Availability Group with the same instance name (Instance1) and configuring the listener (LIST) and giving the custom port for listener 5555.

I will point server1 to LIST (Using DNS entry) at the time of migration so the application would still connect using the old connection string.

My question is, are there any disadvantages of this approach? I know we don't need to give the instance name to the listener but are there are challenges with this approach? and if there is any other approach that I can use? Thanks!

1 Answer 1

0

I am not sure if I understand all your questions. If I miss anything, please ask again in the comment section or modify your question.

You can assign a custom port for the listener. However, there are few scenarios possible with the port numbers regarding the Always On Availability Group. For example, if you have a Windows firewall on the SQL Server machines, you will have to allow more than one port in some of the scenarios.

  • Specify different port numbers for each instance and a different port number for the Listener.
  • Specify the same port number for all the instances (as a standard), and a different port number for the Listener.
  • Specify the same port number for all the instances as well as the Listener. This is possible because the IP address of the SQL Server instance is different from the IP address of the Listener.

I am concerned with this statement you made:

I will point server1 to LIST (Using DNS entry) at the time of migration so the application would still connect using the old connection string.

If you plan not to use listener in your connection string, I highly recommend you revise your plan. The direct connection to the server name (or instance name) does not give the failover support which this technology has been built for. The advantage of using a listener is that you do not have to change your connection string after a failover (automatic or manual).

Few readings I suggest for you:

3
  • Thanks for your answer. I will be using the listener name to connect to the SQL instance. As my requirement is to retain the old connection string, I am planning to use the existing sql name (Server1) as alias and point it to the new listener that I will create.
    – Rajan
    Commented Jul 1, 2021 at 13:57
  • Isn't your existing server name already have an entry in DNS and I am not sure if you can add another one pointing to the listener. Commented Jul 2, 2021 at 13:26
  • That's correct. To retain the existing connection string, I will delete the existing DNS entry of the server and point it to listener name during cutover as I will turn off the old instance during cutover.
    – Rajan
    Commented Jul 2, 2021 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.