Thursday, July 12, 2012

Rename a SharePoint Server machine name

There are number of concerns that contribute to defining the process that you will be taking to change a machine name for a SharePoint server.

Make sure you execute the following steps in order:

  • Run the following command:
    Stsadm.exe -o renameserver -oldservername <OLD_SERVER_NAME> -newservername <NEW_SERVER_NAME>
  • Rename the machine name from the computer properties
  • Reboot the machine
  • Update credentials (if required) if you are using domain accounts and the account didn’t change you can skip this step 
    stsadm –o updatefarmcredentials –userlogin <NEW_SERVER_NAME>\username -password ********
    stsadm –o osearch –farmserviceaccount <NEW_SERVER_NAME>\username -farmservicepassword ********

    stsadm –o spsearch –farmserviceaccount <NEW_SERVER_NAME>\username -farmservicepassword ********

    stsadm –o editssp –title “SHARED_SERVICE_TITLE” -ssplogin <NEW_SERVER_NAME>\username -ssppassword ********
  • Run the this command to reset the IIS: IISRESET /NOFORCE
  • Fix the Alternate access mappings
     If you are not able to get into the central admin site yet run the following command:
        stsadm -o addalternatedomain -url http://<OLD_SERVER_NAME>:<CENTRAL_ADMIN_PORT> -urlzone extranet –incoming url http://<NEW_SERVER_NAME>: <CENTRAL_ADMIN_PORT>

    Now you should be able to go to the central admin to clean the miss in the AAM. Basicly rename all the old server names into the new server name.
  • Now through the central administration or command line, make sure that you have the right credentials for the app pools (again if you are using domain users you shouldn’t worry about this at all)
  • Reboot the machine
  • Now run the SharePoint Products and Technologies configuration wizard to seal the deal
  • Reboot the machine
  • If you get the error related to SQL Server check your Database settings and make sure that they are correct. You can use stsadm to reset the config db name if the server name has changed and the same thing with the content DBs
  • If you do any changes to the DB settings make sure that your run: "IISRESET /NOFORCE" afterwards
  • After all that, if you have the db on the same machine as the sharepoint that means that you probably need to take care of the sql server settings (server name change) do run the following SQL Queries:
  •     -In case you use the default or no sql instance name:

    EXEC sp_dropserver '<OLD_SERVER_NAME>'
    EXEC sp_addserver '<NEW_SERVER_NAME>', 'local'
  •     -In case you use a custom sql instance name:
    sp_dropserver <’OLD_SERVER_NAME\instancename'>
    sp_addserver <'NEW_SERVER_NAME\instancename'>, local
  • Then restart the Sql Service to take effect

No comments:

Post a Comment