DNS cnames and aliases for SQL Servers

  • So to help mitigate issues with databases moving to different servers we've added DNS aliases named after the databases and created linked servers using the alias names. Essentially we have a linked server for each database. In addition on each target server there is a login specific to that one database which is used by the linked server so a given linked server only has access to that one database. 

    When a database moves to another server we just need to update a single DNS entry and everything referencing that will be pointing to the correct place. 

    We just started to do some conversions and right off the bat had a query that runs in 1 second using the regular hostname linked server, and the same query on the linked server named after the alias ran 23 seconds. 
    This is discouraging to say the least. I will say on subsequent runs the query was down to about 5 seconds but still thats 5x longer than the other way.

    I know the DNS lookup with a cname or alias requires another step. It first gets the hostname from the alias/cname record then goes and gets the A record using the hostname which finally returns the IP.

    Does anyone have experience with this sort of setup and able to provide any advice, horror stories, etc...?
    thx

  • are you using fully qualified names for the DNS? like myServer.AlphaTangoWhiskey.com, or just the name that has to be resolved, like myServer?
    can you test and see if it makes a difference?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply