Sharepoint database error: "Unexpected query execution failure, error code 266"

I recently discovered our SharePoint 2007 ULS log had multiple instances of this error:

“Unexpected query execution failure, error code 266. Additional error information from SQL Server is included below. “Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing.”

After reviewing several iterations of this error, a pattern stood out; the names of several PDF documents were intertwined with the error message itself.  This error seemed confined to a single content type (PDF) as other document types such as XLS were not mentioned. This was a clue, given that PDF files are not indexed by default in SharePoint, but require extra configuration. I turned my attention to the Search service.

As this was a WSS server, I opened regedit and navigated to the registry key for the  .PDF iFilter:  HKEY_LOCAL_MACHINESOFTWAREMicrosoftShared ToolsWeb Server Extensions12.0SearchSetupContentIndexCommonFiltersExtension

The value of this registry key was {4C904448-74A9-11D0-AF6E-00C04FD8DC02}, which is the GUID for Adobe PDF IFilter 6.  Since we only had the Adobe 9.x version installed, I changed this value to the GUID for the 9.x iFilter:  {E8978DA6-047F-4E3D-9C78-CDBE46041603}.  I then stopped the search service with the “net stop spsearch” command, and restarted it with “net start spsearch” to ensure the registry change was picked up.

After this change, the error disappeared from the ULS log, and the 9.x iFilter was able to successfully index the PDF content.

Leave a Reply

Your email address will not be published. Required fields are marked *