• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 130
  • Last Modified:

Change SQLSERVER Instance name

Hi I have Cloned Windows VM Server: A and Named as Server: B, Later I changed the OS Hostname from A to B.

Now I required to rename the SQL Server instance name from A to B.

I did rename by using sp_dropserver & sp_addserver, but could not login after rename from A to B.

Need help to rename the SQL Server instance from A to B
0
nssasikumar
Asked:
nssasikumar
  • 3
  • 2
1 Solution
 
SStoryCommented:
You can rename host name of instance like follows:
sp_dropserver '<oldservername>'
go

sp_addserver '<newservername>', local
go

Now restart the SQL Server related services. Then, run @@servername to verify if the new name has been updated.
select @@servername
(source: http://www.sqltechnet.com/2012/09/how-to-rename-sql-server-instance.html)
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
How did you rename the SQL Server instance and what's the error now?
0
 
nssasikumarAuthor Commented:
I have tried the Steps, mentioned above but faced some issues, So I fall back to Old Hostname
0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
Vitor MontalvãoMSSQL Senior EngineerCommented:
If it's a default MSSQL instance you shouldn't have any kind of problem renaming it.
But if it's a named instance you just can't. You'll need to uninstall the old instance and install a new one.
0
 
nssasikumarAuthor Commented:
It means after Host renaming at OS level, the SQLServer Default Instance will be auto renamed as Per New OS hostname?
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
SQLServer Default Instance will be auto renamed
No auto renamed. Default instances aren't named so you just need to drop the entry from the old server and add a new entry for the new server:
sp_dropserver '<oldservername>'
 go

 sp_addserver '<newservername>', local
 go

Open in new window

Don't forget to restart the SQL Server so it can use the new server name.
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now