SQL Server Alias’s from DNS to cliconfg.exe
There’s a lot of different ways you can use alias’s with sql server. Ill list them below with examples and steps/links for how to configure each one.
SQL Server Client Network Utility (cliconfg.exe)
This is a favourite with SharePoint admin folk. Where during the sharepoint install they set up the client sql alias to simplify moving to a different sql instance later should they need to
A nice guide from SharePoint MVP Colin Phillips.
SQL Server Aliases
Moving a database to a new server and routing the old connections to the new instance.
This really seems a last ditch solution, if you have two databases’s and only want one to use the alias your out of luck.
K. Brian Kelley walks us through the steps on a mssqltips post.
DNS CNAME or Host(A)
My favorite way to do things. One change can alter multiple connections. The choice of cname of Host(A) mainly cones down to Kerberos not working with cnames. It lets you point an application at a sqo instance and easily move it to another instance without having alter any client side details.
Open DNS and go to the domain root of your SQL Server and application domain.
Click Action -> New Host (A or AAAA)
Fill in the details of your Application (Try and keep your naming to a standard so its easier to work with, for instance I use the ApplicationName followed by DB)
Click Add Host.
Now when you go to the application (for the demo ill create a ODBC connection and point it to MyApplicationDB instead of the server name or IP Address.)
Enter your new A Host record for the Server Name and follow through the normal steps to create and ODBC.