DBSERVERNAME in an HDR environment
Posted in 2016
Topics: High Availability & Replication, Networking & sqlhosts Configuration
Hi, In an HDR Environment, the DBSERVERNAME of the primary server must be the same of the secondary server or they must be diferent ? I asking this because I have synonyms in and external server pointing to the primary server, but in the case th primary fail and the secondary becomes the prymary, this synonyms will not work if the name of the secondary server is not the same as the primary. Thanks in advance. --94eb2c0949cc3fa767053d6cf802
Original post: Hi, In an HDR Environment, the DBSERVERNAME of the primary server must be the same of the secondary server or they must be diferent ? I asking this because I have synonyms in and external server pointing to the primary server, but in the case th primary fail and the secondary becomes the prymary, this synonyms will not work if the name of the secondary server is not the same as the primary. Thanks in advance. Response: I believe what you would want to do in this case of having an 3rd server with synonyms that you want/need to have pointing at the hdr pair, is that you would want to create a sqlhosts file group that contained the primary and secondary. Then change your synonym from using the specific primaries DBSERVERNAME to using the sqlhosts file group DBSERVERNAME. I believe that way, if the primary is down and the secondary is promoted to primary, the synonym would then get resolved to that server. You can check out http://www.ibm.com/developerworks/data/library/techarticle/dm-0807geib/ which shows an example of creating a group for a cluster (in the article it's mainly for using the cluster with ER, but I believe it would basically be the same in the case of synonym use as well). I didn't specifically test it out, but from the article I believe that is how you would want to set up for your purpose, and would be reasonably easy to set up some test instances to make sure it would work the way you require. Jacques Renaut IBM Informix Advanced Support
Thanks, I think it will worl. > El 27/09/2016, a las 9:17 a.m., JACQUES RENAUT <jrenaut@us.ibm.com> escribió: > > Original post: > > Hi, > In an HDR Environment, the DBSERVERNAME of the primary > server must be the same of the secondary server or they must > be diferent ? > > I asking this because I have synonyms in and external server > pointing to the primary server, but in the case th primary fail > and the secondary becomes the prymary, this synonyms will not work if the > name of the secondary server > is not the same as the primary. > > Thanks in advance. > > Response: > > I believe what you would want to do in this case of having an 3rd server with > synonyms that you want/need to have pointing at the hdr pair, is that you > would want to create a sqlhosts file group that contained the primary and > secondary. Then change your synonym from using the specific primaries > DBSERVERNAME to using the sqlhosts file group DBSERVERNAME. I believe that > way, if the primary is down and the secondary is promoted to primary, the > synonym would then get resolved to that server. You can check out > http://www.ibm.com/developerworks/data/library/techarticle/dm-0807geib/ which > shows an example of creating a group for a cluster (in the article it's mainly > for using the cluster with ER, but I believe it would basically be the same in > the case of synonym use as well). I didn't specifically test it out, but from > the article I believe that is how you would want to set up for your purpose, > and would be reasonably easy to set up some test instances to make sure it > would work the way you require. > > Jacques Renaut > IBM Informix Advanced Support > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. >