Renaming server PC with Sharepoint

Published 25 April 8 5:36 AM | Michael

Usually all Sharepoint development happens on virtual environment. There are several advantages of this, like

  • creating snapshots of your system to mitigate system restore when you broke your environment
  • creating Sharepoint farm on the single PC, when you can easily run different virtual systems and setup sharepoint farm there

But when you are cloning your existed sharepoint system you end up with absolutely the same sever, including the same server name name. And this is the only problem. However, renaming server name with the installed Sharepoint is not trivial as you could expect.

There are several items which should be renamed - server name, database name, Sharepoint references. And the situation became complex when your Sharepoint sites use Sharepoint Search - in this case you need rename MSSQL$MICROSOFT##SSEE database.

Actually, I failed with renaming Sharepoint Search DB, and decided to turn search off before system renaming.

The follow steps should be done to rename server with installed Sharepoint

  1. Go to the Sharepoint Central Administration > Operations > Services on Server  and stop "Windows SharePoint Services Search"
  2. To go the Control Panel -> System and rename your server (save your old name somewhere). Don't restart your system
  3. If you have MS SQL Server installed on the same box you need to rename in too - go to "SQL Server Management Studio" and execute the following script

    EXEC sp_dropserver '<old_name>'
    GO
    EXEC sp_addserver '<new_name>', 'local'
    GO

  4. Update Sharepoint references to the PC name calling the next command: stsadm -o renameserver -oldservername <old server name> -newservername <new server name>
  5. Restart your PC
  6. If you try to open Central Administration after restarting PC it will try to open the site with the old server name. You need to recreate your Central Administration site for the new server name calling the following command(any port address): psconfig -cmd adminvs -provision -port 1800 -windowsauthprovider "onlyusentlm"
  7. Now if you restart IIS and try to open your Central Admin site it will successfully open your site with new server name
  8. Go to the "Application Management" and remove Central Administration Web Site with old server name

That's all. Now you have the clone of your virtual server with the new server name.

Update: Guideline how to rename content database: http://blogs.technet.com/wbaer/archive/2008/06/16/renaming-content-databases.aspx

 

Mirror: Renaming server PC with Sharepoint

Filed under:

Leave a Comment

Name:  
Website: