开发者

How to query remote index catalogs

开发者 https://www.devze.com 2023-03-09 21:53 出处:网络
I\'ve been trying to create a linked server in SQL Server that accesses a remote Index Service catalog, but I can\'t seem to do it. Let\'s call

I've been trying to create a linked server in SQL Server that accesses a remote Index Service catalog, but I can't seem to do it. Let's call the remote server "remoteServer" and the Catalog "remoteCatalog"

I've tried this:

EXEC sp_addlinkedserver remoteIndexServer, 'Index Server', 'MSIDXS',
    'query://remoteServer/remoteCatalog'

and then i did run the SQL

SELECT * FROM OPENQUERY(remoteIndexServer,'select filename from scope()') AS Q

But i got the error as

OLE DB provider "MSIDXS" for linked server "remoteIndexServer" returned message "Service is not running. ".
Msg 7320, Level 16, State 2, Line 3
开发者_Go百科Cannot execute the query "select filename from scope()" against OLE DB provider "MSIDXS" for linked server "remoteIndexServer". 


I have experienced this issue before. This is from memory so excuse any errors but if I recall correctly you will need to do the following.

Install the indexing service on your local SQL Server (this is so the provider is available).

Add a linked server to this LOCAL indexing service.

You can then run you query as below

SELECT * 
FROM   OPENQUERY(
           LocalLinkedServer,
           'select filename from RemoteServer.CatalogName..scope()'
       ) AS Q

If that doesn't work let me know, there is a post somewhere that describes how to do this. I can look it up if necessary but I think the above is right.

0

精彩评论

暂无评论...
验证码 换一张
取 消