Menu
header photo

SQL-Talk

Talks all about SQL Server and Azure

How to Rename SQL Instance

--Step1: Check the current server name

SELECT   @@SERVERNAME

--Step2: Drop the current server

SP_DROPSERVER  [OLDNAME]

--Step3: Add the new server name

SP_ADDSERVER  [NEWNAME],LOCAL

--Step4: Restart the instance and check again

SELECT  @@SERVERNAME