I've installed SQL server on a machine, rebooted, renamed the machine, rebooted, now I'm trying to set up SQL with the new name.
When I run SELECT @@SERVERNAME, I get the old servername. When I run sp_dropserver OLDSERVERNAME, it tells me that the server does not exist.
When I run sp_addserver NEWSERVERNAME, it tells me that it already exists. So when I re-run SELECT @@SERVERNAME it again shows me OLDSERVERNAME.
What am I doing wrong here?