Create a JDBC activity
Create a custom JDBC activity to automate SQL commands and stored procedure calls to relational databases from workflow.
Avant de commencer
Role required: activity_admin, activity_creator
Pourquoi et quand exécuter cette tâche
Procédure
Que faire ensuite
- Test JDBC activity inputs
- Use auto-mapping to generate outputs and parsing rules (recommended for JDBC)
- If you do not use auto-mapping, you can manually create output variables and create parsing rules
Create a JDBC connection for an Orchestration activity
The JDBC Connection [jdbc_connection] table provides the information custom JDBC Orchestration activities use to connect to various target databases.
Avant de commencer
Role required: activity_admin, activity_creator
Pourquoi et quand exécuter cette tâche
Procédure
Auto-map JDBC activity output variables
The ServiceNow activity designer allows you to map parameter values in a JDBC test payload to variables in the Outputs tab automatically.
Avant de commencer
Procédure
JDBC stored procedure parameters
You can use Orchestration to run a stored procedure on MySQL, Oracle DB, and MS-SQL databases.
- Only one result-set is returned.
- The order of input and output data types in the stored procedure parameters must match the activity definition.
- Binary, Blob, Varbinary, and LongBinary should be base64 encoded.
- Date, Time, and Timestamp have a specific format:
- Date format: yyyy-mm-dd
- yyyy-mm-dd is the supported format.
- Time format: hh:mm:ss[.sss]
- hh:mm:ss[.sss] is the supported format. Precision is in milliseconds only,
microseconds or nanoseconds cannot be handled. Remarque :
10:30:59and10:30:59.999000are correct, but10:30:59.is incorrect. - Timestamp format: yyyy-mm-dd hh:mm:ss[.ffffff]
- yyyy-mm-dd hh:mm:ss[.ffffff] is the supported format. Precision is to microseconds.
- ResultSet is the first result set coming back from database server.
- MS-SQL does not support INOUT parameters. If you use INOUT parameters, the Activity Template transparently maps them to OUT parameters.
| Field | Description |
|---|---|
| Mode | Type of stored procedure parameter. Supported parameters:
|
| Sql Type | A SQL data type. Supported data types:
|
| Name/Value | Name-value pairs to pass to the host. You can create these parameters manually, or drag and drop input variables into the parameter fields and assign a value. |
Test JDBC activity template inputs
You can test the input parameters of a custom JDBC activity during its development without having to run the activity in a workflow context.