Granting permissions on procedures

A user with DBA authority 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.

 To grant permissions on procedures (Sybase Central)
  1. Use the SQL Anywhere 12 plug-in to connect to the database as a user with DBA authority.

  2. Click Procedures & Functions.

  3. Right-click a procedure and then choose Properties.

  4. Click the Permissions tab.

  5. Configure the permissions for the procedure:

    • Click Grant.

    • Double-click a user or group.

    • To allow or revoke permission to execute a procedure, select a user or group and click the Execute column. A checkmark indicates the user or group can execute the procedure.

    • To revoke all permissions, select a user or group and click Revoke.

  6. Click Apply.

Tip

You can also assign permissions from the User Properties or Group Properties window. Use the Procedure Properties window to assign permissions to multiple users or groups. Use the User Properties or Group Properties window to assign permissions to multiple procedures.

 To grant permissions on procedures (SQL)
  1. Connect to the database as a user with DBA authority or as the owner of the procedure.

  2. Execute a GRANT EXECUTE ON statement.

 Example
 Execution permissions of procedures
 See also