What an adventure working with SharePoint 2010 User Profile Synchronization Service and I can appreciate the efforts by Spencer Harbar who worked on it since RTM release and put together a good set of articles to help walk through the maze. You can find more about it at http://www.harbar.net/. Ali Mazaheri also has some good articles at http://blogs.msdn.com/b/alimaz/.
In a five SharePoint 2010 Server farm (2 WFE and 3 App) I was stuck at starting state of User Profile Synchronization Service. Everything apparently ok and by the book but still not able to go beyond starting state of User Profile Synchronization Service. End to end, environment is Windows 2008 R2, SQL 2008 R2 and SharePoint 2010 – all patched to current cumulative updates and service packs and using Kerberos with all SharePoint BI apps running and working and no clean ULS.
Using Windows Local Security Policy, I enabled the audit logging to capture more details and that helped in giving some pointers. I events like below.
A caller has attempted to propagate a transaction to a remote system, but MSDTC network DTC access is currently disabled on machine 'DATABASESERVER'. Please review the MS DTC configuration settings (Source MSDTC Client 2, Task Category MSDTC Proxy, Event ID 4874)
Microsoft.ResourceManagement.Service: System.ArgumentException: Unable to open database connection
Parameter name: connectionString ---> System.Transactions.TransactionException: The partner transaction manager has disabled its support for remote/network transactions. (Exception from HRESULT: 0x8004D025) ---> System.Runtime.InteropServices.COMException (0x8004D025): The partner transaction manager has disabled its support for remote/network transactions. (Exception from HRESULT: 0x8004D025). (Source: Forefront Identity Manager, Event ID: 3)
The Forefront Identity Manager Service cannot connect to the SQL Database Server. (Source: Forefront Identity Manager, Event ID: 22)
Here it’s the same SQL Server (configured using SQL alias) that is working fine for all other communications, access and authentications. Here the clue is in MSDTC Client Warning message (id: 4874) which is pointing to the SQL Server MSDTC configurations.
To fix it, go SQL Server, Component Services (MMC in Admin Tools) and enable the settings as below. Give it a try. You will have to wait for running User Profile Synchronization Service to retire and then start it again. Come back and let me know if it solved your issue.
I still have a hanging instance of User Profile Synchronization Service in starting state on another app server (with Central Admin) that I cannot get rid of. Tried few things but it is not timing out to go back in stop state. Tried the recipes from the different posts and TechNet but still can’t figure it out how to get rid of it. Let me know if you have any suggestions.