6

Has anybody been able to connect to Windows Search Service using the OLE DB Provider for Search in SQL Server? Below you'll find the error message I keep stumbling upon when configuring a Linked Server in Management Studio.

OLE DB provider "Search.CollatorDSO" for linked server "TESTSERVER" returned message "Command was not prepared.".
Msg 7399, Level 16, State 1, Line 2
The OLE DB provider "Search.CollatorDSO" for linked server "TESTSERVER" reported an error. Command was not prepared.
Msg 7350, Level 16, State 2, Line 2
Cannot get the column information from OLE DB provider "Search.CollatorDSO" for linked server "TESTSERVER".

I'm aware more people have been struggling with this problem over the last few years, but I haven't found a solution so far.

Kees C. Bakker
  • 32,294
  • 27
  • 115
  • 203
Andrew Hartman
  • 329
  • 2
  • 7

1 Answers1

1

For reasons known only to Microsoft*, the Windows Search catalog is not accessible to SQL Server as an OLE DB datasource. The only feasible workaround for this issue is to create a CLR function and use it as a wrapper for querying the search catalog. A ready-to-run example can be found at http://www.nesterovsky-bros.com/weblog/2011/03/04/callingwindowssearchfromsqlserver2008.aspx.

*My best guess is that the search service is only partially SQL-compliant, in that it extends SQL-92 and SQL-99, but does not return the metadata or contain much of the functionality expected of a data source by SQL Server.

dartonw
  • 300
  • 1
  • 6