Granting Permissions on Procedures in Interactive SQL

There is only one permission that may be granted on a procedure – the EXECUTE permission to execute (or CALL) the procedure.

Permission to execute stored procedures may be granted by the DBA or PERMS ADMIN or by the owner of the procedure (the user ID that created the procedure).

Use the GRANT EXECUTE statement to grant permissions on procedures. For example, to grant M_Haneef permission to execute a procedure named my_procedure:

  1. Connect to the database as a user with DBA or PERMS ADMIN authority or as owner of my_procedure procedure.
  2. Execute the SQL statement:
    GRANT EXECUTE
    ON my_procedure
    TO M_Haneef

Execution Permissions of Procedures

Procedures execute with the permissions of their owner. Any procedure that updates information on a table will execute successfully only if the owner of the procedure has UPDATE permissions on the table.

As long as the procedure owner does have the proper permissions, the procedure will execute 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 carry out well-defined activities on a table, without having any general permissions on the table.

Related concepts
Permissions of Groups
Procedures Provide Tailored Security
Related tasks
Granting Delete Permission on Tables and Views in Interactive SQL
Granting Permissions on Procedures in Sybase Central
Granting the Right to Grant Permissions
Granting Update Permission on Tables and Views in Interactive SQL
Granting User Permission on Tables in Sybase Central