Create SQL Server aliases using registry editor

Another quick one today: how do I create an alias using the registry editor? If you want to want to ask me why would you do such a thing, it means you’re reading the wrong blogJ.

To cut it short, here are the entries in the registry:

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\MSSQLServer\Client\ConnectTo] – this is for x64 machines who happen to need a 32-bit alias.
[HKEY_LOCAL_MACHINE\SOFTWARE\ Microsoft\MSSQLServer\Client\ConnectTo] – this is for either x86 machines, or for x64 machines that need a regular alias.

Ok, as for how I actually use it:

Fire up Notepad, make your edits, then save it as <whatevername>.reg. Double click the file and confirm that you want the entries in your registry. You now have a script ready to be deployed across multiple servers.

I hope this helps.

Best regards,
io

5 thoughts on “Create SQL Server aliases using registry editor

  1. Hi,

    i have only HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\MSSQLSERVER\CLIENT\ path in my machine. ConnectTo folder is not present. How and what do i do to get that?

    Thanks,
    Manognya

  2. Ok, thanks I am trying to create the .reg file you mention above to add several aliases to the registry. What would an entry look like on the file?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.