none
SQL 2005 - Rename a Named Instance

    Question

  • Hi all,

    Ok, first I am new to this so please be gentle. 

    1.  I created a named instance on a existing SQL 2000 server for a installation of SQL 2005.
    2.  After I named it, I decided that the name needed to be different (GOODNAME vs. BADNAME).
    3.  How do I rename a named instance (NOT default instance) of a SQL Server 2005 install?  I have completed the steps shown in this article. 

    http://msdn2.microsoft.com/en-us/library/ms143799.aspx


    But, it still shows as the name I do not want in the SQL Management Studio.   If I run the "PRINT @@servername", it does display the correct name (the one I changed it too).  Yes, I even tried rebooting.

    I want to be able to connect via the Management Studio to the same name that I named it to using the steps in the article above. 

    Do I have to uninstall it and reinstall or is there something else I need to do? 

    More Details...
    1. Server Instance name (BADNAME)
    2. Ran commands to rename to (GOODNAME)
    3. Checked using @@servername and it shows ... GOODNAME.
    4. In Management Studio, it still shows (ever after reboots, etc.) ... BADNAME.
    5. How do I get it to show ... GOODNAME in Management Studio? 

    As always, any help/guidance is appreciated!

    Regards,

    Steve Sad



    Tuesday, November 01, 2005 11:01 PM

Answers

  • You need to reinstall it. There is no instance rename facility for the Database Engine. The steps you followed are for when you rename the computer that SQL Server is running on and you need to match up the internal server name with the new computer name.


    HTH
    Jasper Smith (SQL Server MVP)
    http://www.sqldbatips.com

    Tuesday, November 01, 2005 11:07 PM

All replies

  • You need to reinstall it. There is no instance rename facility for the Database Engine. The steps you followed are for when you rename the computer that SQL Server is running on and you need to match up the internal server name with the new computer name.


    HTH
    Jasper Smith (SQL Server MVP)
    http://www.sqldbatips.com

    Tuesday, November 01, 2005 11:07 PM
  • Jasper,

    Thank you so much for your prompt response.   Here are a FEW ;) more details ...
    The server has the following:
    1. Previous Instance of SQL 2000 (this is the default instance)
    2. Named instance of SQL 2005 (the one we are talking about)
    3. Can I simply REINSTALL SQL2005 .... OR ... <drumroll please> have to UNINSTALL SQL 2005 and THEN reinstall? 
    4. Would a complete uninstall of SQL 2005 mess anything up with my default instance of SQL 2000? 
    5. Hopefully, that makes sense.

    Thanks again for your time,

    Steve
    Tuesday, November 01, 2005 11:19 PM
  • I know this is almost five years old, but this is a pretty high-value target on Google. So for correctness, you CAN rename a SQL Server without uninstalling. Its actually very easy, but with caveats.

    you cannot rename the instance, however.

    http://msdn.microsoft.com/en-us/library/ms143799.aspx
    • Proposed as answer by William Assaf Friday, February 19, 2010 7:23 PM
    Friday, February 19, 2010 7:22 PM
  • Hi,

    We can Rename an SQL Instance.

    For a renamed default instance, run the following procedures:

     

    sp_dropserver <old_name>

    GO

    sp_addserver <new_name>, local

    GO

     

     

    For a renamed named instance, run the following procedures:

    sp_dropserver <old_name\instancename>

    GO

    sp_addserver <new_name\instancename>, local

    GO

     

    Thursday, June 02, 2011 11:39 AM