Wednesday, February 1, 2017

Restoring user profile service application with existing databases

Issue: Restoring user profile service with existing database / After restoring a farm from a backup using the Restore-SPFarm PowerShell command the User Profile Synchronization service fails to start
Resolution: To resolve the issue deleted the User Profile Application that was created during the restore process and then recreated it.    To ensure that you do not lose any user profile content there are a few steps that must be followed:
  1. Using central administration, stop the user profile application service on all servers in the farm.
  2. Using central administration, delete the user profile application.   DO NOT check the option to "Delete data associated with the Service Applications".
  3. Identify the names of the user profile, social, and sync databases.
  4. Run the New-SPProfileServiceApplication PowerShell command passing in parameters for: ApplicationPool, Name, MySiteHostLocation, ProfileDBName, ProfileSyncDBName, and SocialDBName.     This will create a new profile service application using your restored profile databases.
  5. Run the New-SPProfileServiceApplicationProxy PowerShell command passing in parameters for: ServiceApplication and Name.   Also include the DefaultProxyGroup parameter.
  6. Start the User Profile Service on Application sever
  7. Run an IISReset command on each server.
  8. Start the User Profile Synchronization Service on the application server.  Wait for 5 – 10 minutes for the service to start.   Ensure that it is started before proceeding.
  9. Ensure that the User Profile Synchronization Timer job is enabled and set properly and then start a full import.
Always remember to test out your disaster recovery plan in a development or QA environment prior to your production launch of SharePoint 2010.

No comments:

Post a Comment