Aliases in SQL Server 2008

As far as I’m concerned remembering server names is a pain in the backside especially when you have no control over how they are named.  Is abc123.sql.domain.net the development environment, or is it the UAT environment, or is it production?

The good news is that you can set up aliases in SQL Server 2008 to help you out and it literally only takes a couple of minutes to do.

SQL Server Configuration Manager

The application you want to open up in order to configure your aliases is SQL Server Configuration Manager which you can find under: C:\[installation folder]\Microsoft SQL Server 2008 R2\Configuration Tools\.

Open it up and then expand the Configuration node for your SQL Server install.

SQL Server 2008 Configuration Manager Aliases Node

The item we’re interested in is Aliases so right click on it to bring up it’s menu and select New Alias

SQL Server 2008 Configuration Manager New Alias Menu

From the resultant dialog box you want to fill in the Alias Name and Server boxesSQL Server 2008 New Alias Dialog

Once you’ve okayed those changes your alias will now exist in the list of aliases for your SQL Server installation.  This means the next time you open up SQL Server you can just enter the name of your alias in the Server Name box of SQL Server’s Connect to Server dialog to connect to your server.

SQL Server 2008 Connect to Server Dialog showing an alias as the Server Name

See my post on how to clean up your recent server list if you want to remove any old or unwanted connections.