SQL2016 Servername\Replication

  • I am receiving an error when trying to configure replication on  2016 as a distribution database.  There states that replication requires the actual servername.  @@servername returns a value different than the instance name but the addserver option is not available in 2016. What are my options in being able to configure replication.

  • jamesforest - Thursday, July 20, 2017 12:33 PM

    I am receiving an error when trying to configure replication on  2016 as a distribution database.  There states that replication requires the actual servername.  @@servername returns a value different than the instance name but the addserver option is not available in 2016. What are my options in being able to configure replication.

    Not sure what you mean by addserver option is not available - do you mean sp_addserver? Pretty sure that hasn't been removed and Microsoft still has it listed in their documentation as available through the current version.
    Did you rename the server? sp_addserver is what you would normally use if you renamed the server - just something like:
    sp_dropserver 'old_name'
    go
    sp_addserver 'new_name', 'local'
    go     

    You can find more information in the following article:
    Rename a Computer that Hosts a Stand-Alone Instance of SQL Server

    Sue

  • Result from select @@servername
    RIPNCSMDB1

    Result from

    sp_dropserver 'ripncsmdb1'

    Msg 15015, Level 16, State 1, Procedure sp_dropserver, Line 42 [Batch Start Line 0]

    The server 'ripncsmdb1' does not exist. Use sp_helpserver to show available servers.

    I may have hallucinated that addserver was not available and to use linked server but did not copy message.  My bad.  I did not install SQL but was asked to set up replication.  I think It was a case of VM cloning but am not sure

  • On that server, what do you get back for the name if you execute:
    SELECT name
    FROM sys.servers
    WHERE server_id = 0

    For all of the servers involved in the replication, see if you have mismatches executing the following:
    SELECT SERVERPROPERTY(N'servername')
    SELECT @@SERVERNAME

    Also, log onto the servers and from the command prompt, check by just typing: hostname

    Sue

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

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