September 27, 2011 at 9:17 am
For some reasons, we moved one default SQL instance from one server box to another server box.
As a result, the srvname in the master..sysservers keeps unchanged.
When running SELECT @@SERVERNAME, we got the name of the old server, rather than the new one.
How to change it?
Any input will be greatly appreciated.
September 27, 2011 at 9:25 am
http://msdn.microsoft.com/en-us/library/ms143799.aspx
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
September 27, 2011 at 9:36 am
First of all, thank you for your input.
Maybe, I did not state my question clear.
I would like to rename the instance not the computer name. Your link showed how to rename a computer.
September 27, 2011 at 9:43 am
No, the link showed how to rename a SQL Server instance. The question was perfectly clear.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
September 27, 2011 at 9:53 am
The article shows the sp_dropserver/sp_addserver, which is what you do on the SQL Server.
September 27, 2011 at 9:59 am
Thanks all!
I got it with all your helps.
October 4, 2011 at 2:01 am
Editor: Post removed as it was copied from another source.
October 4, 2011 at 3:18 am
ahmedmujtaba88 (10/4/2011)
The following steps cannot be used to rename an instance of SQL Server. They can be used only to rename the part of the instance name that corresponds to the computer name.For example, you can change a computer named Machine1
That is a direct copy-paste from
http://msdn.microsoft.com/en-us/library/ms143799.aspx
By posting that without a quote you're implying it's your own work. It is not, it's a direct copy from a Microsoft page. Copying extracts from BoL is fine, but they they need to be attributed and referenced.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
October 5, 2011 at 4:38 am
just try Sp_rename 'oldservername','newservname'
this should work out for you
October 5, 2011 at 7:25 am
madhusudan418 (10/5/2011)
just try Sp_rename 'oldservername','newservname'this should work out for you
EXEC sp_rename 'Myrlin\SQL2008', 'SomeOtherServer\SQL2008'
Msg 15225, Level 11, State 1, Procedure sp_rename, Line 338
No item by the name of 'Myrlin\SQL2008' could be found in the current database 'master', given that @itemtype was input as '(null)'.
sp_rename is used to rename objects. To rename a server, follow the advice in the article that is referenced.
Per Books Online:
sp_rename
Changes the name of a user-created object in the current database. This object can be a table, index, column, alias data type, or Microsoft .NET Framework common language runtime (CLR) user-defined type.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply