name in config files pointing to the old DB server name

  • so we have old DB server with name oldserver and connection string has oldserver ( default instance , Hostname and IP Address),

    once we migrate to new DB server with name newserver , install SQL Server  default instance name =newserver and I set up logshipping from old DB server to new DB server.

    How do experienced DBA gurus shut the oldserver down and give that oldserver name  and IP addresss to newserver so the Application works without any issues and the SQL Server instance on newserver just works fine without having to reinstall / redo backup restore of DBs / Logins etc ?

  • A good Application developer would define the connection string in a file, say config.xml, which is used by every instance of the application when it starts. Then  when it's time for a change, a system admin could simply change the corresponding record in that file and nobody would need to ask silly questions about tricky problems on an SQL Server forum.

    _____________
    Code for TallyGenerator

  • its not that easy, we have 1000 IIS folders on the web and the web.config points to serverA, so I need to know if there is a way to shutdown ServerA and change ServerB/ IP of Server B to Server A and IP of ServerA. I heard cname in DNS is one way, but not sure.Request senior folks with more knowledge on this to help so I can communicate to the Network Team the exact steps.Thanks in Advance.

  • Use a CNAME right off the bat, makes life a lot easier for migrations.

    Then you update the CNAME to point to ServerB instead.

    Never in a month of Sundays would I want to go through the pain of renaming a SQL server especially on a migration as rolling back should it ever be needed is next to impossible.

    For you I would change the DNS entry of ServerA from an A record to a CNAME record and point the new CNAME to ServerB, then go and get yourself another CNAME for ProdSQL etc and go and start using centralised configurations so you only have to change this in as little a number of places as possible as you really don't want the ServerA CNAME hanging around for long as it could confuse people.

  • Alias are a good idea too, but the OP said they have 1000 config locations, if that is all on one machine or a handful of machines Alias would work fine as its a manual creation, if they have a 1000 server web farm though I would recommend the CNAME, change it in DNS, let it replicate and save the pain of having to create the alias on 1000 servers.

    There probably is a way to have a GPO push out the alias also but not looked at that, it must store it in the registry somewhere so entirely possible if the right keys can be found etc

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

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