---
sourceDocument: Australia API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/api-reference

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# ODBC behavior

# ODBC behavior {#ariaid-title1}

Release version: Australia  
Updated March 12, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 3 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of ODBC Behavior

The ODBC driver allows querying of ServiceNow instance databases from various client applications, enhancing data retrieval capabilities.
It supports several aggregate functions, including COUNT, SUM, MIN, MAX, and AVG, with improved performance achievable by activating the Aggregate web service plugin.
Show full answer Show less  

## Key Features

* **Aggregate Functions:** The driver processes aggregate functions locally and benefits from the Aggregate web service plugin.
* **Date and Time Management:** Be aware that date and time values are returned in the local time zone of the ODBC client, not necessarily aligned with the ServiceNow instance time zone. Ensure accurate timezone queries for reliable results.
* **Display Values:** Utilize display values (prefixed with dv) for Choice and Reference columns in queries to obtain user-friendly names without additional requests. These can also be integrated into filter conditions and aggregate queries for optimized performance.
* **Accessible Tables and Columns:** You can query accessible tables and columns based on read ACLs using internal ODBC tables (oatables and oacolumns) to understand what you can query.
* **Read Replica Routing:** Implement query routing to Read Replica databases to alleviate load on the primary database for resource-intensive SELECT queries.
* **Field Length Management:** Adjust the maximum field length in SQL queries to prevent data truncation, ensuring complete data retrieval.

## Key Outcomes

By effectively utilizing the ODBC driver, you can enhance data querying performance and flexibility while ensuring accurate data representation. Understanding time zones, display values, and access permissions will lead to more efficient and effective data management within your ServiceNow environment.  
After testing the ODBC driver, you can use it to query your instance database from a variety of client applications.

## ODBC aggregate functions {#r_ODBCBehavior__section_k4m_fbc_vbb}

The ODBC driver attempts to download data and apply aggregate functions locally. The ODBC driver supports the following aggregate functions.

* COUNT
* SUM
* MIN
* MAX
* AVG

{#r_ODBCBehavior__ul_p2l_3bc_vbb}

Activate the Aggregate web service plugin to improve the performance of aggregate queries through the ODBC driver.

## ODBC date and time values {#r_ODBCBehavior__section_jjq_4bc_vbb}

The instance and the machine on which the ODBC driver is installed may use two different time zones. Date and time values returned by the ODBC driver are in the local time zone of the application using the driver, not the
ServiceNow instance time zone.

Ensure that you query in accurate time zones for both the instance and the machine that hosts the ODBC driver. GlideRecord performs filtering based on the instance time zone, and the ODBC client is filtered based on the Windows
time zone.

For example, an instance is in Central Standard Time (CST), and the ODBC driver is installed on a machine that is in Pacific Standard Time (PST). An incident is created on the instance at 2014-05-20 10:00:00, and the time that the incident was created is displayed in the UI as 10:00:00 for users in both time zones. However, in order to successfully query this incident by
creation date and time, a user on the machine in PST must query 2014-05-20 08:00:00 instead of 2014-05-20 10:00:00.

Duration and timer type fields are returned using the UTC time zone, starting with ODBC version 1.0.10. See [KB0583982](https://support.servicenow.com/kb_view.do?sysparm_article=KB0583982) for details about this change.

## ODBC display values {#r_ODBCBehavior__section_mks_gcc_vbb}

Some examples of how to use and work with ODBC display values are shown below.

* Display values in Choice and Reference columns:

  When querying a column of type Choice, Reference, Duration,
  or Timer, an additional column with the prefix `dv_` is available that contains the display value. For example, you can select dv_caller_id to return the
  sys_user.name display value of the reference field from an incident record without making another request to the sys_user table.  
  Figure 1. Return the display value
* Display values in filter conditions:Display values can also be used in a filter condition. The ODBC driver optimizes the query condition and processes the filter on the server, for example, querying on the display value
  of sys_user for the caller_id field of an incident by using the dv_caller_id field name.

  Figure 2. Display values in filter conditions
* Display values in aggregate queries:Aggregate queries can also take advantage of display values if you specify them in the group by or where clause, for example, grouping on the caller_id field of
  an incident, as well as specifying a filter for it. The query is optimized by passing through to the server.

  Figure 3. Display values in aggregate queries
{#r_ODBCBehavior__ul_lzl_mcc_vbb}

## Querying table and column names {#r_ODBCBehavior__section_fw5_xfc_vbb}

You can get a list of accessible tables and columns based on the read ACLs for the querying user.

* The following query returns the names of all tables for which the querying user has read access:`select * from oa_tables;`

* After you know the name of the table you want to query, you can query the names of all columns for which the user has read access. The querying user must have read access for both the table and the columns.`select
  * from oa_columns where table_name='table_name';`

{#r_ODBCBehavior__ul_xqb_dgc_vbb}  
Note:  
The oa_tables and oa_columns tables are internal ODBC tables. These tables are accessible only via the ODBC driver.

## Routing ODBC calls to Read Replica {#r_ODBCBehavior__section_uhx_2hy_sxb}

Query routing is done to take the load off the primary database for SELECT queries that take numerous DB CPU cycles on the primary DB. For more information, see [Introduction to ServiceNow Read Replica Databases](https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0824441).

For routing ODBC calls to Read Replica, go to AllSecondary DatabaseSecondary DB Categories and set odbc to <kbd class="ph userinput">true</kbd>.
* **[Increase the field length in SQL queries](https://servicenow-prod.fluidtopics.net/0Hj7ABRUsgnZvXAYBcCMqQ)**   
  The ODBC driver limits the field length in SQL queries to the maximum length defined by the ServiceNow dictionary entry. You can increase the maximum field length to avoid truncating data.

*[\>]: and then


