Changing IP address of DB Server

  • Hi All,

    I have a standby DB server.  In the past ( I have had to do this once), I had an issue with the primary DB server and had to bring up the standby DB server to replace the primary DB server and repoint all traffic to it.  I had to manually change the IP addres in our apps in like 50 places,  including web.config,machine.config, DSN's, bat files, registry settings etc etc, which was rather a pain and once the primary DB server was up - had to go through the whole exercise again.

    For future reference, do any of you guys see any issues if I just changed the IP address of the secondary server to the Primary server ( making sure of course that the primary server has been taken off line first).  Host names are not used anywhere and secondary server is on the same domain as the primary server.  I would still need to fix the orphaned users and would need to set up all the Jobs again, which I have scripted. 

     

     

     

  • Changing the IP address looks fine but take care of below points:

    Make sure the application doesnt use hostname for connecting.

    The Primary server should be offline

    The data and schema on Secondary should be surrent

    User id's for connecting to database are already setup on secondary server.

  • set up a DNS alias.  Reference the alias in all your connection strings.  then if your primary goes down you update the DNS once and it will propogate to the server/user machines connecting to the database.

  • Thanks Guys.  Bill - great idea.

  • Bill's solution is a 'standard' at our shop. All applications use a DNS alias to connect to database servers thus freeing up the tech area from changing IPs when servers need to be swapped. It's quick and easy. The one 'gotcha' is that on switched networks a great deal of DNS information is cached throughout the network. This means that once you modify the alias it needs to be propogated throughout your network (maynbe 10-15 minutes in large milti-sit/segmented installations. Then sometimes changing the DNS alias does not always fix the client connectivity - the cached information on the PC (DNS Resolver cache) still points to the old server and the client application dies (sometimes quite ungracefully). Sometimes you may have to issue a DOS-like command:

    ipconfig /flushdns

    Usually this does the trick, but depending on the type (and age) of the application a client side restart may also be required.

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

Viewing 5 posts - 1 through 4 (of 4 total)

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