Renaming of a SQL Server

  • Hi all, am in the process of building a new box to move our old one to. Due to restricted timeframes I thought the best way to build the new box was to build it as a replica of the old and rename the box when it came time to get it up and running.

    I intend to copy the databases over to the new box on the intended night and then rename the box. I have scripted the logins, jobs and was going to restore the dts packages from the msdb databse. Also have replication going which I have scripted also.

    Are there any issues with what I am doing ? Cannot find much on the net with renaming the server other than instructions on how to drop and add the server name.

    Assistance would be welcome.

    Cheers, Angie

     

  • Connect to SQL with QA

    Rename the windows install

    issue an

    sp_dropserver (old name)

    go

    sp_addserver (newname), local

    And reboot. Should be good to go.

  • If you're using SQL 7.0 , then you'll need a dummy install to get the server name straightened out. For SQL 2k, following Steve's steps.

    Seems you intend not to restore master. You'll lose linked servers and remote logins.

  • Thanks for the input guys, sorry it is a sql 2000 install and I had intended to use the sp drop server etc, just thought that if there where any gotchas it would be good to know. I will probably restore the master to get the remote servers etc. But have scripted what I can to get things back.

    Thanks

    Angie   

  • If you are using replication, you will need to stop and restart SQL after you do the drop and add server.  It appears to grab the server name when SQL starts and keeps trying to use it after you 'rename' SQL.  Also, you will need to do the following or any agent jobs you have created before the rename will not be able to be edited:

    update

    msdb.dbo.sysjobs

    set originating_server = '<new servername>'

    where

    originating_server = '<old servername>'

  • Thanks for the info Jane, that would have been a gotcha as I am going to copy those over with the databases.

    Will add this to my TO DO list.

    I have replication running but was going to run the replication script after I renamed the server.

    Thanks

    Angie   

Viewing 6 posts - 1 through 5 (of 5 total)

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