Thursday, 25 July 2013

User Profile Synchronization Service–Hangs on Starting

While FARM setup for SharePoint 2013, I faced User profile synchronization issue.
It got stuck on "Starting".

I have tried each and every thing what I can but no any solution,

I have tried this link also but not able to. I only find here that I have to use ULS Log viewer to see what exact issue is.

While reviewing log, I found that the error is not with User Profile Sync service but with FIM service
It is showing that "The Forefront Identity manager can not connect to sql datatbase"

Now, I have error. For resolution, I have done following:

1- The SQL Server could not be contacted. The connection failure may be due to a network failure, firewall configuration error, or other connection issue. Additionally, the SQL Server connection information could be configured incorrectly.

2- Verified that the SQL Server is reachable from the Forefront Identity Manager Service computer. Ensure that SQL Server is running, that the network connection is active, and that the firewall is configured properly. Last, verify the connection information has been configured properly. This configuration is stored in the Windows Registry.

3- Open central administration -> security -> Configure Service Account (On the drop down pick Farm Account) and ensure that the select and account for the component is the same as the one you are using to configure FIM (User profiles) the OK.

Then It started throwing following error:
UserProfileApplication.SynchronizeMIIS: Failed to configure ILM, will attempt during next rerun. Exception: System.Data.SqlClient.SqlException: Specified collection 'StringSchemaCollection' cannot be dropped because it is used by object 'Domain\spfarm.GetObjectCurrent'.

After surfing, I found this useful Link
And I Write down following PowerShell command:
#Stop hangged User Profile Synchronization service
$userprof=Get-SPServiceInstance |?{$_.TypeName -match "User Profile Synchronization*"}
Stop-SPServiceInstance $userprof

#UnProvisioned and then Provisioned Sync DB
 $syncdb=Get-SPDatabase |?{$_.Name -match "Sync DB*"}
   $upa=Get-SPServiceApplication  |?{$_.Name -match "User Profile*"}

Add the User Profile Synchronization service account as dbo on the Sync DB (using SQL Server Management Studio).
#Restart the sptimerv4 
net stop sptimerv4

net start sptimerv4
Start the UPA using Central Administration site and iisreset 
and Its done...............
Thanks to this link providing me solution.

1 comment :