JDBC type data source

A JDBC data source retrieves its data via a JDBC driver, usually type 4 network.

The JDBC connection is available either directly from the ServiceNow instance (a VPN setup required), or via a dedicated MID Server installed inside your firewall that can access the database port.

Note: Any JDBC call from the MID Server is never encrypted. Limit the rights available to the MID Server user whenever making JDBC calls from a MID server.
Caution: The system loads JDBC drivers from the lib directory before it looks for the driver in the extlib directory. If you synched an updated version of a JDBC library into extlib, and the lib directory contains an outdated JDBC library, the instance loads the old library from the lib directory.

Supported database connections

JDBC connections are supported for the following default databases:

Table 1. Supported JDBC connections
Database Port
MySQL 3306
MS SQL Server 1433
Oracle 1521
Sybase 5000
DB2 Universal >50000
Note: Oracle DATE fields are loaded as ServiceNow datetime fields.

JDBC data source record

Figure 1. Sample JDBC data source record
Sample JDBC data source record

JDBC data source SQL statement requirements

JDBC queries that run SQL statements must specify a column name.

For example, this query specifies the column name ServerID.
SELECT DISTINCT 'server_name:' + CONVERT ( VARCHAR , lg .ResourceID ) AS 'ServerID' 
ON s .ResourceID  = lg .ResourceID
WhereType0  = 'Local' AND Category0  = 'SystemAccount'

SQL server integrated authentication for Windows

A JDBC data source can use the ID of for the Windows MID Server service user to authenticate with SQL Server.

The Use integrated authentication check box on the Data Source form determines if the JDBC data source uses the MID Server service user credentials. For this field to appear on the Data Source form, the integration must meet these criteria:

  • The MID Server must be running on a Windows computer with SQL Server.
  • The MID Server service must use the same credentials that SQL Server requires.
  • The data source Type is JDBC.
  • The data source Use MID Server field must not be empty.
  • The data source Format is SQLServer.
Important: If integrated authentication is chosen, and you are integrating with Microsoft System Center Configuration Manager, the account running the MID Server service must have read rights on the SCCM database.
Figure 2. Data Source form
Data Source form

JDBC data source connection properties

You can control how ServiceNow communicates with a JDBC data source using properties.

Table 2. JDBC Connection Properties
Name Description
glide.jdbcprobeloader.retry The number of times a JDBC probe loader attempts to process data returning from a JDBC data source. Sleeps on the value defined in "glide.jdbcprobeloader.retry_millis" between retries.
glide.jdbcprobeloader.retry_millis How many milliseconds a JDBC probe loader waits in between retry attempts to process data from a JDBC data source.