Neoview SQL Reference Manual (R2.4 SP2)

GRANT EXECUTE Statement
“Syntax Description of GRANT EXECUTE”
“Considerations for GRANT EXECUTE”
“Examples of GRANT EXECUTE”
The GRANT EXECUTE statement grants privileges for executing a stored procedure in Java (SPJ)
to one or more specified roles. See “Privileges” (page 288).
GRANT EXECUTE
ON [PROCEDURE] procedure-ref
TO {grantee [,grantee ]... }
[WITH GRANT OPTION]
procedure-ref is:
[schema-name.]procedure-name
grantee is:
authid
Syntax Description of GRANT EXECUTE
EXECUTE
specifies the privilege of executing a stored procedure by using a CALL statement.
ON [PROCEDURE] procedure-ref
specifies the name of a stored procedure on which to grant the EXECUTE privilege, of the
form:
[schema-name.]procedure-name
where each part of the name is a valid SQL identifier with a maximum of 128 characters. For
more information, see “Identifiers” (page 257).
TO {grantee [,grantee ]... }
specifies one or more roles to whom you grant EXECUTE privilege.
grantee is authid
authid specifies an authorization ID to whom you grant privileges. Authorization IDs
identify roles during the processing of SQL statements. The authorization ID must be a valid
role name enclosed in double quotes. authid is not case-sensitive.
GRANT EXECUTE allows two special authorization IDs called PUBLIC and SYSTEM.
PUBLIC grants the privilege to all present and future authorization IDs.
SYSTEM specifies the implicit grantor of privileges to the creator of objects. You cannot
specify SYSTEM as an authid in a GRANT EXECUTE statement.
WITH GRANT OPTION
specifies that roles to whom privileges are granted have the right to grant the same privilege
to other roles.
Considerations for GRANT EXECUTE
Authorization and Availability Requirements
To grant EXECUTE privilege on a stored procedure, you must have both that privilege and the
right to grant that privilege. That is, the WITH GRANT OPTION privilege must have been issued
to your role and not revoked. If you do not have the EXECUTE privilege with the WITH GRANT
OPTION, an error is returned.
GRANT EXECUTE Statement 137