Skip Ribbon Commands
Skip to main content

Quick Launch

Todd Klindt's home page > Todd Klindt's SharePoint Admin Blog > Posts > How to recreate SharePoint 2010’s User Profile Service Application without losing all that delicious data
December 10
How to recreate SharePoint  2010’s User Profile Service Application without losing all that delicious data

There comes a time in every SharePoint 2010 admin’s life when they must make a choice. Continue to be pushed around by that bully the User Profile Service Application (UPA) , or fight back, give it a bloody nose and show it who’s boss. Today’s blog post is about the latter. At various times the UPA gets fuzz in its head and won’t behave. When that’s the case, you can often fix the issue by blowing the UPA away and recreating it. When you do that you lose all your existing profile information. If your profile information consists entirely of information pulled from Active Directory then it’s no big loss. That’s not the case with most farms though. Users have augmented their profile information with pictures or other information, and there’s also the whole social aspect. The UPA stores all the tags and notes and activities. You don’t want to lose that. When things go missing in SharePoint, users lose faith in the platform. We don’t want that. This blog post will walk you through how to rebuild your UPA without losing any previous data.

The first step is to copy down your existing settings. This is part of what we lose when we rebuild the UPA, so we need to scribble them down so we can put them back in when we rebuild. This usually is just your AD connection settings, though there may also be some connection filters or BCS connections to keep track of. You should probably also eyeball your other settings like preferred search center, MySite host, and any audiences you may have added.

After you have copied down your settings it's time to bite the bullet and delete the offending Service App. Go to Central Admin > Manage Service Applications and highlight User Profile Service Application. Then click Delete in the Ribbon.

image

This next part is INCREDIBLY important. Please pay very close attention. No NOT click the checkbox in the dialog box that pops up. That leaves the databases that we need in place.

image

Verify that box is NOT checked and click OK.

After the Service Application is deleted, head over to SQL Management Studio, and attach to the database instance where your UPA databases are. You will see three UPA related databases; profile, social and sync. Here’s a rough breakdown of what each database does:

Profile – Stores user information and activity feed

Social – Stores tags and notes

Sync – Staging area for FIM while it’s syncing between AD and SharePoint

You can find more information about each database in the TechNet article Database types and descriptions (SharePoint Server 2010).

The Profile and Social DBs have the important stuff in them, and thankfully the User Profile service can reuse them. The Sync database is trash, so we can delete it.

image

Go ahead, delete that mother.

You might have to make a couple of changes to the delete options:

SNAGHTML411b790

Now the destructive part is over. The demons have been exorcized. You can breathe easy. The worst part is over.

Now it’s time for the phoenix to rise. We need to rebuilt our UPA, bigger, stronger than before. Go to back to Central Admin > Manage Service Applications and create a new User Profile Service Application.

image

When the dialog comes up, we’re going to give it the same database names the old UPA had. The new UPA will reuse the Profile and Social DBs, which will maintain that information. Since we deleted the Sync DB it can’t reuse that, so it will recreate it.Here are some shoddy screenshots that show the settings.

SharePoint 2010 12-10-2011 1.50.39 PM

 

SharePoint 2010 12-10-2011 1.52.13 PM

SharePoint 2010 12-10-2011 1.52.50 PM

SharePoint 2010 12-10-2011 1.53.30 PM

You’ll notice I also had to put in the My Site Host URL and My Site Managed Path location.

After the new service application is created you may have to refresh the Service Applications page before it will show up. While you’re in there let’s go ahead and give the Search crawler account permission to crawl our new server application. To do that, highlight the new service application and click “Administrators” in the Ribbon.

image

Then add your default crawl account and give it the “Retrieve People Data for Search Crawlers” permission.

image

Now click the service application and finish its configuration. In most cases this will mostly be recreating the Active Directory connection. When you open the UPA and look in the upper right corner you should see a bunch of profiles already exist. This is proof that the old profile database is being used, and that we still have all the old profile information.

image

At this point go ahead and recreate your AD connection and any other settings you copied down earlier. After you get those set, run a full sync and verify it all works. The profile count shouldn’t change, since we’re using the same Profile DB. You’ll have to watch the Sync in miisclient.exe to see how it goes. After the Sync gets finished run a full crawl with Search to make sure that all works.

Now hopefully whatever problem you had with the UPA is now fixed, and you have another notch on your keyboard from where you’ve done battle with the User Profile Service and won.

tk

 

edit: I meant to mention in this that this same technique can be used to replicate the UPA in another environment. That environment could be testing or even a disaster recovery site.

Comments

Thanks, just in time

About to bin a UPA, its only a test enviroment but I don't want to trash the data so this article had come just in time for me.

Thanks again Todd.

@SharePointRandy
 on 12/11/2011 2:04 PM

Thank you.

It's very useful Todd. Thanks for all of your hard work!
 on 12/11/2011 3:33 PM

Re: Thanks, just in time

Randy,
I'm a procrastinator, so you're really lucky I published this when I did. Glad it helped.

tk
Todd O. KlindtNo presence information on 12/11/2011 7:51 PM

Re: Thank you.

You're very welcome. I'm glad I can help.

tk
Todd O. KlindtNo presence information on 12/11/2011 7:53 PM

HollyPoint or Sharewood

Todd sometimes I wonder if in your perception there is any difference between directing a hollywood movie or administrating a SharePoint environment ;-)
 on 12/12/2011 4:11 AM

Question

Todd, In the past I have tried this on my test environment, but after recreating UPA, I have had trouble getting the UPA to be in sync with the profile and social dbs. Have you run in to this?

BTW, very nice post. Big fan!

-Ajay
 on 12/12/2011 2:20 PM

Re: Question

Hi Ajay,
I've done this quite a few times and never had this issue. If this happened to me I'd crank up logging and look through the ULS logs and see if there were any clues. I'd also use the miisclient.exe while a sync was happening to see if there were any clues there too.

tk
Todd O. KlindtNo presence information on 12/13/2011 9:14 PM

Re: HollyPoint or Sharewood

Sadly I have a face for radio. I haven't given Hollywood any thoughts. If you know someone in the biz, give them my information, make me a star!

:)

tk
Todd O. KlindtNo presence information on 12/13/2011 9:22 PM

Great Post

This was a great post Todd. It's seems as of lately with the CU's of SharePoint, recreating the User Profile Service Application is required after each installation...

This way I don't have to resync. :)
 on 12/15/2011 12:05 PM

Apollo 13-esque

Aside from the excellent content, some of the graphical notations remind me of this scene from Apollo 13:

Jim Lovell: [pointing to a large "NO" note on the control panel] What is that?
Jack Swigert: Oh, I was getting a little punchy and I didn't want to cut the LEM loose with you guys still in it.
Jim Lovell: That's good thinking.

Kind of like, don't accidentally jettison your user data.
Great work, as usual
 on 12/24/2011 12:48 AM
1 - 10Next

Add Comment

Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.

Title


Body *


Today's date *

Select a date from the calendar.
Please enter today's date so I know you are a real person

Twitter


Want a message when I reply to your comment? Put your Twitter handle here.

Attachments

 

 Please Support my Sponsors