Say you’ve got a Windows SharePoint Services 3.0 server, and you’ve got to rename it — as in change the actual computer name. I found myself twice in that situation recently. How do you go about renaming it? It’s a three-step process, as outlined below. Plan for a half-hour outage, just to be on the safe side.
Step one:
Change the machine name. I hope no directions are needed for this. If you need them, you should abort the operation, and get someone more qualified to help.
Step two:
This only applies if your server is self-contained (it has IIS, SQL Server and SharePoint installed on the same machine). Change the name of the SQL Server install by following the excellent directions written by Tibor Karaszi. Like him, I prefer to go directly into the sysjobs table and edit the server names. When you’re done, don’t forget to either restart the machine or the SQL Server services.
Step three:
Per MS Tech Support, open the command prompt and type the following:
- cd c:\program files\common files\microsoft shared\web server extensions\12\bin
- stsadm -o renameserver -oldservername [type in the name] -newservername [type in the name] (remove the brackets, just type the names by themselves)
Now open the SP Admin interface, go to Operations >> Alternate access mappings and modify the server names to reflect the new name. Modify all appropriate entries there. When you’re done, don’t forget to either restart the machine, or the SharePoint services.
Test the SP sites and make sure things are working as they should be. Remember, if you posted any images on your sites, and you used the machine name instead of the site URL for the image paths, the paths will now be broken, and you’ll need to go through each link and re-map it. MS Support didn’t know of any automated way of doing this. Of course, if you feel adventurous, you can back up the SP DB, then go through the SQL file with a text editor looking for instances of the name and replacing it with the new one. Then you can restore the DB from the modified backup file and see how things turn out. I don’t advise this though. You may mess up the text encoding, and may end up with weird characters in your content, not to mention you could also corrupt the DB.
That’s it, you’re done now. If you’d like to read up on the stsadm command-line tool, you can check out this article at the TechNet site.