SQLTeam.com | Weblogs | Forums

Using DNS name insted of host name


We are about to go through the process of refreshing our SQL servers and someone came up with a bright Idea.

For all out client applications (Web sites, thick client apps) instead of using the names of the new servers we setup DNS names for all the applications we set up DNS aliases

So we have 2 servers that are called SKY and STARS
On our internal DNS servers we create a alias WebsitePrimary and point it to Sky and WebsiteSecondary and point it to Stars

sqlconn = "Provider=SQLNCLI10;Data Source=SUN;Failover Partner=WebsiteSecondary;Initial Catalog=WebsitePrimary;uid=readweb;pwd=changeme;"

So when I build the new servers - I move the data - point the DNS to the right servers
refresh dns on the web server and start tings up again (probably stopping the database on the old server to be safe)

Is there anything wrong with doing this ?


Dunno if it applies in this case, but shortly (a few days / weeks) before we upgrade our public-facing web servers we shorten the DNS Lease (to a few minutes) so that anything referencing it will renew its lease shortly after the change is made. We then set a long-lease after the upgrade is completed.


Using DNS names instead of the actual SQL Server names has been used for many years across many companies. It works great. Only issue is how long it takes when the alias has to be changed, but that is done in a maintenance window anyway.

Go for it!