none
Replication - servers host name change. RRS feed

  • Question

  • we have 1 publication server & subscription server. ( all are in same Vnet)

    we are going to change this Publication server & subscription server (hostname). is this affect replication.

    how can i find all existing connection parameters  used for replications?


    Friday, November 22, 2019 1:44 PM

All replies

  • SQL Server does not support renaming a computer which is involved in replication. You could script out the settings first so you can recreate afterwards and then remove replication.

    A Fan of SSIS, SSRS and SSAS

    Friday, November 22, 2019 2:49 PM
  • Hi KIRUBAKARAN J A,

     

    There is no way to rename server name of publisher and subscriber in the transactional replication without breaking replication. You need to recreate the subscription after renaming the computer name.

     

    You need to update the current server name in SQL Server after you change the host name. To do this, execute sp_addserver which defines the name of the local instance of SQL Server. When the computer hosting SQL Server is renamed, use sp_addserver to inform the instance of the SQL Server Database Engine of the new computer name. This procedure must be executed on all instances of the Database Engine hosted on the computer. The instance name of the Database Engine cannot be changed.

     

    select @@SERVERNAME

    This returned the original name of the SQL Server.

    sp_dropserver 'oldname'

    go

    sp_addserver 'newname', LOCAL

    go

    Then, restart the SQL Server service.

     

    Best regards,

    Dedmon Dai


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Monday, November 25, 2019 7:41 AM
  • If server name is changed, you need to rebuild the repl

    https://sqlserver.code.blog/

    Tuesday, November 26, 2019 12:44 AM