taoufik333
taoufik333

Reputation: 9

Can I change the host name of a system running SQL Server?

Does the change of the host name of the server impact the functioning of Microsoft SQL Server?

Upvotes: 0

Views: 2272

Answers (1)

Heinzi
Heinzi

Reputation: 172478

Yes, there are some additional steps that you need to perform after changing the host name.

I could not find the relevant documentation for SQL Server 2012 online any more, but here is the official document for SQL Server 2016-2019:


In a nutshell, you need to execute

sp_dropserver <old_name\instancename>;  
GO  
sp_addserver <new_name\instancename>, local;  
GO  

to update system metadata and then restart SQL Server.

Additional steps (see the linked document above) might be necessary if you use:

  • a failover cluster,
  • replication,
  • Reporting Services,
  • database mirroring,
  • Windows groups containing a hard-coded reference to the computer name,
  • remote logins,
  • linked server configurations or
  • named pipes.

Obviously, the connection strings of any clients connecting to your server will need to be updated as well.

Upvotes: 2

Related Questions