Changing the servername

  • Hi all,

    I would like to have an opinion on changing the server name.

    Recently we replaced our production server due to hardware related performance problems. The switch was done in following order. The new server was installed and named SRV1NEW. Databases were moved to this server and everything was tested ok. The old server was renamed to SRV1OLD shut down and the new server renamed to SRV1.

    Everything went well and everything works except for one thing. The variable @@SERVERNAME still returns SRV1NEW instead of SRV1.

    I've seen that it is possible to change this by using sp_dropserver sp_addserver on local. I've also seen warnings about using this method in the newsgroups so I would like to hear your opinion.

    Thanks Fredrik H

     

     

     

  • After sp_dropserver sp_addserver  you have to restart the sql server for that global variable @@ServerName to take effect.

  • See "renaming servers" in BOL for more info, but that doesn't say to restart the SQl service

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply