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.
servers. 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 MB1 that hosts an instance of SQL Server named Instance1 to another name, such as MB2.
To rename a DB instance, use the AWS CLI command modify-db-instance . Provide the current --db-instance-identifier value and --new-db-instance-identifier parameter with the new name of the DB instance.
Please keep in mind that we cannot change complete name of SQL Server named instance. Suppose you have installed a named instance SERVERNAME\DBInstance1 on your server. If you want to rename this named instance then we can only change first part of this name i.e. SERVERNAME.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With