Thanks!

Rename Sharepoint server - new hostname

Recently there was a request to rename a server running Sharepoint 2010 Beta (Could just as well have been MOSS 2007 / WSS 3.0 though).  This server was running SQL on the same box, but the solution here can do the trick for many renaming issues.

So what happens when you rename your server and gives it a new hostname? Well, Sharepoint doesn’t like it. This is the message I got:

Cannot connect to the configuration database.

Oops. That’s a message you do NOT want to see.

So you try to enter Central Admininistration and get “Internet Explorer cannot display the webpage”. Well, as soon as you take a look in the address field in the browser, you see why: the shortcut pointing to Central Administration points to the wrong URL (e.g. oldservername:10000, not newservername:10000, assuming Central Admin runs on port 10000). So you type newserver:10000 and cross your fingers. Sorry, you get the same “Cannot connect to configuration database”.

But fear not, you can fix this! First of all, rename your server back to the old server name and restart, and everything will work again (you can take a deep breath now). But you still want to rename the server, right?

Solution

You have to reconfigure Sharepoint and tell it where it can find the databases. If you already have renamed the server, you can probably do the same thing as described below, but the best is to do this in advance. Besides, nothing works anyway right, so reverting the name temporary with the required restart won’t do any harm and give you time to the aforementioned deep breath. (If you try to fix this with adding an entry with the old server name in your host file, you’ll just get “An unexpected error has occured” or the same “Cannot connect to the configuration database”).

This is what you do:

  • Run this stsadm command: stsadm -o renameserver -oldservername oldservername -newservername newservername.
  • Rename and reboot server.
  • Enter Central Admin and look over all your Alternate Access Mappings (you’ll have to change to the new server name everywhere the old server name still shows).
  • I didn’t have this problem with 2010, but you might have to check and possibly reset your site collection admins. I wouldn’t be surprised if you’ll have to go over your host names in IIS in case you are using host headers also.

9 comments to Rename Sharepoint server – new hostname

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>