Execute Stored Procedure

**NOTE: This plug-in is deprecated and no longer recommended for use for sites running on Appian 22.1 or later. The functionality of this component is available in Appian without installing the plug-in. You can use a!executeStoredProcedureForQuery(), a!executeStoredProcedureOnSave(), or the Execute Stored Procedure Smart Service in Appian 22.1 or later.**

Overview

This plug-in provides a Smart Service and Function for executing stored procedures. The Smart Service can be used to execute stored procedures that modify data. Result sets are returned as CDTs. As custom functions cannot have side-effects, it must not be used to execute stored procedures that modify data. It is only safe to use the Smart Service with stored procedures that modify data. Following SQL Statements should not be used by the stored procedures executed with the function:

  • INSERT
  • UPDATE
  • DELETE
  • TRUNCATE
  • CREATE TEMPORARY TABLE
  • SELECT... INTO (when the input target is not an input or output variable)

Key Features & Functionality

  • Works with both complex and simple data types
  • Tested with: MySQL, SQL Server, and Oracle
  • See the instructions document provided with the download for an example and how to configure
  • (New) Total row count column added to trace log
Anonymous
Parents
  • Hi James,

    I have a query on how connection is maintained while using the function as well as smart service, i.e. when does the connection to DB opens and closes?

    Is it per execution of smart service / function call or some other logic?

    We are calling a stored procedure hosted on another legacy system data base using this plugin and they have reported that there are many open connections on their dashboard for this call from Appian. Any comments or suggestions welcomed:)

    Thanks.

    Hitesh

Comment
  • Hi James,

    I have a query on how connection is maintained while using the function as well as smart service, i.e. when does the connection to DB opens and closes?

    Is it per execution of smart service / function call or some other logic?

    We are calling a stored procedure hosted on another legacy system data base using this plugin and they have reported that there are many open connections on their dashboard for this call from Appian. Any comments or suggestions welcomed:)

    Thanks.

    Hitesh

Children
  • Each execution of the smart service or function requests a connection from the pool and returns it to the pool when complete. A high volume of concurrent connections (using this plug-in or other database related functionality in Appian) may result in additional connections being made to the database.

    The connection pool behaviour is not specific to this plug-in. If you require further input please reach out to Appian Technical Support.