Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Rename Instance of SQL Server Expand / Collapse
Author
Message
Posted Wednesday, February 16, 2005 11:38 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, January 18, 2008 2:20 AM
Points: 5, Visits: 3
I know how to rename a SQL server, but how do I rename another instance of SQL server 2000.

Thanks

Post #162137
Posted Wednesday, February 16, 2005 11:57 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, April 18, 2014 8:44 AM
Points: 1,148, Visits: 81
AFAIK, there's no way to rename a SQL Server instance.  You either have to re-install, or install a new instance with the desired name.  Once that's done, you could move your user DB's over.  Hope this helps. 



My hovercraft is full of eels.
Post #162143
Posted Wednesday, March 16, 2005 12:41 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, January 2, 2009 2:41 PM
Points: 110, Visits: 20

it is possible to rename the named instance of SQL server 2K, first use sp_dropserver and sp_addserver (drop the old server name and add new server name in sysservers table). Turn down the instance and create the same folder structure as the old installation folder for this renamed instance, both for installation folders and data folder appropriately i.e $OldInstanceName to $NewName, also search and replace this old instance name in registery.

then run the "rebuildm" utility for rebuilding the system databases now reboot the system and make sure SQL server is running under new name. Then detach and attache the user databases to the new location (new folder i.e $NewName)

 

Post #168148
Posted Wednesday, March 16, 2005 1:20 PM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Tuesday, May 6, 2014 5:51 AM
Points: 6,266, Visits: 2,028

The shortest path is Uninstall/Reinstall (Easier than any other route)

For confirmation http://support.microsoft.com/kb/260414/en-us

 




* Noel
Post #168165
Posted Monday, August 18, 2008 7:49 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, January 11, 2009 9:07 PM
Points: 1, Visits: 6
noeld (3/16/2005)


The shortest path is Uninstall/Reinstall (Easier than any other route)

For confirmation


Since this appears quite high in the google search for 'rename sql instance'..and is just not right IMHO, I thought I better add a comment.

sp_dropserver "oldservername"
sp_addserver "newservername" , local

done.
I cant see how uninstalling and reinstalling is easier for you than 2 queries and a few minor clicks here and there....
Post #554699
Posted Tuesday, September 30, 2008 7:59 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Today @ 10:21 AM
Points: 440, Visits: 3,278
The sp_dropserver / sp_addserver method works only for the DEFAULT instance though. On the default instance only, by using sp_dropserver / sp_addserver you can change the server name reported by @@SERVERNAME. You would also have to change your machnine name if you wanted remote clients to be able to connect to that instance using that name.

For a NAMED (non-default) instance it isn't so easy. The supported method is to uninstall / re-install. There are registry hacks to rename a default instance, but you may prefer the safer option of re-installing:

http://groups.google.com/group/microsoft.public.sqlserver.server/browse_thread/thread/544c4eaf43ddfaf3/e9065e05718e984e


David
Post #578319
Posted Wednesday, October 21, 2009 3:45 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, July 25, 2014 2:43 AM
Points: 339, Visits: 572
– Get the current name of the SQL Server instance for later comparison.
SELECT @@servername
– Remove server from the list of known remote and linked servers on the local instance of SQL Server.
EXEC master.dbo.sp_dropserver ‘[SERVER NAME]‘
– Define the name of the local instance of SQL Server.
EXEC master.dbo.sp_addserver ‘[NEW SERVER NAME]‘, ‘local’
– Get the new name of the SQL Server instance for comparison.
SELECT @@servername
Post #806336
Posted Friday, March 23, 2012 9:20 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Friday, February 21, 2014 7:54 AM
Points: 1,619, Visits: 1,233
Rao.V (10/21/2009)
– Get the current name of the SQL Server instance for later comparison.
SELECT @@servername
– Remove server from the list of known remote and linked servers on the local instance of SQL Server.
EXEC master.dbo.sp_dropserver ‘[SERVER NAME]‘
– Define the name of the local instance of SQL Server.
EXEC master.dbo.sp_addserver ‘[NEW SERVER NAME]‘, ‘local’
– Get the new name of the SQL Server instance for comparison.
SELECT @@servername


I know this is an old post, but...
After renaming the instance using sp_dropserver and sp_addserver, selecting @@SERVERNAME will not return the new, changed instance name until a sql server service restart has occurred.


_________________________________
seth delconte
http://sqlkeys.com
Post #1271750
Posted Tuesday, August 14, 2012 12:07 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, March 18, 2014 1:13 PM
Points: 1, Visits: 86
did you do it for a default or name instance?
Post #1344938
Posted Tuesday, October 23, 2012 2:56 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, October 23, 2012 2:55 PM
Points: 7, Visits: 7
Muy buen post, funcionó de maravilla, me han aliviado de un gran problema.

Gracias

Atte.
Hubert Calderón Vargas



Post #1376250
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse