Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.
Versions
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store
Close

Setting up a JMS, JDBC, or HTTP(s) connection to a host

Setting up a JMS, JDBC, or HTTP(s) connection to a host

Use the connections table to setup a JMS, JDBC, or HTTP(s).

Connection Table

The Connection table (sys_connection) is the base table for all connection tables. You can setup connections for the following protocols:
  • JDBC
  • JMS
  • HTTP(s)
The connection table references the connection alias table, which couples the connection alias to connection information. Every connection records the following information:
Table 1. Base connection properties
Field Description
Name Name of the connection. This field must be unique on the table.
Credential Specify the credential to use with this connection. This is optional.
Connection alias The connection alias resolves your connection and credentials at run time. Only one connection is active per Connection alias at any one time.
Active Check to make the current connection active.
Domain Domain to which the connection belongs.

Credential is unique across active connections, if not empty

Upgrading connection information

  • The JDBC connection [jdbc_connection] and JMS connection [orch_jms_ds] tables are existing Orchestration connection tables that now extend from the Connection [sys_connection] table. The tables originally extended from sys_metadata. The sys_metadata related data will be removed.
  • The tables move from the Orchestration run time plugin [com.snc.runbook_automation.runtime] to the Credentials & Connections plugin.
  • The upgrade process obtains JDBC and JMS connection information and creates corresponding connection aliases and assigns the alias to its corresponding connection.
  • JDBC field name changes:
    • JDBC server is renamed to host
    • Database port is renamed to port
    • Data of the JDBC server and database migrates to host and port during the upgrade

Create a JMS connection

Configure your system to use Java Messaging Service (JMS) with a custom JMS activity or action.

Before you begin

Role required: connection_admin

About this task

The MID Server must have the correct JMS connection factories for your organization. Configure those values in the mid.property.jms.command.allowed_factory_names property, found in MID Server > Properties. The default values for this property can be changed to any value or comma-separated list of values that the third-party JMS provider advertises.

Procedure

  1. Navigate to Credentials & Connections > Connections.
  2. Click New, select JMS Connection, add the following, and click Submit:
    OptionDescription
    Name Unique name of this connection factory.
    Credential Add credentials for JMS provider.
    Connection Alias Add a connection alias.
    Initial Context Factory Name of the JNDI class that is used to create the InitialContext.
    Note: For example, to connect to ActiveMQ V5.10 (JMS Provider), the value is org.apache.activemq.jndi.ActiveMQInitialContextFactory.
    Provider URL Location of the running JMS provider installation.
    Note: For example, to connect to ActiveMQ V5.1: tcp://ipAddressOrHostName:61616.
    Active Check the box to make this an active connection.
    Domain Determine the scope the action or activity runs in.
    Use MID server Check to use a MID server for this action or activity.
  3. Navigate to Connections & Credentials > Credentials.
  4. Click New, select JMS Credentials, and provide the user name and password the MID should use to communicate with the JMS provider.
    For more information, see JMS credentials.
  5. Click Submit.
    You are ready to create a custom JMS action or activity.

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 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.
    Table 2. JDBC connection fields
    Field Database Format Description
    Name All Unique name of this JDBC connection. For example, you might enter JDBC MySQLProd.
    Credential All Add credentials for JDBC provider.
    Connection alias All Add a connection alias.
    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.
    Active All Check the box to make this an active connection.
    Domain All Domain for this table. By default, the JDBC Connection [jdbc_connection] table runs in the global domain.
    Use MID server All Check to use a MID server for this action or activity.
    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.
    Host 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.
    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.
  3. Click Submit.

Create an HTTP(s) connection

The HTTP(s) connection provides the information custom HTTP(s) actions or activities use to connect.

Before you begin

Role required: connection_admin

Procedure

  1. Navigate to Credentials & Connections > Connections, click New, and select HTTP(s) Connection.
  2. Add the following connection information and click Submit:
    OptionDescription
    Name Unique name of this HTTP(s) connection.
    Credential Add credentials for connections.
    Connection Alias Add a connection alias.
    URL builder Either manually enter the connection URL or use system to build the URL based on the inputs. Default is unchecked. If checked, the connection URL is calculated from the following fields:
    • Mutual authentication — Check box if mutual authentication is used.
    • Protocol — If mutual authentication is not used, enter protocol. The default is HTTPs.
    • Protocol profile — If mutual authentication is used, enter protocol profile from sys_protocol_profile.
    • Host
    • Port
    • Base path — Path of the connection string.
    Note: If mutual authentication is checked, connection URL is built: Protocol + :// + host:port +URL. If mutual authentication is unchecked, connection URL is built: Protocol profile + :// + host:port +URL
    Connection URL If URL builder is unchecked, enter the connection URL into this field.
    Active Check the box to make this connection active.
    Domain Determine the scope the action or activity runs in.
    Use MID server Check to use a MID Server for this action or activity.
  3. Click Submit.
    You are ready to create a custom HTTP(s) action or activity.