Sql Server aliases can be handy at times

In both Sql Server 2000 and Sql Server 2005, you can create server aliases on your client machine. When you connect to the database server from this client, you can use the server’s alias, instead of its real name. This can be handy at times. For example, if you have a DTS / SSIS package that needs to get or put data into different servers at different times, you can just use one package and change the server alias at run-time to simplify things.

Here is how you can do it with Sql Server 2005:
1. Program Files -> Microsoft Sql Server 2005 -> Configuration Tools -> Sql Server Configuration Manager;
2. Expand SQL Native Client Configuration;
3. Right click on Aliases, pick New Alias…
4. Define alias, network protocol, port number when necessary, real server name here. Click OK and you are done.

Alias setup for Sql Server 2000 is similar. The only big difference is that you will use a program called Sql Server Client Network Utility to do that.

One response to “Sql Server aliases can be handy at times”

  1. You can also do this even if you don’t have the SQL Server client tools installed. Start | Run | cliconfg.exe will get you to the SQL Server Client Network Utility (I believe it’s included with MDAC). We used this heavily in recovery tests. Our application servers get aliases set up and no one has to mess with configuration strings.

Leave a Reply

Your email address will not be published.

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