Setting ODBC properties
- UpdatedAug 1, 2024
- 4 minutes to read
- Xanadu
- API implementation
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 |