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)

Example use:

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

Guide:

A nice guide from SharePoint MVP Colin Phillips.

http://mmman.itgroove.net/2013/11/setting-up-a-sql-server-alias-with-sharepoint-server-2013/

 

SQL Server Aliases

Example use:

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.

Guide:

K. Brian Kelley  walks us through the steps on a mssqltips post.

http://www.mssqltips.com/sqlservertip/1620/how-to-setup-and-use-a-sql-server-alias/

 

DNS CNAME or Host(A)

Example use:

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.

Guide:

Open DNS and go to the domain root of your SQL Server and application domain.

DNS1

 

Click Action -> New Host (A or AAAA)

DNS2

 

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)

DNS3

 

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.

 

 

DNS4

 

DNS5

 

DNS6

 

DNS7

 

DNS8

 

Advertisements