Actual Sql Server Name

  • Hi Friends,

    how may i know the actual name of my sql server 2005.

    Please help me...

    Deepak Nigam

  • select @@servername

    Adi

    --------------------------------------------------------------
    To know how to ask questions and increase the chances of getting asnwers:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Hi,

    In MS SQL Server Management Studio, right click on the server and click on Properties.

    This will bring up a new window and you will see "Name"

    Regards

    Stephen

  • Actually i am trying to replicate database from one server to another server. When i click on the replication->Configuration Distribution m receiving an error saying SQL Server replication requires the actual server name to make a connection to the server. Connections through a server alias, IP address, or any other alternate name are not supported. Specify the actual server name, 'TUTORBEN-F3D7EB'. (Replication.Utilities)

    Now what to do next please help me........

    Deepak Nigam

  • have a look at the link below.

    http://support.microsoft.com/kb/818334

    This may give you right directions.

    Vibz

  • dpkngm (1/13/2009)


    Actually i am trying to replicate database from one server to another server. When i click on the replication->Configuration Distribution m receiving an error saying SQL Server replication requires the actual server name to make a connection to the server. Connections through a server alias, IP address, or any other alternate name are not supported. Specify the actual server name, 'TUTORBEN-F3D7EB'. (Replication.Utilities)

    Now what to do next please help me........

    Deepak Nigam

    If it's an alias, you'll see that by using SQL Server Configuration Manager on the server where your first SQL Server is installed. Expand SQL Native Client Configuration and click on Aliases. That will tell you what the alias (if it exists) actually points to.

    One thing you can do real quick is go to a command prompt and try to ping the name. For instance:

    ping TUTORBEN-F3D7EB

    If that comes back with an IP address, then execute the following command:

    nbtstat -a *IP ADDRESS*

    You should see the real name of the server beside the <00> entry.

    K. Brian Kelley
    @kbriankelley

  • Did you change server names at any point and time?

  • dpkngm (1/13/2009)


    Hi Friends,

    how may i know the actual name of my sql server 2005.

    Please help me...

    Deepak Nigam

    Try select serverproperty('ServerName')

    Sometimes select @@version doesn't give the true server\instance name.

    Cheers.

    Gaby A.

    Gaby
    ________________________________________________________________
    "In theory, theory and practice are the same. In practice, they are not."
    - Albert Einstein

  • select @@servername, @@servicename

    🙂

  • Jonathan Mallia (1/14/2009)


    select @@servername, @@servicename

    🙂

    Heh heh... That works too.

    😀

    Gaby

    Gaby
    ________________________________________________________________
    "In theory, theory and practice are the same. In practice, they are not."
    - Albert Einstein

  • FROM BOL:

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

    Although the @@SERVERNAME function and the SERVERNAME property of SERVERPROPERTY function may return strings with similar formats, the information can be different. The SERVERNAME property automatically reports changes in the network name of the computer.

    In contrast, @@SERVERNAME does not report such changes. @@SERVERNAME reports changes made to the local server name using the sp_addserver or sp_dropserver stored procedure.

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

    - @@SERVERNAME will give you the original host name under which SQL server was installed.

    - serverproperty('servername') will give you the actual servername.

    This is how to find out what SQL thinks it is, however I like Brians answer above too.

    Carlton..

  • The more correct way would be sp_helpserver.

    If that isn't the correct alias that you want (perhaps being on a Veritas Cluster) you can change it with sp_dropserver(oldname)

    GO

    sp_addserver(correctalias)

    GO

  • Isn't it necessary to supply the local parameter? As in:

    sp_dropserver 'old_server_name'

    GO

    sp_addserver 'new_server_name', local

    GO

    Or is that only for a non-clustered server?

  • I disagree that sp_helpserver is "more correct".

    sp_helpserver gives your more info but in this case we are only after the server name.

    Carlton..

Viewing 14 posts - 1 through 13 (of 13 total)

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