Viewing stored procedure code with Sybase Central

There are several stored procedures included in the sample database. The following steps explain how to view and edit stored procedures.

StepsViewing and editing procedures

  1. Do one of the following:

    • In Tasks view, double-click the Procedures & Functions folder in the Contents tab, then double-click ShowCustomers.

    • In Folders view, open the Procedures & Functions folder, choose ShowCustomers.

    Sybase Central displays the procedure in a SQL editor in the right pane. Right-click anywhere in the SQL editor to display standard editing options. You can also use the editing options on the Toolbar.

  2. Do one of the following to save your changes:

    • Click the Save button on the Toolbar.

    • Click File, choose Save.

StepsRunning a stored procedure

  1. Do one of the following:

    • In Tasks view, double-click the Procedures & Functions folder in the Contents tab, double-click the procedure you want to run, then choose Execute from Interactive SQL from the list of Procedure & Function Design Tasks.

    • In Folders view, open the Procedures & Functions folder, right-click the procedure you want to run, choose Execute from Interactive SQL.

StepsViewing and altering procedure permissions

Stored procedures have permissions associated with them. You need explicit permission as a user or a member of a group that has permission to execute the procedure. To review and change permissions for a procedure:

  1. Right-click a procedure, choose Properties.

  2. On the Procedure Properties sheet, click the Permissions tab to see which users have permissions on this procedure.

  3. Click Grant, choose the user or group you want to grant permission to execute this procedure, click OK.

  4. Click Apply.