locked
Value of a DNS "Alias" in mirror setup? RRS feed

  • Question

  • We have two mirrored servers, "Principal" and "Mirror".  I want to create a DNS alias  for applications to use without directly pointing to either server (like is commonly done in Windows Clustering setups.)  But there are only 2 servers and if the Principal server needs to be shut down (and the mirror take its place) why can't we simply repoint the Principal's existing record to the mirror box? In other words, does the use of an alias in this case offer any value?

    TIA,

    edm2

    P.S. In our setup we are not using a witness server. Maybe if we were, then the Alias would be of value to facilitate an automatic failover.
    • Edited by edm2 Monday, January 8, 2018 7:37 PM
    Monday, January 8, 2018 7:35 PM

Answers

  • The 'internal monitoring/backups' I'm referring to is not necessarily SQL Server, rather the hosts e.g. your host backup software may have both the principal and mirror registered and therefore when the daily backup arrives it may try backup the mirror server twice if it works off the DNS entries. Same could go with virus updates, monitoring products etc. Its simpler and cleaner to just go with an alias or make use of the failover partner connection string if preferred. You mentioned clusters, but these are slightly different as clusters create a virtual computer which allows for a logical separation to the underlying hosts and the virtual server can be used as a point for business maintenance tasks e.g. host monitoring/backups.
    • Marked as answer by edm2 Tuesday, January 9, 2018 5:25 AM
    Tuesday, January 9, 2018 4:52 AM

All replies

  • Hi, an Alias would likely help when it comes to starting the Principal again e.g. you can re-establish or restart mirroring with a minimal outage to the mirror. When you are ready to failback simply plan the failback window and update the alias.

    Another option may be use of the failover partner connection string parameter. Although you could end up with hundreds of login failures until the databases are bought online on the mirror as you are not using automatic failover.

    Also, if you simply point the DNS to the mirror, you may experience unwanted side effects, i.e. your internal monitoring/backups may double up activity on the mirror server as they may think it is also the principal.

    Tuesday, January 9, 2018 3:05 AM
  • Kevin, very interesting answers. Regarding the last paragraph I'm not sure exactly what you mean. Why would the existing processes think the mirror server is also the principal? Consider database backup. You can't do it on the mirror as the databases are in norecovery mode, so making the mirror the new principal, and pointing the backup software to the new principal should only backup the databases once. What am I missing here?

    edm2

    Tuesday, January 9, 2018 4:31 AM
  • The 'internal monitoring/backups' I'm referring to is not necessarily SQL Server, rather the hosts e.g. your host backup software may have both the principal and mirror registered and therefore when the daily backup arrives it may try backup the mirror server twice if it works off the DNS entries. Same could go with virus updates, monitoring products etc. Its simpler and cleaner to just go with an alias or make use of the failover partner connection string if preferred. You mentioned clusters, but these are slightly different as clusters create a virtual computer which allows for a logical separation to the underlying hosts and the virtual server can be used as a point for business maintenance tasks e.g. host monitoring/backups.
    • Marked as answer by edm2 Tuesday, January 9, 2018 5:25 AM
    Tuesday, January 9, 2018 4:52 AM