Is it possible to rename an SQL Server name?

  • Also, is it possible to rename an SQL cluster name?

    Many thanks in advance.

  • There's a system provided stored proc sp_rename that allows you to rename SQL Objects but I don't think this will work for an instance name. What did google bring back?


    Cheers,

    Ben Sullins
    bensullins.com
    Beer is my primary key...

  • Check this http://sqljunkies.com/Forums/ShowPost.aspx?PostID=4815

    I would very carefully in renaming a cluster.

  • If you rename the machine name of a sql instance that renames your sql instance too. But if you have a named instance you (as I know) need to uninstall/reinstall it.

    For clustered instances; you may change the cluster name from within the dns.

    Zubeyir

  • This worked for me;

    Run the following query in Query Analyzer to determine the name of the SQL server:

    select @@servername

    This will return the name of the server. If the server name is incorrect, run the following two queries individually:

    sp_dropserver 'SERVERNAME'

    sp_addserver 'SERVERNEWNAME', @local='local'

    Check the servername by running Select @@servername again.  You may also need to restart the SQL Service for this change to take effect.

  • Fred Siedenburg (5/17/2007)


    This worked for me;

    Run the following query in Query Analyzer to determine the name of the SQL server:

    select @@servername

    This will return the name of the server. If the server name is incorrect, run the following two queries individually:

    sp_dropserver 'SERVERNAME'

    sp_addserver 'SERVERNEWNAME', @local='local'

    Check the servername by running Select @@servername again. You may also need to restart the SQL Service for this change to take effect.

    Hi there,

    SQL 2005

    Windows 2k3 server.

    Does the above post work in a clustered environment?

    Basically I run @@servername and it returns 'DB1' the name of the cluster resource server that SQL used to reside on. In reality, SQL is now on cluster resource server 'DB2'.

    I quote MSDN's definition of sp_dropserver as "Removes a server from the list of known remote and linked servers on the local Microsoft® SQL Server"

    Does removing a server from the list of known servers mean the database is toast as well? Or am I making a mountain out of a mole hill?

    Big Thanks,

    Chris

  • Yes you can. Please refer the link: http://msdn.microsoft.com/en-us/library/ms178083.aspx

    HTH

    MJ

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

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