Contents Index Viewing Stored Procedures Lesson 5: Back up your database

Introducing SQL Anywhere Studio
   Tutorial: Managing Databases with Sybase Central
    Lesson 4: View and edit stored procedures

Edit stored procedure properties


You can edit properties of stored procedures using the stored procedure's property sheet. In this section, we alter the permissions for a stored procedure so that all salespeople, including the user you created in the previous lesson (Sandy), can execute the procedure to obtain a list of customers.

Stored procedures have permissions associated with them. In order to execute a procedure, you either need to be granted permission to execute it, or you need to be a member of a user group that has permission to execute it.

View and alter the permissions on the sp_customer_list procedure

  1. In the Procedures & Functions folder, select sp_customer_list.

  2. Choose File > Properties.

  3. Click the Permissions tab of the property sheet to see which user IDs have been granted permissions for this procedure. Currently, none have since the only user for the sample database is DBA, who is the owner of the procedure and so automatically has execute permission for the procedure.

  4. Click Grant.

    The Grant Permissions dialog appears:

    The Sybase Central Grant Permission dialog.
  5. In the Grant Permission dialog, select Sales and click OK to grant this group permission to execute the sp_customer_list procedure.

    Sales is added to the Permissions tab of the Procedure property sheet with a checkmark in the Execute column:

    The Sybase Central stored procedure property sheet.

    You can revoke this group's permission by clicking the checkmark to make it disappear, or by selecting the group and clicking Revoke at the side of the Permissions tab.

  6. Click OK to accept the changes to the sp_customer_list permissions.


Contents Index Viewing Stored Procedures Lesson 5: Back up your database