开发者

How to change Instance name in SQL Server

开发者 https://www.devze.com 2023-02-03 19:32 出处:网络
Is it posible to change instance name in SQL SERVER? Now I have ./MSSQLR2 and I would like ./SQLEXPRESS.开发者_开发知识库 I was trying to do this through this commands

Is it posible to change instance name in SQL SERVER? Now I have ./MSSQLR2 and I would like ./SQLEXPRESS.开发者_开发知识库 I was trying to do this through this commands

--sp_dropserver 'HYDROGEN\MSSQLR2';
--sp_addserver 'HYDROGEN\MSSQLR2', local;

and then restart server, but It seems not work.


For future reference, sp_dropserver and sp_addserver can only be used to rename the part of the instance name that corresponds to the computer name. So you could use it to rename your server name HYDROGEN to HELIUM, but you can't change the instance name MSQSQLR2 without reinstalling (see Jerome Bradley's answer). For details can be found on MSDN.

sp_dropserver 'HYDROGEN\MSSQLR2';
GO
sp_addserver 'HELIUM\MSSQLR2', local;
GO


You can create instance aliases: http://www.mssqltips.com/tip.asp?tip=1620

0

精彩评论

暂无评论...
验证码 换一张
取 消