Changing @@SERVERNAME

  • I have a 2-node AlwaysOn cluster on GCP. Because they were built via imaging, they're both named IMG-SQL2016-ENT. While configuring the AlwaysOn functionality, the DBA used the reporting services databases for the initial setup and consequently ended up dropping the databases.

    Flash forward to my SSRS migration, the SSRS configuration is now hosed and can't be fixed because the servers are both named the image name instead of their DNS name. I know how to change the servername, but keep seeing articles, forum posts, documentation, etc. saying that renaming servers that are joined with replication has to be handled differently than standalones. Something to do with having to switch to log shipping 1st. Does that statement apply to AlwaysOn too or traditional replication only? Can I just go for it? Should I just suspend synchronization, then go for it? Do I have to completely remove AlwaysOn, then do it, then reconfigure AlwaysOn? Please don't say I have to strip the server bare and do it in the registry and reinstall SQL (aka starting over).

  • robin.pryor - Thursday, December 13, 2018 6:05 AM

     I know how to change the servername, but keep seeing articles, forum posts, documentation, etc. saying that renaming servers that are joined with replication has to be handled differently than standalones. Something to do with having to switch to log shipping 1st. Does that statement apply to AlwaysOn too or traditional replication only? Can I just go for it? Should I just suspend synchronization, then go for it? Do I have to completely remove AlwaysOn, then do it, then reconfigure AlwaysOn? Please don't say I have to strip the server bare and do it in the registry and reinstall SQL (aka starting over).

    hi

    I doubt AlwaysOn depends on @@servername values, but DNS server names.
    If AO is configured and works now + both hosts have unique DNS names, then I see no obvious reasons/dependency on @@servername

    Also, check section "Additional configuration"  for anything related to your env:
    https://docs.microsoft.com/en-us/sql/sql-server/failover-clusters/install/rename-a-sql-server-failover-cluster-instance

    Regards,
       Andrey

Viewing 2 posts - 1 through 1 (of 1 total)

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