I know how to do this manually:
EXEC sp_dropserver @@SERVERNAME
GO
sp_addserver <new_name>, local;
GO
I would like to automate further it by passing the computer name to SQL in place of <new_name>, but my attempts have thus failed. I've tried passing %computername% - no joy.
Thanks!
I have
Go to the complete details ...