Setting ODBC properties
Summarize
Summary of Setting ODBC properties
This document details the configuration properties available for tuning the ServiceNow ODBC driver. Properly setting these properties helps optimize connectivity, query performance, and compatibility when integrating ServiceNow data with external reporting tools like Microsoft Excel.
Show less
ODBC Administrator Properties
These properties are configured either through the ODBC Data Source Administrator for a DSN or directly in the login dialog's Custom Properties field. Key properties include:
- BatchSize: Controls the number of records fetched per request to balance memory use and performance. Default is 2000.
- url: Specifies the ServiceNow instance URL to connect to.
- EnablePassThrough: Enables optimized aggregate function processing via the Aggregate Web Service (default true).
- debug & gzip: Enable debug logging of HTTP traffic (debug true) and disable compression (gzip false) to read network data during troubleshooting.
- timeout & retries: Socket inactivity timeout in seconds (default 175) and number of retry attempts on timeout errors.
- mode: Sets query parsing mode for complex where clauses using AND or OR operators; OR maximizes compatibility, AND improves efficiency.
- EnableDBSchema & ExtendedSchemaCache: Control schema requests to improve initial query performance and caching behavior, especially for large instances or stable schemas.
- LegacyDurationTimeZone: Controls whether timer and duration fields return values in UTC (default) or UI display format for legacy compatibility.
Multiple properties can be combined in a semicolon-delimited string for connection setup.
ODBC Management Console Properties
Accessible via the Windows Start menu under ServiceNow ODBC > Management Console, these settings manage JVM options, default instance URLs, disk cache limits, and socket timeout values:
- ServiceJVMOptions: Customize JVM command-line arguments, e.g., heap size (-Xmx).
- DataSourceIPProperties: Set a global default instance URL for all ODBC connections.
- ServiceSQLDiskCacheMaxSize: Adjust maximum disk cache size to prevent cache size limit errors.
- Timeout: Configure socket inactivity timeout to avoid socket timeout errors during GetKeys operations.
- ServiceJVMLocation: Specify the Java Runtime Environment location required by the driver at installation.
Service JVM Options
Additional JVM options can be specified, including:
- -DLOGFILENAME: Defines the path to the ODBC log file for troubleshooting.
- -DLOGLEVEL: Sets the log verbosity level (e.g., TRACE, INFO, ERROR) for ODBC driver logging.
Instance Properties
Configured directly within the ServiceNow instance, these properties control data retrieval limits:
- glide.db.max.aggregates: Sets the maximum rows returned by aggregate functions (default 100,000).
- glide.db.maxviewrecords: Sets the maximum rows returned by database views (default 10,001).
Practical Benefits for ServiceNow Customers
By adjusting these ODBC properties, customers can tailor their ServiceNow data connectivity to meet specific performance, compatibility, and troubleshooting needs. This ensures efficient data retrieval, better handling of complex queries, and smoother integration with analytical tools. Understanding and utilizing these settings helps prevent common issues such as timeouts, excessive memory use, or schema loading delays, resulting in a more reliable and responsive reporting experience.
The following properties customize connectivity and optimize the query behavior of the ODBC driver.
ODBC administrator properties
| Property Name | Description | Default |
|---|---|---|
| BatchSize | During fetching of results from the instance, this batch size configures the number of records to fetch for every request. Typically, the default is an optimal number for normal sized rows. If an error occurs during fetching of records that indicates this value should be lowered, you can modify it to optimize memory usage versus performance. | 2000 |
| url | This is the ServiceNow instance URL or endpoint. It should indicate the URL to the ServiceNow instance you want to connect to. | https://demo.service-now.com |
| EnablePassThrough | During processing of aggregate functions, enabling pass through mode allows directly calling Aggregate Web Service for optimized and speedy response. Whenever possible, this mode should be left enabled. | true |
| debug | By default, debugging messages are not produced. Set debug to true when you operate the ODBC driver from the ISQL console window to write all HTTP-related network communication traffic to the console window. When using this option, set gzip to false so that data is not compressed. Otherwise, the data is unreadable. | false |
| gzip | By default, data sent over the network is compressed. Set gzip to false when using the debug parameter to write network communication to the ISQL console so that data is not compressed. | true |
| timeout | Specifies the socket inactivity timeout value in seconds. | 175 |
| retries | Number of times to retry the failing request in the event of a socket timeout error. | 0 |
| mode | The query mode used to parse complex where clauses. You can configure the
ODBC driver query mode to use either AND or OR operators. While the OR operator provides the greatest compatibility with complex queries, the AND operator is usually more efficient and results in fewer database operations. |
or |
| EnableDBSchema | The ODBC driver issues a database schema request to retrieve table names from the instance. This functionality is enabled by default so reporting applications such as Microsoft Excel can display a list of tables to query from. Disabling this property may improve the performance of the first query sent from a reporting application, especially if the instance has a large number of tables. | true |
| ExtendedSchemaCache | The ODBC driver caches the database schema for each connection. When a new connection is created, the driver clears the database cache and queries the database schema from the instance again. This behavior is beneficial when connecting to different data source, or when modifying the table schema. When querying a single data source with a consistent schema, enable this property to avoid sending unnecessary schema requests, including when EnableDBSchema is true. | false |
| LegacyDurationTimeZone | The ODBC driver returns timer and duration field values in the UTC timezone by default, starting with the 1.0.10 version. When this property is true, the ODBC driver returns timer and duration field values using the display value, as shown in the UI. This property can be used to preserve compatibility with legacy integrations that depend on the display value. See KB0583982 for details about this behavior. | false |
If you need to use more than one of these properties in your connection, concatenate the settings with a semicolon (;) delimiter. For example, the following string sets the URL to a specific instance and changes the batch size to 200 records.
url=https://demo1234.service-now.com;BatchSize=200
ODBC management console properties
| Property name | Description | Default |
|---|---|---|
| ServiceJVMOptions (Services\Service Settings\IP Parameters) |
JVM command line properties and option. For example, to change the maximum Java heap size, modify the -Xmx150m parameter. | -Xms64m -Xmx150m |
| DataSourceIPProperties (OpenAccess SDK 6.0 Manager\<installation location>\Services\ServiceNow_ODBC\Data Source Settings\ServiceNow\IP Parameters) |
Global default of the instance URL for all ODBC connections. For more flexibility, you may also create new DSNs with default URL configurations. | https://demo.service-now.com |
| ServiceSQLDiskCacheMaxSize (Services\Service Settings\SQL Engine Parameters) |
Specifies the maximum size of the disk cache files. Increase this value when
you see Disk Cache file size limit has reached errors. |
200 |
| Timeout (Data Source Settings\ServiceNow\IP Parameters) |
Specifies the socket inactivity timeout value in seconds. Increase this to a
value greater than glide.soap.request_processing_timeout.odbc when you see
GetKeys failed (Socket timeout) errors. |
175 |
| ServiceJVMLocation | Contains the JRE location used by the ODBC driver. | There is no default value for this property. You are prompted to enter the JRE location at the time of installation. |
Service JVM options
| Option | Description | Default |
|---|---|---|
| -DLOG_FILE_NAME | The location of the ODBC log file. This property is available starting with the ODBC driver 1.0.7.1 release. | ${user.home}\AppData\Local\ServiceNow\odbc\logging\odbc.log |
| -DLOG_LEVEL | The logging level used when writing to the ODBC log file. You can specify the logging level using Logback levels, such as TRACE, INFO, or ERROR. This property is available starting with the ODBC driver 1.0.8 release. | INFO |
Instance properties
| Property name | Description | Default |
|---|---|---|
| glide.db.max.aggregates | The maximum number of rows returned by aggregate functions. | 100000 |
| glide.db.max_view_records | The maximum number of rows returned by a database view. | 10001 |