The DBA or the owner of the procedure may grant permission to execute stored procedures. The EXECUTE permission is the only permission that may be granted on a procedure.
The method for granting permissions to execute a procedure is similar to that for granting permissions on tables and views. However, the WITH GRANT OPTION clause of the GRANT statement does not apply to the granting of permissions on procedures.
You can use either Sybase Central or Interactive SQL to set permissions.
Connect to the database.
Open the Procedures & Functions folder for that database.
Select a procedure and then choose File > Properties.
On the Permissions tab of the Procedure property sheet, configure the permissions for the procedure:
Click Grant to select users or groups to which to grant all permissions on the procedure.
Click beside users in the Execute column to toggle between granting or not granting permission.
Select a user or group in the list and click Revoke to revoke all permissions.
You can also assign permissions from the User or Group property sheet. To assign permissions to many users and groups at once, use the Procedure property sheet. To assign permissions to many procedures at once, use the User or Group property sheet.
Connect to the database as the DBA or as the owner of the procedure.
Execute a GRANT EXECUTE ON statement.
You can grant M_Haneef permission to execute a procedure named my_procedure, as follows:
Connect to the database as the DBA or as owner of my_procedure procedure.
Execute the SQL statement:
GRANT EXECUTE ON my_procedure TO M_Haneef;
Procedures execute with the permissions of their owner. Any procedure that updates information in a table will execute successfully only if the owner of the procedure has UPDATE permissions on the table.
As long as the procedure owner has the proper permissions, the procedure executes successfully when called by any user assigned permission to execute it, whether or not they have permissions on the underlying table. You can use procedures to allow users to perform well-defined activities on a table, without having any general permissions on the table.