FIM – Forefront Identity Manager Failed to Connect to SQL Server
ISSUE
=====
SharePoint 2010 connects to a SQL Instance
In SharePoint 2010 FIM is used for importing and synchronising user profiles by the User Profile Service Application. Starting the User Profile Synchronising Service (from Central Admin – System Settings – Mange Service on Server) Fail’s. Reviewing the Event log you receive the following error message:
Log Name:Â Â Â Â Â Application
Source:Â Â Â Â Â Â Â FIMSynchronizationService
Date:Â Â Â Â Â Â Â Â Â 13/07/2010 15:19:37
Event ID:Â Â Â Â Â 6324
Task Category: Server
Level:Â Â Â Â Â Â Â Â Error
Keywords:Â Â Â Â Â Classic
User:Â Â Â Â Â Â Â Â Â N/A
Computer:Â Â Â Â Â <SP2010NAMEE>.<DOMAINNAME>
Description:
The server encountered an unexpected error and stopped.
�
 “ERR: MMS(1804): sql.cpp(5580): Query (CSession::Open()) performed with error
ERR: MMS(1804): sql.cpp(5601): Error retrieving error
BAIL: MMS(1804): sql.cpp(568): 0×80230406 (An error has occurred at the store)
BAIL: MMS(1804): sql.cpp(384): 0×80230406 (An error has occurred at the store)
BAIL: MMS(1804): sql.cpp(256): 0×80230406 (An error has occurred at the store)
BAIL: MMS(1804): storeimp.cpp(272): 0×80230406 (An error has occurred at the store)
ERR: MMS(1804): server.cpp(294): Failed to connect to the database User Profile Service Application_SyncDB_2404860889364cf2a021eccb509327fd on <SQLSERVERNAME>
BAIL: MMS(1804): server.cpp(295): 0×80230406 (An error has occurred at the store)
BAIL: MMS(1804): server.cpp(3518): 0×80230406 (An error has occurred at the store)
BAIL: MMS(1804): service.cpp(1528): 0×80230406 (An error has occurred at the store)
ERR: MMS(1804): service.cpp(977): Error creating com objects. Error code: -2145188858. This is retry number 0.
ERR: MMS(1804): sql.cpp(5580): Query (CSession::Open()) performed with error
ERR: MMS(1804): sql.cpp(5601): Error retrieving error
BAIL: MMS(1804): sql.cpp(568): 0×80230406 (An error has occurred at the store)
BAIL: MMS(1804): sql.cpp(384): 0×80230406 (An error has occurred at the store)
BAIL: MMS(1804): sql.cpp(256): 0×80230406 (An error has occurred at the store)
BAIL: MMS(1804): storeimp.cpp(272): 0×80230406 (An error has occurred at the store)
ERR: MMS(1804): server.cpp(294): Failed to connect to the database User Profile Service Application_SyncDB_2404860889364cf2a021eccb509327fd on <SQLSERVERNAME>
BAIL: MMS(1804): server.cpp(295): 0×80230406 (An error has occurred at the store)
BAIL: MMS(1804): server.cpp(3518): 0×80230406 (An error has occurred at the store)
BAIL: MMS(1804): service.cpp(1528): 0×80230406 (An error has occurred at the store)
ERR: MMS(1804): service.cpp(977): Error creating com objects. Error code: -2145188858. This is retry number 1.
ERR: MMS(1804): sql.cpp(5580): Query (CSession::Open()) performed with error
ERR: MMS(1804): sql.cpp(5601): Error retrieving error
BAIL: MMS(1804): sql.cpp(568): 0×80230406 (An error has occurred at the store)
BAIL: MMS(1804): sql.cpp(384): 0×80230406 (An error has occurred at the store)
BAIL: MMS(1804): sql.cpp(256): 0×80230406 (An error has occurred at the store)
BAIL: MMS(1804): storeimp.cpp(272): 0×80230406 (An error has occurred at the store)
ERR: MMS(1804): server.cpp(294): Failed to connect to the database User Profile Service Application_SyncDB_2404860889364cf2a021eccb509327fd on <SQLSERVERNAME>
BAIL: MMS(1804): server.cpp(295): 0×80230406 (An error has occurred at the store)
BAIL: MMS(1804): server.cpp(3518): 0×80230406 (An error has occurred at the store)
BAIL: MMS(1804): service.cpp(1528): 0×80230406 (An error has occurred at the store)
ERR: MMS(1804): service.cpp(977): Error creating com objects. Error code: -2145188858. This is retry number 2.
ERR: MMS(1804): sql.cpp(5580): Query (CSession::Open()) performed with error
ERR: MMS(1804): sql.cpp(5601): Error retrieving error
BAIL: MMS(1804): sql.cpp(568): 0×80230406 (An error has occurred at the store)
BAIL: MMS(1804): sql.cpp(384): 0×80230406 (An error has occurred at the store)
BAIL: MMS(1804): sql.cpp(256): 0×80230406 (An error has occurred at the store)
BAIL: MMS(1804): storeimp.cpp(272): 0×80230406 (An error has occurred at the store)
ERR: MMS(1804): server.cpp(294): Failed to connect to the database User Profile Service Application_SyncDB_2404860889364cf2a021eccb509327fd on <SQLSERVERNAME>
BAIL: MMS(1804): server.cpp(295): 0×80230406 (An error has occurred at the store)
BAIL: MMS(1804): server.cpp(3518): 0×80230406 (An error has occurred at the store)
BAIL: MMS(1804): service.cpp(1528): 0×80230406 (An error has occurred at the store)
ERR: MMS(1804): service.cpp(977): Error creating com objects. Error code: -2145188858. This is retry number 3.
BAIL: MMS(1804): service.cpp(991): 0×80230406 (An error has occurred at the store)
Forefront Identity Manager 4.0.2450.5″
Resolution
=========
Somehow the SQL Instance information for the FIM Synchronising Service is missing
To resolve the issue add the SQLInstance name to the following Reg key:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINESYSTEMControlSet001servicesFIMSynchronizationServiceParameters]
"SQLInstance"="<InstanceName>"

1 comment
Luke Smith says:
June 16, 2011 at 12:25 am (UTC 0)
Itnis worth noting that this issue has been fixed since oct 2010 CU. My recommendation is to deploy Service Pack 1