Product DocsMenu

Configuring and Indexing a Database Source

A source defines a set of configuration parameters for the databases indexed, including all the information required to access and authenticate.

To configure and index a database source

  1. On the Coveo server, access the Administration Tool (see Opening the Administration Tool).

  2. Select Index > Sources and Collections.

  3. In the Collections section:

    1. Select an existing collection in which to add the new source.


    2. Click Add to create a new collection (see Adding a Collection).

  4. In the Sources section, click Add to create a new database source.

    The Add Source page that appears is organized in three sections.

  5. In the General Settings section of the Add Source page:

    1. Enter the appropriate value for the following required parameters:


      Enter a descriptive name of your choice for the connector source.

      Example: Employee database

      Source Type

      Select the connector used by this source. In this case, select Database.

      Note: If you do not see Database, your environment does not meet the requirements (see Database Connector Requirements).


      Enter the connection string used to connect to the database. The connection string syntax differs from one database type to another. Refer to the appropriate documentation for the format of the connection string specific to your database (see

      The same connection string can be used for different sources. However, there can only be one connection string per source.

      Example: Data;Initial Catalog=employees;User Id=companyUser;Password=MyPassword

      You can hide the password and the user ID in the connection string (see Replacing the Identity in Database Connection Strings).

      Note: When the ODBC connection string includes SSPI security, CES uses the CES Service logon account to connect to the database. Ensure that the CES service of your Coveo instance uses a domain account that can crawl the database, not a local system account (see About the CES Service Logon Account).

      Refresh Schedule

      Time interval at which the source is automatically refreshed to keep the index content up-to-date. By default, the recommended Every day option instructs CES to refresh the source everyday at 12 AM.

      Note: You can create new or modify existing source refresh schedules (see Creating or Modifying a Source Schedule).

    2. Review the value for the following parameters that often do not need to be modified:


      Change this value only when you want to globally change the rating associated with all items in this source relative to the rating of elements in other sources (see Understanding Search Results Ranking).

      Document Types

      If you created a custom document type set for this source, select it (see Creating a Document Type Set). Otherwise, select Default.

      Active Languages

      If you defined custom active language sets, ensure to select the most appropriate for this source (see Adding and Configuring a Language Set).


      If you defined custom field sets, ensure to select the most appropriate for this source (see What Are Field Sets?).

  6. In the Specific Connector Parameters & Options section of the Add Source page:

    1. Enter the appropriate value for the following required parameters:

      Items to crawl

      Enter a comma-separated (,) list of table or view object names to crawl as they are defined in the configuration file. You can use this parameter to easily crawl a subset of objects defined in the configuration file rather than commenting out objects in the configuration file.

      Configuration File Path

      Enter the full path to the configuration file that you created to instruct the connector what to index (see Indexing a Database Using a Configuration File).

      Example: C:\CES7\Config\odbc_config.xml

    2. Review the value for the following parameters that often do not need to be modified:

      Number of Refresh Threads

      Determines the number of simultaneous downloads handled by the connector.

      Command Timeout

      Maximum time allowed to perform a query on the database. The default value is 60 seconds. Once elapsed, the query times out.

      Note: You can use the paged query execution feature to decrease the execution time (see Enabling Paged Query Execution for the Database Connector).

      Use 32 bits driver

      On a 64-bit server, select this check box when you use a 32-bit driver to connect to the database.

      Note: Selecting the Use 32 bits driver option may resolve issues causing the Arithmetic operation resulted in an overflow error that appears to be linked to the 64-bit driver inability to convert a database field. However, updating to the ODBC driver 5.3+ also can resolve the problem.

      Driver Type

      In the drop-down box, select the software driver that provides access to your database:

      • Select Odbc when using Open Database Connectivity.

      • Select OleDb when using Object Linking and Embedding, Database.

      • Select SqlClient when using an SQL client.

      In the Option section:

      Index Subfolders

      This parameter does not apply to a database source.

      Index the document's metadata

      When selected, CES indexes all the document metadata, even metadata that are not associated with a field. The orphan metadata are added to the body of the document so that they can be searched using free text queries.

      When cleared (default), only the values of system and custom fields that have the Free Text Queries attribute selected will be searchable without using a field query (see Adding a Field to Search On and What Are Field Queries and Free Text Queries?).

      Example: A document has two metadata:

      • LastEditedBy containing the value Hector Smith

      • Department containing the value RH

      In CES, the custom field CorpDepartment is bound to the metadata Department and its Free Text Queries attribute is selected.

      When the Index the document's metadata option is cleared, searching for RH returns the document because a field is indexing this value. Searching for hector does not return the document because no field is indexing this value.

      When the Index the document's metadata option is selected, searching for hector also returns the document because CES indexed orphan metadata.

      Document's addresses are case-sensitive

      Leave this check box cleared. This parameter needs to be checked only in rare cases for systems in which distinct documents may have the same name but different casing.

      Generate a cached HTML version of indexed documents

      Keep this check box selected. When indexing, CES creates HTML versions of indexed documents. In the search interfaces, users can review the content more rapidly by clicking the Quick View link.

      Consider clearing this check box only when you do not want to use Quick View links or save resources when building the source.

      Open results with cached version

      Select this check box to view the cached HTML version of the database content when the end-user clicks the main search result link. In this case, you must also select Generate a cached HTML version of indexed documents.

      Clear this check box only when you defined a clickable URI in the configuration file to open the database content in a specific application. do not want users to be able to open the original document but only see the HTML version of the document as a Quick View.

  7. In the Security section of the Add Source page:

    1. In the Security Provider drop-down list, when you chose to use a security provider, select the security provider that you created for this source (see Configuring a Database Security Provider).

    2. In the Authentication drop-down list, when you chose to hide the database account credentials in the database connection string, select the user identity that you created for this source (see Adding a User Identity).

    3. Click Save and Start to save the source configuration and start indexing this source.

  8. Validate that the source building process is executed without errors:

    • In the navigation panel on the left, click Status, and then validate that the indexing proceeds without errors.


    • Open the CES Console to monitor the source building activities (see Using the CES Console).

What's Next?

Add the collection containing this new source to the scope of desired search interfaces (see Configuring the Scope of a .NET Search Interface).

People who viewed this topic also viewed