@@ServerName

  • Hi all

    I am trying to set up replication without luck. After some research I found that @@servername, used in the SP's to setup replication returns null, so setup fails.

    I've tried sp_addserver 'servername', 'local'

    as in books online, restarted and rebooted the server but still no server name, any ideas out there.

  • Hi

    I've recently been setting up some replications. What version of SQL are you working with ?

    When you are working with SQL 2000 you are automatically working with instances. Do you have several instances or not ?

    I'd been replicating from a server with an instance name to a local server.

    Works fine. You have to configue the client and server settings though because instances can use a different port setting than the standard 1433 port.

    I think you cannot update it with local.

    JV


    JV

  • Both servers are running Win 2000 SP4, with SQL 2000 SP3. Just to complicate things. A few months ago I configured replication between these for testing purposes and it worked fine.

  • First, check SERVERPROPERTY('SERVERNAME') and see what it returns. You can

    try executing the following to fix @@SERVERNAME:

    EXEC sp_dropserver 'oldservername'

    EXEC sp_addserver 'newservername', 'LOCAL'

    restart SQL Server service and generally it should be fixed.

    SELECT @@SERVERNAME

    You have to drop it to add it back.

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

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