OLE DB Provider for Microsoft Indexing Service

Accessing and Changing Relational Data

Accessing and Changing Relational Data

OLE DB Provider for Microsoft Indexing Service

Microsoft® Windows 2000 includes Microsoft Internet Information Services (IIS) and Microsoft Indexing Service version 3.0. These services enable filtering files based on their properties and performing full-text indexing and retrieval of file data. (For Microsoft Windows NT® 4.0 systems, the Windows NT 4.0 Option Pack includes IIS 4.0 and Microsoft Indexing Service 2.0.)

Indexing Service also includes the Microsoft OLE DB Provider for Microsoft Indexing Service. This provider can be used to perform full-text or property value searches on nondatabase files. A linked server definition can be made using sp_addlinkedserver, and security can be set up using SQL Server Enterprise Manager. Distributed queries can then reference the provider to retrieve indexing information.

To create a linked server to access an Indexing Service full-text index

  1. Create the full-text index using Indexing Service. By default, Indexing Service installs a catalog named default. For more information, see the Indexing Service documentation.

  2. Execute sp_addlinkedserver to create the linked server, specifying MSIDXS as provider_name, and the name of the full-text index as data_source.

    For example, to create a linked server named FTIndexWeb that accesses a full-text index named Web, execute:

    sp_addlinkedserver FTIndexWeb, 'Index Server', 'MSIDXS', 'Web'
    
  3. The security authorization of Indexing Service clients is based on the Windows account of the process consuming the OLE DB Provider for Microsoft Index Service. Distributed queries are run in the context of the Microsoft SQL Server™ 2000 process. Because SQL Server typically runs under an account that has a high level of authorization, some SQL Server users use an Indexing Service linked server to access information that they are not authorized to access. Members of the sysadmin fixed server role address this problem by strictly controlling the SQL Server logins that are authorized to perform distributed queries using an Indexing Service linked server.

    The administrator first uses sp_droplinkedsrvlogin to remove all login mappings to the Indexing Service linked server, for example:

    sp_droplinkedsrvlogin FTIndexWeb, NULL
    

    The administrator then uses sp_addlinkedsrvlogin to authorize individual logins to access the linked server, for example:

    sp_addlinkedsrvlogin FTIndexWeb, true, 'SomeLogin'
    

    To perform these actions, right-click the linked server in SQL Server Enterprise Manager, click Properties, and then select the Security tab.

    In addition, ad hoc access to the OLE DB Provider for Microsoft Indexing Service using OPENQUERY can be disabled by setting the provider option DisallowAdhocAccess. For more information, see Configuring OLE DB Providers for Distributed Queries.

Transact-SQL statements can use the OPENQUERY function to send commands to Indexing Service using an SQL syntax that is consistent with the full-text query syntax supported in SQL Server for full-text searches of data stored in the database. The SQL full-text syntax supported by Indexing Service is defined in the Index Server Programmer's Guide found either on the Microsoft Development Network or in the Indexing Service documentation in the Windows NT 4.0 Option Pack. For more information about using the OLE DB Provider for Microsoft Indexing Service in Transact-SQL statements, see Full-text Querying of File Data.