--query servername SELECT @@SERVERNAME --alter servername sp_dropserver 'oldname' go sp_addserver 'newname','local' go --need restart instance