Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Create a JDBC connection

The JDBC Connection provides the information custom JDBC actions or activities use to connect to various target databases.

Before you begin

You must have an appropriate JAR file, whether it is supplied with the instance or a custom JAR file.

Note: The ServiceNow instance supplies mysql-connector-java-5.1.21.jar, sql-server-jdbc-4.0.jar, and ojdbc6.jar files as part of the current release, which supports MySQL, SQLServer, and Oracle databases. Other databases, such as Sybase or DB2 Universal, must use a custom JAR file that must be uploaded to the instance before setting the JDBC connection.

Role required: connection_admin

About this task

JDBC credentials are retrieved separately by the activity designer template and support external credential storage, such as CyberArk.

Procedure

  1. Navigate to All > Credentials & Connections > Connections, click New and select JDBC Connection.

  2. Complete the form using the fields in the table.

    The database selection in the Format field determines which fields are available.

FieldDatabase FormatDescription
NameAllUnique name of this JDBC connection. For example, you might enter JDBC MySQLProd.
CredentialAllAdd credentials for JDBC provider.
Connection aliasAllSelect the alias record to associate with this connection. Using an alias enables you to update the connection record without having to reconfigure any actions or activities that use the alias.
Query timeoutAllMaximum elapsed time the JDBC query is allowed to run without a response.
Connection timeoutAll

Number of seconds the system waits before closing a JDBC connection or connection request.

For example, if the Connection Timeout value is 10 seconds, the system waits 10 seconds for a successful connection. If a successful connection does not occur during this time, the connection request times out. If a successful connection does occur, the connection remains open until there is a 10-second period of inactivity. Once the connection has been inactive for 10 seconds, the connection is closed.

Note: Avoid setting the Connection Timeout value to zero, as this may cause a stale connection.

ActiveAllCheck the box to make this an active connection.
DomainAllDomain for this table. By default, the JDBC Connection [jdbc_connection] table runs in the global domain.
FormatAllDatabase type for this connection. The default choices are: - MySQL - Oracle - SQLServer - None You can add Sybase or DB2 Universal to the choice list by uploading the appropriate JDBC driver JAR file to the instance. Orchestration automatically recognizes these drivers when they are loaded into the system and adds them to this list.
HostOracle, MySQL, SQLServerHost name or IP address of the database server.
Oracle sidOracleThe Oracle database site identifier. The default value is orcl.
Oracle portOraclePort that the Oracle database is using. The default value is 1521.
Database nameMySQL, SQLServerName of the database.
PortMy SQL, SQLServerPort that the selected database is using.
Instance nameSQLServerInstance name for the selected SQLServer
Connection URLAllURL that the MID Server uses to connect to the specified database. The URL is created automatically when you save the form, and is read-only for the default databases. Note: If the format selected is not one of the default databases, you must create the connection URL manually so that the MID Server knows how to create the connection.
JDBC driverNone, DB2 Universal, SybaseThe JDBC driver to use for this connection when it is not a default database. Note: If you add a Sybase or DB2 Universal database, you must enter the driver name in this field and upload the driver JAR file to the instance.
Use MID serverAllCheck to use a MID server for this action or activity. If selected, define fields in the Advanced MID Server Configuration section.
MID SelectionAll

Option to select a specific MID Server or MID Cluster. Choose any one of the following options. - Auto-Select MID Server: Your ServiceNow instance selects the MID Server without manual input. - Specific MID Server: Your ServiceNow instance uses MID Server that you specify. - Specific MID Cluster: Your ServiceNow instance uses the MID Cluster that you specify.

A MID Cluster is a group of MID Servers that enables your ServiceNow instance to handle multiple integrations, and improve integration speed. For more information, see Configure a MID Server cluster.

This field is available when Use MID Server is checked. Note: Ensure that the Integration Hub connection record is referred, not an Orchestration connection record.

CapabilitiesAll

The capabilities the MID Server must support to be eligible for selection. The system runs the action or activity from a MID Server that supports the selected capabilities. Only displays if Use MID server is selected.

Required capabilities determine which MID Server is selected at runtime. To learn more about how a MID Server is selected during runtime, see MID Server selection. This field is visible only when Auto-Select MID Server is selected from the MID Selection list.

MID ApplicationAll

The application the MID Server must support to be eligible for selection. The system runs the action from a MID Server that supports the selected application. Only displays if Use MID server is selected.

To learn more about how a MID Server is selected during runtime, see MID Server selection.

MID ServerAllSpecific MID Server on which the step runs. This field is visible only when Specific MID Server is selected from the MID Selection list.
MID ClusterAllThe specific MID Cluster you want to use. This field is available when Use MID Server is checked, and Specific MID Cluster is selected from the MID Selection list.
  1. Click Submit.

Parent Topic:Get started with connections

Related topics

JDBC credentials