Skip to main content
Skip table of contents

SQL Stored Procedure

Input

✳️ Any (JSON)

Ouptut

✳️ Any (JSON) (Passthrough)

(plus) Response Data (object) (Optional)

Summary

The SQL Stored Procedure action allows you to invoke a stored procedure on a remote Microsoft SQL Server or Azure SQL instance.

Compatibility

(tick) Microsoft SQL Server 2016 and newer

(tick) Azure SQL

Features and Limitations

(tick) SQL Login Authentication

(error) Windows or Microsoft Entra ID Authentication

(tick) Execute standard and encrypted stored procedures

(tick) Pass parameters

(error) Pass or retrieve OUTPUT parameters

(error) Pass table-valued parameters

(error) Read log output (via RAISERROR or similar)

(tick) Read result sets (includes support for multiple result sets)

(tick) Read the return code emitted by the RETURN statement

Networking and Firewall Considerations

In order for the stored procedure to be called, the iWorkflow engine environment needs to be able to connect to the target SQL Server.

Please refer to the Environment Setup page for a list of IP addresses to whitelist.

Properties

Name

Type

Templatable

Notes

Host

Text

(error)

The hostname or IP address of the SQL Server. If using a DNS name, the name must be able to be resolved publicly.

Port

Number

(error)

The SQL server port number. Defaults to the standard SQL port of 1433. Do not modify unless you are certain that your SQL server runs on a non-standard port.

Database

Text

(error)

The name of the database (or “Initial Catalog”) to connect to.

Username

Text

(error)

The username to authenticate with.

Password

Text

(error)

The password to authenticate with.

Procedure Name

Text

(error)

The name of the stored procedure. Do not include EXEC or any parameters.

Parameters

List

(tick)

Specify the parameters to pass to the stored procedure. Ensure the parameter names match the procedure definition exactly, including casing. All required parameters must be specified or the action will fail.

Timeout (minutes)

Number

(error)

Specify the number of minutes to wait for the procedure to execute, between 1 and 60. Defaults to 5 minutes.

Use Transaction

(warning) Coming Soon

Checkbox

(error)

Specifies whether or not to wrap the procedure execution inside a transaction.

(warning) Feature not available - coming soon

🅾️ Output Property

Text

(error)

Specify the name of the property to store the output data of the stored procedure.

The output schema is as follows, if for example the output property is named mySp:

JSON
"mySp": {
    "returnValue": 0,
    "data": [
        [
            {
                "Column1": "Value 1",
                "Column2": "Value 2"
            },
            {
                "Column1": "Value 3",
                "Column2": "Value 4"
            }
        ],
        [
            {
                "T2Column1": "Table 2 / Value 1",
                "T2Column2": "Table 2 / Value 2"
            },
            {
                "T2Column1": "Table 2 / Value 3",
                "T2Column2": "Table 2 / Value 4"
            }
        ]
    ]
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.