Rename Server & SQL Instance ??

  • We have Server_A used for reporting. As a backup if Server_A dies, I would like to copy the databases to Server_B everyday. If Server_A is down, could server_B be renamed to Server_A, and rename the default instance of SQL from Server_B to Server_A ??

    Otherwise I think I need to have all the users change their various connections to point to Server_B.

    Is there a better way ?

    This is a non-production scenario, where it is ok for Server_B to be a bit out of date, based on whenever the last backup was. But minimal cutover time is more important so users are not wasting a lot of time.

  • As per my knowege . you cant rename the server. If you want to rename you have to uninstall the instance then you have install with new name.

  • Perhaps I can run these steps after renaming the server itself to rename the SQL instance ??

    sp_dropserver 'Server_B'

    GO

    sp_addserver 'Server_A', local

    GO

  • You can rename the server by changing its name in Windows. You can't rename a named instance.

    Honestly though, not a good idea. Changing machine names can break all sorts of things in Windows. Have you considered a DNS alias instead? That way the alias can point at whichever server you want clients to use

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Can a default SQL instance be renamed ??

    I forgot about the DNS alias. I think that was done at a place I worked at a long time ago. Where does that change need to happen ? That might be simpler.

  • homebrew01 (9/17/2013)


    Can a default SQL instance be renamed ??

    A default instance is just the server's name, so see above about changing a windows server name.

    I forgot about the DNS alias. I think that was done at a place I worked at a long time ago. Where does that change need to happen ? That might be simpler.

    It would be a DNS entry, so something your AD administrator would know how to do.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • So the DNS entry will make all connections that normally point to Server_A, now point to Server_B ? And as long as the expected databases & permissions are there, they should be able to get data ?

  • You set up a DNS alias named 'ReportServer' (for example), it points to Server A, so when people connect to ReportServer, they get directed to Server A. When you want to switch servers, change the alias to point to Server B, now people connecting to ReportServer get sent to Server B.

    Your AD administrator should know how to set one up and configure it.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thank you very much.

Viewing 9 posts - 1 through 8 (of 8 total)

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