Solved

Change SQLSERVER Instance name

Posted on 2014-12-02
6
100 Views
Last Modified: 2015-05-23
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
Comment
Question by:nssasikumar
  • 3
  • 2
6 Comments
 
LVL 25

Expert Comment

by:SStory
ID: 40476681
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
 
LVL 48

Expert Comment

by:Vitor Montalvão
ID: 40478033
How did you rename the SQL Server instance and what's the error now?
0
 

Author Comment

by:nssasikumar
ID: 40783115
I have tried the Steps, mentioned above but faced some issues, So I fall back to Old Hostname
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 48

Expert Comment

by:Vitor Montalvão
ID: 40783125
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
 

Author Comment

by:nssasikumar
ID: 40783146
It means after Host renaming at OS level, the SQLServer Default Instance will be auto renamed as Per New OS hostname?
0
 
LVL 48

Accepted Solution

by:
Vitor Montalvão earned 500 total points
ID: 40783171
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question