Pages

Thursday, 5 July 2012

User Profile Syncnronization Service stuck at Starting after Installing Service Pack 1 + June 2011 CU


User Profile Syncnronization Service stuck at Starting after Installing Service Pack 1 + June 2011 CU.

This didn’t happen after installing SP 1 and June 2011 CU. Microsoft says to stop and start the User Profile Services after Installing SP 1 and June CU. That worked for my environment but the issue started after couple of days.

Eventually had to reset and re-provision user Profile service app ( Delete without data and then create the user profile service app and using the existing Social and Profile Databases but not Synchronization that’s for not losing your existing data) but that didn’t solve the problem. Had to run this to resolve the issue I though modified this little bit for my environment.

##Add-PSSnapin Microsoft.SharePoint.Powershell

Get-SPServiceInstance

Copy the ID of User Profile Synchronization from here

Stop-SPServiceInstance 'Place the ID of User Profile Synchronziation without the single quotes'

Go back to Central Admin and check the status if it stopping

If it’s stuck in Stopping, run an IISRESET

Get-SPServiceAppliaction

Copy the ID from here for User Profile Service App

$syncDBType = "Microsoft.Office.Server.Administration.SynchronizationDatabase"
$upaSAType = Get-SPServiceApplication -ID 'b2077e3c-a375-44a3-b0f9-1b82fdd0366a – this is a test ID'
$syncDB = Get-SPDatabase | where-object {$_.Type -eq $syncDBType}
$upa = Get-SPServiceApplication | where-object {$_.TypeName -eq $upaSAType}
$syncDB.Unprovision()
$syncDB.Status = "Offline"
$upaSAType.ResetSynchronizationMachine()
$upaSAType.ResetSynchronizationDatabase()
$syncDB.Provision()
restart-service SPTimerV4

Wait for 5-10 minutes, check the user profile sync and service status, If stopped, Start it.
Wait for 5-10 minutes, after that No Harm in running IISRESET if you don't see it started

My Big Thanks to Spencer Harbar for coming up with this brilliant piece of work.

No comments:

Post a Comment