• Status: Solved
  • Priority: High
  • Security: Public
  • Views: 31
  • Last Modified:

Can I point a CNAME at a specific instance within a SQL server? Not just the server itself

I am working with a database admin. She needs me to create a CNAME on our DNS server that points to a specific "instance" on a SQL server. I created a basic CNAME and pointed it at the server where SQL is installed but it right now she sees it as pointing to the default instance. I am not a SQL person, but is there a way for me to create a CNAME or even a HOST entry and point it to a specific instance within a SQL server? Not just the server itself? We are using Windows 2012 and SQL 2012.
2 Solutions
Travis MartinezSmoke JumperCommented:
I had help finding this:


The short answer is no, not directly.  The much longer answer as the link describes above is configuring the SQL instance to listen on a specific port, 1443 for the IP address given.
Vitor MontalvãoMSSQL Senior EngineerCommented:
No. The way to point to a specific SQL Server instance is ServerName\InstanceName or ServerName,portNumber.
Scott PletcherSenior DBACommented:
I think you can point the CNAME to the specific IP address of the instance, but I am not a networking person and do not claim any addressing expertise.
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

Vitor MontalvãoMSSQL Senior EngineerCommented:
@Scott: The problem is that you can have more than one SQL Server instance on an IP address. The question is how to solve that issue with a CNAME.
Scott PletcherSenior DBACommented:

Interesting.  Maybe it's just the port that has to be different.  As I said, I'm not an expert in that area.

I know at one place they assigned unique addresses, but that was probably just their preference.
Vitor MontalvãoMSSQL Senior EngineerCommented:
That was my understanding:
"(...)is there a way for me to create a CNAME or even a HOST entry and point it to a specific instance within a SQL server?"
nociSoftware EngineerCommented:
DNS (CNAME, A, AAAA etc.) is a translatoin service for humans to translate a host/domain name into an IP address.
IP connections only can be done on Ipaddres/port pairs, something that is hard for humans to handle in large amounts.

As there is NO connections between DNS and database content a change of CNAME will not help.
(For webservers it is slightly different, as a webserver is told the name afterward inside the query, something that not a lot of protocols do regularly).
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now