SQL named instance alias as server name

  • Hi,

    I've got an old apps, which is pointing a database on a named instance SQL e.g. servername1\instancename.

    as part of consolidation, I needed to move the database into a new server with default instance e.g. servername2.

    as this is an old apps, the only way to re-point the database is by re-installing, and we want to avoid this.

    is there away, where i can use alias/a pointer/an name or other in order to point the apps to the new server (without instance name)?

    Thanks in advanced.

  • Yes, alias will work, or DNS forwarding.

    Alias: Servername\Instance2

    Port:1433

    Protocol: tcp/ip

    Servername: Servername

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle

  • Hi SSCommitted. thanks for the reply.

    I've tested the alias. it'll only work if I setup the alias on server, it doesn't work. only when

    i set the alias on the client (my pc) and I can use the alias to connect.

    currently the app doesn't have sql configuration manager installed. in order for me to use this alias,

    is it a compulsory to install sql configuration manager on the apps server?

  • oops I thought ssscommitted is your alias. tx Henrico.

  • is it a compulsory to install sql configuration manager on the apps server?

    No, if set up correctly, it should accept the name as a connection from any source as well.

    Try setting up a normal odbc connection to you alias name from the app server to confirm.

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle

  • You can setup a SQL Alias using a .reg file, here is a sample keep in mind that its from a windows XP client so may need to be modified for Windows 7, Server 2008 etc...

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo]

    "AliasName"="DBMSSOCN,ServerName\\instance"

  • The DNS option (create a cname record to the new server, make sure you rename your old server as well:-) ) is a good shout also providing you named instance name stays the same, i've done this a couple of times and it works well.

  • Alias will only work for one Instance per SQL install, when you try to create multiple instance, and multiple alias it will not work. If anyone knows of a way please let me know (Note i can get one Alias to work, but when installing 2nd Instance with another alias it's does not work) :w00t:

  • you should be able to create as many aliases as you like i've never seen any restricaition such as 1 per instance, unless we're not talikng about the same thing?

  • I have a active/active cluster set up. One node has an alias on a named instance, same with the other node. When I created another instance of sql it has servername\instnacename name for the 2nd instance, when I create the 2nd alias, it does not work. Only the first instance (alias) works.

  • Kevi322000 (4/16/2012)


    I have a active/active cluster set up. One node has an alias on a named instance, same with the other node. When I created another instance of sql it has servername\instnacename name for the 2nd instance, when I create the 2nd alias, it does not work. Only the first instance (alias) works.

    Since you are using a cluster, you can set each instance to use the default port of 1433. Once you have that - each instance is then referenced by the servername only instead of servername\instancename.

    With that done, you can then redirect the old servername to the new servername in DNS and your clients will not have to change their connection strings.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • Hi Henrico,

    this is how i setup.

    new server name/instance: newservername (Default).

    old server name/instance: oldservername\instancename.

    so, because I'll decomission the old server. i will user the oldservername\instancename as the alias (hoping to point to the newservername).

    i've created a dns hostname as the oldservername. and on the new server, i've created an alias named "oldservername\instancename" with port 1433 (default) and server as newservername.

    this doesn't work if i use SSMS remotely to connect to the instance name (oldservername\instancename).... however, if I created the same alias name on the client, it works just fine.

    is there anything that I missed?

Viewing 12 posts - 1 through 11 (of 11 total)

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