Introducing SQL Anywhere Studio
Tutorial: Managing Databases with Sybase Central
Lesson 4: View and edit stored procedures
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
In the Procedures & Functions folder, select sp_customer_list.
Choose File
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.
Click Grant.
The Grant Permissions dialog appears:
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:
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.
Click OK to accept the changes to the sp_customer_list permissions.