Create a JDBC connection

The JDBC Connection [jdbc_connection] table provides the information custom JDBC Orchestration activities need to connect to various target databases.

Before you begin

You need to have an appropriate JAR file, whether it is supplied with the instance or a custom JAR file.
Note: We supply ojdbc6.jar as part of the current release, which supports MySQL, SQLServer, and Oracle databases. Other databases, such as Sybase or DB2 Universal, will need a custom JAR file that must be uploaded to the instance before setting the JDBC connection.

Role required: activity_admin, activity_creator

About this task

JDBC connections do not supply credentials. The necessary credentials are retrieved separately by the activity designer template and support external credential storage, such as CyberArk.
Note: The Helsinki upgrade process copies all database connection information from existing JDBC data source records and uses the data to create new records in the JDBC Connection table and the Credentials table. Existing JDBC custom activities are then updated with the appropriate fields and configured to use the new connection and credential records. All new custom JDBC activities must use connection information from the jdbc_connection table and JDBC credentials from the discovery_credentials table. The original JDBC data source records are available for use elsewhere in the ServiceNow platform.

Procedure

  1. Navigate to Orchestration > Credentials & Connections > JDBC Connections and click New.
  2. Complete the form using the fields in the table.
    The database selection in the Format field determines which fields are subsequently available.
    Table 1. JDBC connection fields
    Field Database Format Description
    Name All Unique name of this JDBC connection. For example, you might enter JDBC MySQLProd.
    Query timeout All Maximum elapsed time the JDBC query is allowed to run without a response.
    Connection timeout All Maximum elapsed time for the JDBC activity to wait while attempting to connect to the target database.
    Application All Scope for this table. By default, the JDBC Connection [jdbc_connection] table runs in the Global scope.
    Domain All Domain for this table. By default, the JDBC Connection [jdbc_connection] table runs in the global domain.
    Format All Database 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.
    Server Oracle, MySQL, SQLServer Host name or IP address of the database server.
    Oracle sid Oracle The Oracle database site identifier. The default value is orcl.
    Oracle port Oracle Port that the Oracle database is using. The default value is 1521.
    Database name MySQL, SQLServer Name of the database.
    Database port My SQL, SQLServer Port that the selected database is using.
    Instance name SQLServer Instance name for the selected SQLServer
    Connection URL All URL 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 driver None, DB2 Universal, Sybase The 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.
    Figure 1. JDBC connection to Oracle example
    JDBC connection example
  3. Click Submit.