[Update: I wrote a newer post that may complement this article]
I recently found out about SQL Aliases and how to use them in combination with SharePoint installations. It enables you to define local alias name to connect to with a SQL Client, so you can change the actual connection later on. This may come in handy when switching over to your mirror database server, when moving servers, when virtualizing you database server etc.
This is how it’s done:
- Open the cliconfg.exe tool and go to the Alias tab
- Click Add to add a new alias. Choose a Network Library and then configure your alias. In my example I use MossDBServer as my alias, and ActualServerName:1433 as the underlying connection.
- Use the alias name in your client app, e.g. the SharePoint Configuration Wizard:
- When time has come to change the underlying connection, just launch cliconfg.exe again and make your change:
I can think of at least a couple scenario’s where this might come in handy. Fancy a simpler way to move all of your MOSS databases anyone? Change the port SQL Server is listening to?