Migration SQL server with named instance to Always On High Availability

  • I need to migrate an SQL 2014 server that contains a named instance to AlwaysOn High Availability 2019 whose nodes are in 2 different subnets, which in itself would not be a problem, if they did not set me an additional condition to keep, if this is possible, the previous connection string Server_Name\Instance_Name.

    At first I thought I could solve this by defining on both nodes, first, in SQL Configuration Manager an alias with the Instance name on the old SQL server, and then when creating Listener either giving it a name like the old server name or would define its new name, and then in DNS create an alias (C_Name) like old SQL server name , but unfortunately it does not solve my problem since the combination Listener_name\SQL_alias does not work, nor the option to SQL alias call Old_SQL_Name\Instance_Name And associate it with the same alias (C_Name) in DNS, because the character \ is not allowed in DNS names.

    I hope I have been able to describe my problem to you so that you can tell me some of your opinion, or the request is unfeasible based on the technology to be applied.

    Best Regards,

  • If you have created an availability group, then you would typically be connecting to the listener, not the individual server.

    You are not going to be able to name more than one server the same

     

    Michael L John
    If you assassinate a DBA, would you pull a trigger?
    To properly post on a forum:
    http://www.sqlservercentral.com/articles/61537/

  • Hi Michael L John,

    First, to thank you for your time, but I'm afraid we didn't understand each other. I don't want to connect either to the old SQL server or to the nodes individually after the migration. The old sql server will be shut down permanently, when we make sure that the emigration went ok and everything works ok.

    On the migrating SQL server, there are plenty of databases for the same number of applications that use the connection string type SQL_Server_Name\Instance_Name. In order to try to keep that, I am looking for a way to either redirect the application call to Listener through DNS or in some other way, without changing the applications themselves. It is not possible to create C_Name SQL_Server_Name\Instance_Name DNS_Errorto Listener in DNS, because \ is an illegal character for it.

    I hope I have now clarified the problem.

    Thanks again for your time and good will to help me.

  • Well the listener is just essentially just an AD computer account so yeah you can't have a slash in the name as it needs to follow NetBIOS rules.

    Not tried it with using the instance name but I have done AOAG's on named instances before, we just always set the listener to be the port the named instance was listening on,

    So SQL1\LIVE:12345 & SQL2\LIVE:12345 had a listener of SQL-LIVE:12345 and it all worked.

    Now you should be able to do it as SQL-LIVE\LIVE but as I say I have never tested it.  But that means you need to install SQL on the replicas as named instances.  You cannot install them as default instances.

  • hello Ant-Green,

    Thank you for your help. Your post helped me come to a solution. The only difference is that I could not put the same port for the lister as for the SQL instances, because I was getting the message that that port was already occupied. I put a default port for AG and it passed. After that, I just defined the DNS alias and everything worked properly.

    My mistake was that I was trying with the default instance, not the named one. And then I wanted to solve my problem via SQL alias.

    Thank you very much again and best regards

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply