Read and Review Automation Anywhere Documentation

Automation 360

Close Contents

Contents

Open Contents

Using the Run stored procedure action

  • Updated: 2022/03/30
    • Automation 360 v.x
    • Build
    • RPA Workspace

Using the Run stored procedure action

Stored procedures are a set of SQL statements that are created and stored in the database. These SQL statements might be complex and have to run multiple times. Use the Run stored procedure action to execute existing stored procedures.

Note:
  • This action does not support Microsoft Access or SQLite database types.
  • Starting from Automation 360 v.22 (Build 10526), for stored procedures, the limit of 32 characters for input and output parameters has been removed.

Procedure

To automate the task of executing a stored procedure, follow these steps:

  1. Enter the name of the session you used to connect to the database server in the Connect action.
    You do not have to provide the details of the database server here because you have already associated those details with the session name when using the Connect action.
  2. Enter the name of the stored procedure.
  3. Optional: Click Add parameter to provide an input parameter or configure an output parameter.
    Select from the following parameter options:
    OptionSteps
    Input Parameter is passed from the bot to the stored procedure.
    • Name: Enter the name of the parameter from the stored procedure.
    • Value (optional): Enter a value or select a variable.
    • Type: Select the data type from the following options
      • BIGINT (number)
      • BINARY (Boolean)
      • BIT (number)
      • CHAR (string)
      • DATE (date time)

        Supported format yyyy-mm-dd

      • DECIMAL (number)
      • DOUBLE (number)

        Default choice for decimal values.

      • FLOAT (number)
      • INTEGER (number)

        Uses 4 bytes to store an integer with a value from -2,147,483,648 to 2,147,483,647

      • LONGVARBINARY (Boolean)
      • LONGVARCHAR (string)
      • NUMERIC (number)
      • REAL (number)
      • SMALLINT (number)

        Uses 2 bytes to store an integer with a value from -32,768 to 32,767

      • TIME (date time)

        Supported format hh:mm:ss

      • TIMESTAMP (date time)

        Supported format yyyy-mm-dd hh:mm:ss.f, where f is fractional seconds

      • TINYINT (number)

        Uses 1 byte to store an integer with a value from 0 to 255

      • VARBINARY (Boolean)
      • VARCHAR (string)
    For example, if running the example function from the Manage stored procedure action, configure the following two input parameters and values for the sum_of_two function to add:
    • Parameter 1: num1, 5, TINYINT
    • Parameter 2: num2, 10, TINYINT
    Output Parameter is passed from the stored procedure to the bot.
    • Name: Enter the name of the parameter from the stored procedure.
    • Type: Select the data type from the following options
      • BIGINT (number)
      • BINARY (Boolean)
      • BIT (number)
      • CHAR (string)
      • DATE (date time)

        Supported format yyyy-mm-dd

      • DECIMAL (number)
      • DOUBLE (number)

        Default choice for decimal values.

      • FLOAT (number)
      • INTEGER (number)

        Uses 4 bytes to store an integer with a value from -2,147,483,648 to 2,147,483,647

      • LONGVARBINARY (Boolean)
      • LONGVARCHAR (string)
      • NUMERIC (number)
      • REAL (number)
      • SMALLINT (number)

        Uses 2 bytes to store an integer with a value from -32,768 to 32,767

      • TIME (date time)

        Supported format hh:mm:ss

      • TIMESTAMP (date time)

        Supported format yyyy-mm-dd hh:mm:ss.f, where f is fractional seconds

      • TINYINT (number)

        Uses 1 byte to store an integer with a value from 0 to 255

      • VARBINARY (Boolean)
      • VARCHAR (string)

    When the bot runs, the action converts the database data type to an Automation 360-supported data type.

    For example, if running the example sum_of_two function from the Manage stored procedure action, configure the output parameter: sum, TINYINT.

    InputOutput Parameter can be used for both input and output.
    • Name: Enter the name of the parameter from the stored procedure.
    • Value (optional): Enter a value or select a variable.
    • Type: Select the data type from the following options
      • BIGINT (number)
      • BINARY (Boolean)
      • BIT (number)
      • CHAR (string)
      • DATE (date time)

        Supported format yyyy-mm-dd

      • DECIMAL (number)
      • DOUBLE (number)

        Default choice for decimal values.

      • FLOAT (number)
      • INTEGER (number)

        Uses 4 bytes to store an integer with a value from -2,147,483,648 to 2,147,483,647

      • LONGVARBINARY (Boolean)
      • LONGVARCHAR (string)
      • NUMERIC (number)
      • REAL (number)
      • SMALLINT (number)

        Uses 2 bytes to store an integer with a value from -32,768 to 32,767

      • TIME (date time)

        Supported format hh:mm:ss

      • TIMESTAMP (date time)

        Supported format yyyy-mm-dd hh:mm:ss.f, where f is fractional seconds

      • TINYINT (number)

        Uses 1 byte to store an integer with a value from 0 to 255

      • VARBINARY (Boolean)
      • VARCHAR (string)
  4. Enter the maximum number of records to retrieve.
    You can limit the results of the execution.
  5. Optional: Enter a timeout value.
    When the specified time expires, the statement execution stops even if the execution is not completed.
  6. Optional: Select the