Creating a Stored Procedure

Create a stored procedure using the Sybase Control Center Administration Console.

  1. In the Perspective Resources view, select the server on which the role resides, then click the drop-down arrow next to the server name and select Administration Console.
  2. In the left pane of the Administration Console, expand ASE Servers > Compiled Objects > Procedures, then select Stored Procedures.
  3. Click the drop-down arrow and select New.
    You see the Add Stored Procedure wizard.
  4. On the Introduction screen, select the server, database, and owner of the new procedure.
  5. Enter the name of the procedure.
  6. (Optional) On the Compile Option screen, you have the option to recompiled your procedure every time it is executed. This is useful if you expect parameter values to change frequently. If you do not select this option, the procedure is compiled only the first time it is executed.
  7. (Optional) On the Stored Procedure Group screen, you can specify a group number to which to add the stored procedure. Grouping together all stored procedures that belong to a certain application lets you drop all procedures with a single command.
  8. (Optional) (Available on Adaptive Server 15.7 ESD#2 and higher) On the Execution Behavior screen, select how the procedure will be executed. This feature is not controlled by the enable granular permissions configuration option.
  9. On the SQL Editor screen, provide the SQL statements for the procedure. Ensure that all objects referenced by the procedure exist in the database.
  10. (Optional) Click Preview to see the SQL statements for your command.
  11. (Optional) Click Summary to verify your selected options.
Related concepts
Extended Stored Procedures
Enabling Granular Permissions
Related tasks
Creating a SQLJ Procedure
Related reference
Stored Procedure Properties