How can I rename a SQL Server 2008 instance without reinstalling?
For example, if the db is referenced as "MySQLServer\MSSQL2008", how can I rename to "MySQLServer\SQL2008"?
|
How can I rename a SQL Server 2008 instance without reinstalling? For example, if the db is referenced as "MySQLServer\MSSQL2008", how can I rename to "MySQLServer\SQL2008"? |
|||
|
|
|
I don't think it is possible to rename without installing. There are traces left to the name in a few internal databases such as replication and you may find errors later on. If you can, unless you have more than one instance, you are best off reinstalling and then importing all your databases again. |
|||||||
|
|
I know that this script is ubiquitous across the ‘net, but whenever I google for it I come up with elaborate stored proc’s that are overkill for my needs – so here are the commands necessary to rename a SQL Server instance, for posterity:
And a few notes relating to their usage:
sp_addserver:
I would also recommend the following when renaming a SQL Server: I got this information from the link below: Read more: http://www.modhul.com/2008/01/15/renaming-a-sql-server-instance/#ixzz0tRlkLec4 |
||||
|
|
|
The only solution is to re-install. |
||||
|
|
|
This blog seems to indicate it's quite easy. http://www.modhul.com/2008/01/15/renaming-a-sql-server-instance/ |
|||||
|
|
You'd want to use ALTER DATABASE. http://msdn.microsoft.com/en-us/library/ms174269.aspx In this situation, for your example above, I'd try:
Good luck! |
|||||||||
|