Computer Name from SQL Server

  • Federico Zajur

    SSC Journeyman

    Points: 84

    Comments posted to this topic are about the item Computer Name from SQL Server

  • Pedro R. Lopez

    SSC Eights!

    Points: 902

    nice trick.

    Pedro R. Lopez
    http://madurosfritos.blogspot.com/[/url]

  • ViYes

    SSC Veteran

    Points: 232

    Guys..

    Instead this will work to get the active node name on the cluster as well..!

    select CONVERT(VARCHAR(10), SERVERPROPERTY('ComputerNamePhysicalNetBIOS'))

    -VS

    "there are 10 types of people in the world...those who understand binary and those who don't..."

  • MO_SQLGuy

    SSC Enthusiast

    Points: 113

    Based on my testing, the xp_regread method will return the physical machine name while xp_getnetname returns the cluster name, not the physical machine name. Something to consider when determining what method to use!

  • akljfhnlaflkj

    SSC Guru

    Points: 76202

    Thanks for the script.

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

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