简体   繁体   中英

How to change Instance name in SQL Server

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

您可以创建实例别名: http ://www.mssqltips.com/tip.asp?tt = 1620

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM