How do you fix the issue when SELECT @@SERVERNAME returns null


PS: I just figured this out but it wasn't obvious... Answer to follow

sp_dropserver 'OLDNAME'
sp_addServer 'NEWNAME', 'local'

The 'local' part is important, it doesn't work without it ( I think it attempts to add the server as a remote linked server without it)

  • Correct, without the 'local' it creates it as a remote server. – mrdenny Sep 24 '09 at 21:04
  • Weirdly the documentation failed to mention it (grr) – David Hayes Oct 22 '09 at 21:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.