Wednesday, February 23, 2011

Could not access the Search administration database. A generic error occurred while trying to access the database to obtain the schema version info.


Scenario:
You are trying to do a standalone installation of SharePoint 2010 Server or SharePoint Foundation and the Configuration Wizard fails at Step 5. This error occurs during provisioning of the SharePoint Foundation Search Service. All other services are installed properly.

Error:
A generic error occurred while trying to access the database to obtain the schema version info.

If you check the PSDiagnostic logs under C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Logs

You get the following error recorded in that file:

ERR Failed to register SharePoint services.
An exception of type System.Runtime.InteropServices.COMException was thrown. Additional exception information: Could not access the Search administration database. A generic error occurred while trying to access the database to obtain the schema version info. 
System.Runtime.InteropServices.COMException (0xC0041236): Could not access the Search administration database. A generic error occurred while trying to access the database to obtain the schema version info.
at Microsoft.SharePoint.Search.Administration.MSSITLB.IGatherApplications2.Mount(String bstrName) 
at  Microsoft.SharePoint.Search.Administration.GathererApplication.ProvisionGathererApplication() 
at Microsoft.SharePoint.Search.Administration.GathererApplication.Provision() 
at Microsoft.SharePoint.Search.Administration.SPSearchServiceInstance.Synchronize(Boolean installGathererApplication, Boolean startIncrementalCrawl, Boolean startFullCrawl)
at Microsoft.SharePoint.Search.Administration.SPSearchServiceInstance.Provision()
at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.InstallServiceInstanceInConfigDB(Boolean provisionTheServiceInstanceToo, String serviceInstanceRegistryKeyName, Object sharepointServiceObject)
at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.InstallServiceInstances(Boolean provisionTheServiceInstancesToo, String serviceRegistryKeyName, Object sharepointServiceObject)
at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.InstallServices(Boolean provisionTheServicesToo)
at Microsoft.SharePoint.PostSetupConfiguration.ServicesTask.Run()
at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()


Possibilities why this issue might arise:
  • Previous installation might have failed to complete successfully due to insufficient permissions or network error. Now you are again trying to run the Configuration Wizard after making some permissions changes.
  • You successfully completed the Configuration Wizard during your previous attempt, but due to some password change or permission changes, the wizard fails this time.
  • There was a network (firewall error) during the configuration tasks.
Cause:
  • Corrupt registry key or incorrect reference to the registry key in the configuration database.
  • Missing protocols for connectivity between SharePoint and SQL (port 1433 should be open or if you are using a custom port ensure that it is open for incoming connections in firewall).
Resolution:
It is a 4 set procedure. I did not want to repeat anything that was already online. So, please refer to the attached links for detailed information on how to carry out the steps.
  1. Ensure that TCP\IP and Named Protocols are enabled for the local SharePoint instance.
    Reference to carry out Step 1:
    http://sureshsundar21.blogspot.com/2010/07/could-not-access-search-administration.html
  2. Delete the registry key at “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\WSS\Services\Microsoft.SharePoint.Search.Administration.SPSearchService”
    Reference to carry out Step 2:
    http://social.technet.microsoft.com/Forums/en-US/sharepointadmin/thread/916e3940-a46a-40d0-9d84-3382f80e987c
  3. Clear the SharePoint Configuration Cache files and restart the timer.
    Reference to carry out Step 3:
    http://blogs.msdn.com/b/josrod/archive/2007/12/12/clear-the-sharepoint-configuration-cache-for-timer-job-and-psconfig-errors.aspx
  4. Ensure the port number 1433 is open (on the server where you are hosting the SQL databases). If you are using a custom port, please enable the port number for incoming connections in the firewall.
    Reference for Step 4:
    http://technet.microsoft.com/en-us/library/ff607733.aspx
Hope this helps. In case the issue is still there, the problem might be related to permissions or firewall. Let me know. Thank you.

You might find these articles useful