Once you define the users and roles you need, you assign them access to individual stored procedures using the ALLOW clause of the CREATE PROCEDURE statement in the schema. In the following example, users assigned the roles dbuser and ops are permitted access to both the MyProc1 and MyProc2 procedures. Only users assigned the ops role have access to the MyProc3 procedure.
CREATE PROCEDURE ALLOW dbuser,ops FROM CLASS MyProc1; CREATE PROCEDURE ALLOW dbuser,ops FROM CLASS MyProc2; CREATE PROCEDURE ALLOW ops FROM CLASS MyProc3;
Usually, when security is enabled, you must specify access rights for each stored procedure. If a procedure declaration does not include an ALLOW clause, no access is allowed. In other words, calling applications will not be able to invoke that procedure.