server propeties and @@ servername have different server name!!!

  • There is different name in server properties and @@server name !!! can somebody explain how and why this happened and how to fix it??

    server Properties name: abcdef

    @@servername : abcxyz

  • Have you renamed the Windows server since sql server was installed?

    To remove the current servername entry use

    exec sp_dropserver 'abcxyz'

    Then run this to correct it

    exec sp_addserver 'abcdef', 'local'

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • Is this on a cluster? When you say "server property" what are you selecting exactly?

    @@servername will give the local machine name, except in a failover cluster, where it will give you the virtual server name

    serverproperty('computernamephysicalnetbios') should give you the local machine name. In a failover cluster this is the machine name of the active node

    Joie Andrew
    "Since 1982"

  • when u right click on server's name in SSMS. i see different name and when i run select @@servername find different name.

  • Was the server renamed at some point? Can you post the results of the following:

    SELECT SERVERPROPERTY(InstanceName), SERVERPROPERTY('MachineName'), SERVERPROPERTY('ComputerNamePhysicalNetbios'), SERVERPROPERTY('IsClustered')

    Joie Andrew
    "Since 1982"

  • dinsab11 (10/18/2012)


    when u right click on server's name in SSMS. i see different name and when i run select @@servername find different name.

    Please see my post above

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

Viewing 6 posts - 1 through 5 (of 5 total)

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