Giving different server names

  • Hi All,

    select @@servername and select serverproperty ('servername') giving different outputs ( different server names )

    Thanks,

    Lavanya

  • It's a known issue. Maybe the windows machine was renamed and SQL Server didn't notice it happened.

    serverproperty('servername') returns the correct server name, while @@servername may return the incorrect name.

    Take a look at sys.servers where server_id = 0 and, in case it's wrong, correct it with sp_dropserver/sp_addserver.

    Hope this helps

    Gianluca

    -- Gianluca Sartori

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

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