SQLTeam.com | Weblogs | Forums

Renaming Server That Has a Named SQL Instance

hi experts,
After I rename this Windows 2019 VM, will I need to do anything for the named instance?
Thanks

Yes - you need to drop the old server and add the new server in SQL:

1 Like

Thanks, @jeffw8713
• For a renamed computer that hosts a named instance of SQL Server, run the following procedures:
SQLCopy
EXEC sp_dropserver '<old_name\instancename>';
GO
EXEC sp_addserver '<new_name\instancename>', local;

Why is local necessary, what does it do? This is a named instance.
Thanks