When making connections to a MS SQL Server (database) in .NET applications, it is typically and best practice to store connection information which will include the server's name in a web.config and/or app.config. If for whatever reason you need to change the server your database is hosted on, you simply update those web/app.configs etc.

For a server installation like SharePoint 2007 or 2010, you need to specify a SQL Server where essentially your farm config, content databases etc. live. If for whatever reason, you need to change the database server...well you are in for a long night or weekend...

To ease this requires a little bit of planning ahead but I think it is well worth it.

Meet "SQL Server Client Network Library" aka cliconfg. On almost all Windows Operating Systems, you have the ability to set an alias to a SQL Server.

Click Start -> Run -> "cliconfg.exe" and OK. This will bring up the Config tool which looks like this:

 

 

-Click on Add and fill in the necessary information (Select TCP/IP and enter your port number if you are not on a standard port or if you are connecting to a SQL Server Instance)

 

And yes, as you noticed above, this works for creating aliases to SQL Server Named Instances also. As a matter of fact, after building a new Windows Server, one of the post steps I recommend is populating this handy tool with aliases to any SQL instances that you have, that way upgrading or moving your databases is painless (at least as far as your application layer is concerned).

One final note, if you have SQL Server Installed, you can also access and update your Server Configuration by running, guess it...yes "SQL Server Configuration Manager"