A stored procedure is a group of SQL statements that form a logical unit and perform a particular task. Stored procedures are used to encapsulate a set of operations or queries to execute on a database server. Stored procedures can be compiled and executed with different parameters and they may have any combination of input, output, and input/output parameters.
Prerequisites
Database Info activity must be created before creating Stored Procedure activity.
Steps to create Stored Procedure activity:
Click Configure > OTHERS>Stored Procedure.
Click Create Stored Procedure.
Enter the name and description for new stored procedure activity in the textbox Name and Description respectively.
Select the database info activity from the Database Info drop-down list .
Click here to learn how to create Database Info activity.
To select the database stored procedure, click the Browse button. The Select Stored Procedure screen with the list of stored procedures is displayed.
Make sure that you have execute permissions on the database. As, only the procedures for which the database user has permission are shown on the Browse screen.
Select the required stored procedure and click the Get Parameters button. The Stored Procedure Parameter screen is displayed with list of parameters.
Click OK to return to the Stored Procedure activity screen. Parameters of the selected procedure are populated in Stored Procedure Parameters field.
The variables are automatically populated in the In Params, Out Params, and InOut Params fields, these fields are editable though. The @ symbol precedes the variable name in case of MS SQL database, however, for Oracle database @ symbol is not required.
Expand the Advanced Properties section and select the Project from Project drop-down list.