Add or edit a Database source
Add or edit a Database source
A Database source indexes the content of a database. You can then make this content searchable through a Coveo-powered search interface.
For example, your company developer may have created a custom database to manage the parts used in your facilities, their location in your warehouse, and purchase orders. You could decide to index data regarding purchase orders only so that your buyers can find this content via your Coveo-powered employee portal.
Source key characteristics
Content security options
Supported database types
The cloud version () of the source supports the following database types:
Microsoft SQL Server
The Crawling Module version () supports the following database types:
Microsoft SQL Server
Any database using an ODBC driver. This driver must be installed on your Crawling Module server.
Add or edit a Database source
When adding a source, in the Add a source of content panel, click the Cloud () or Crawling Module () tab, depending on your content retrieval context. With the latter, you must install the Coveo On-Premises Crawling Module to retrieve your content.
It’s best to create or edit your source in your sandbox organization first. Once you’ve confirmed that it indexes the desired content, you can copy your source configuration to your production organization, either with a snapshot or manually.
See About non-production organizations for more information and best practices regarding sandbox organizations.
In the Add a Database Source subpage, the Configuration tab is selected by default. It contains your source’s general and authentication information, as well as other parameters.
If you have not already installed the Coveo On-Premises Crawling Module on a server that has access to the database of which you want to retrieve the content, click Download Crawling Module to do so.
"Source configuration" subtab
Enter a name for your source.
A source name can’t be modified once it’s saved, therefore be sure to use a short and descriptive name, using letters, numbers, hyphens (
If your source is a Crawling Module source, and if you have more than one Crawling Module linked to this organization, select the one with which you want to pair your source. If you change the Crawling Module instance paired with your source, a successful rebuild is required for your change to apply.
"Connection parameters" subtab
Enter your database connection parameters or a connection string. Coveo will use this information to access your database.
Since the connection string syntax differs from one database type to another, you might want to see The connection strings reference for details.
When providing credentials to access your database, enter the credentials of a dedicated user account that has access to the content you want to index. See Source credentials leading practices.
About ODBC drivers
If you’re using a Crawling Module source to index content from a database using an ODBC driver, ensure that you have the appropriate ODBC driver installed on your Crawling Module server.
A driver acts as a intermediary between Coveo’s connector and your database server. For example, to connect Coveo to an Oracle source, you must install an Oracle driver. ODBC drivers are typically provided by the database vendor. You can also use ODBC Data Source Administrator to review the drivers installed on your server.
"Content to index" subtab
Enter the name of the tables or view objects you want to index.
For each item you entered above, add the corresponding XML read query to define what to index and how. Specify the data to copy from database fields to Coveo fields. See the reference page to help you in the process.
Your XML queries should be read queries only, or else you could make unwanted changes to your database.
"Advanced settings" subtab
The advanced settings are optional. They let you fine-tune the behavior of your source in some specific situations.
Try increasing the timeout value when:
Your database is slow to respond to queries.
Your queries take long to execute.
You encounter database timeout errors.
We recommend first increasing the value to 120 seconds. If the issue persists, you can either increase the timeout value again or use paged SQL queries instead.
Maximum response page size
This is the maximum number of items a database can return at once. If you know your query will return a large number of items and this may affect your database’s stability, try decreasing this value.
Content and images
If you want Coveo to extract text from image files or PDF files containing images, enable the appropriate option.
"Content security" tab
If you select Everyone or Specific users or groups, skip to "Access" tab.
If you select the Same users and groups as in your current permission system option to index a permission system, ensure that you’ve defined
AllowedUsers nodes in your XML queries.
Moreover, check the Permission system is Active Directory box if applicable. If so, you’ll need to enter your Active Directory details.
Active Directory details
Username and password
Enter credentials to grant Coveo access to your Active Directory. See Source credentials leading practices.
By default, Coveo retrieves the email address associated to each security identity from the
Use TLS protocol to connect to Active Directory
Select this option to use a TLS protocol to retrieve your security identities. If you do, we strongly recommend selecting StartTLS if you can. Since LDAPS is a much older protocol, you should only select this value if StartTLS is incompatible with your environment.
The database content is secured with well-known SIDs
Select this option if you want the users that are included in your Active Directory well-known security identifiers to be granted access to the indexed content.
Expect an increase in the duration of the security identity provider refresh operation.
Supported well-known SIDs are:
Domain Users, and
If your entire content is secured with
Bidirectional relationship between the root domain of your Crawling Module server and your other domains
Select this option to have Coveo connect to your root domain to get the security identities of your other domains through the root domain.
If your environment contains more than one domain, you can establish a bidirectional or outbound cross-link relationship between the root domain of your Crawling Module server and your additional domains. When you do so, these domains trust your root domain, and Coveo can get their security identities through this root domain.
However, when enabling this option, you should expect an increase in the duration of the security identity provider refresh operation. Moreover, if a linked domain is unreachable, Coveo stops the security identity provider refresh operation.
In the Access tab, set whether each group (and API key, if applicable) in your Coveo organization can view or edit the current source.
For example, when creating a new source, you could decide that members of Group A can edit its configuration while Group B can only view it.
See Custom access level for more information.
Click Add source. This will save your source without launching a build to index your content. This is useful if you plan on making changes shortly or if, while writing your XML queries, you decided to populate fields that don’t already appear on the Fields (platform-ca | platform-eu | platform-au) page. In such case, you must add these new fields before building your source.
Ensure that your source correctly maps all the fields to populate. In sources created before January 10, 2024, if a field doesn’t have a mapping, you must create one. In sources created after that date, Coveo will automatically populate fields whose name exactly matches a metadata key.Example
In your content, profile picture URIs are stored under
profilepic. If a
pictureurifields exists in your organization, you’ll create the following mapping to populate the
pictureurifield with picture URIs:
However, if a
profilepicfield already exists in your organization, Coveo will automatically populate it with the
profilepicvalue extracted from your content.
Crawling Module time zone adjustment
If you’re using the Crawling Module to index your content and if this Crawling Module is running in a different time zone than your database, you must edit the source JSON configuration and add the
TzdbTimeZoneId hidden parameter as follows. The expected time zone format is IANA TZDB.
The time zone of your database is America/New_York, therefore you add the following to the source JSON configuration:
When indexing content with the Crawling Module, ensure not to change space character encoding in an item’s URI, as Coveo uses URIs to distinguish items.
For example, an item whose URI would change from
example.com/my first item to
example.com/my%20first%20item wouldn’t be recognized as the same by Coveo.
As a result, it would be indexed twice, and the older version wouldn’t be deleted.
Item URIs are displayed in the Content Browser (platform-ca | platform-eu | platform-au).
We recommend you check where these URIs come from before making changes that affect space character encoding.
Depending on your source type, the URI may be an item’s URL, or it may be built out of pieces of metadata by your source mapping rules.
For example, your item URIs may consist of the main site URL plus the item filename, due to a mapping rule such as
In such a case, changing space encoding in the item filename could impact the URI.
You can assign privileges to allow access to specific tools in the Coveo Administration Console. The following table indicates the privileges required to view or edit elements of the Sources (platform-ca | platform-eu | platform-au) page and associated panels. See Manage privileges and Privilege reference for more information.
The Edit all privilege isn’t required to create sources. When granting privileges for the Sources domain, you can grant a group or API key the View all or Custom access level, instead of Edit all, and then select the Can Create checkbox to allow users to create sources. See Can Create ability dependence for more information.
|Required access level
View sources, view source update schedules, and subscribe to source notifications
Edit sources, edit source update schedules, and view the View Metadata page
See Further configuration for options you can implement to make your source more efficient.
If you encounter database timeout errors, try adjusting the Command timeout.
If you have the Enterprise edition, group your implementation resources together by adding your source to a project. If you’re using the Crawling Module to retrieve your content, you can also add it to your project.
Consider subscribing to deactivation notifications to receive an alert when a Crawling Module component becomes obsolete and stops the content crawling process.