Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I had to change the computer name from x to y on a sql server 2008 r2. And followed the instructions []

Now when I select @@servername it shows null.

However when I Query Select * from sys.servers, the new server name is listed..

@@Servername is used in many of stored procs..

share|improve this question

migrated from Sep 20 '10 at 4:31

This question came from our site for professional and enthusiast programmers.

Well, the answer is that you have to specify 'local' when adding the server after deleting.. now it shows the server name

Here is the link..

share|improve this answer
I'm glad you got it solved. You should choose this as the answer to your question. – Jon Onstott Sep 17 '10 at 23:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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