SQL/MX 3.2.1 Reference Manual (H06.26+, J06.15+)
SQL/MX Statements
HP NonStop SQL/MX Release 3.2.1 Reference Manual—691117-005
2-246
Considerations for GRANT EXECUTE
ON [PROCEDURE] procedure-ref
specifies the ANSI logical name of a stored procedure on which to grant EXECUTE
privilege, of the form:
[[catalog-name.]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 on page 6-56.
TO {authid [,authid ]... | PUBLIC}
specifies one or more users to whom you grant EXECUTE privilege.
authid specifies an authorization ID to whom you grant the EXECUTE privilege.
Authorization IDs identify users during the processing of SQL statements. The
authorization ID must be a valid Guardian user name, enclosed in double quotes.
A Guardian user number (for example, “255,255”) is disallowed. authid is not
case-sensitive.
SQL:1999 specifies two special authorization IDs: PUBLIC and SYSTEM.
•
PUBLIC specifies all present and future authorization IDs.
•
SYSTEM specifies the implicit grantor of privileges to the creators of stored
procedures.
You cannot specify SYSTEM as an authid in a GRANT EXECUTE statement.
WITH GRANT OPTION
specifies that users of the authorization IDs to whom the EXECUTE privilege is
granted have the right to grant EXECUTE privilege to other authorization IDs.
BY authid-grantor
specifies the authorization ID authid-grantor on whose behalf the grant
operation is performed. Only the super ID can use the BY clause. If another user
attempts to do so, the system returns an error. The effect of using the BY clause is
the same as if the authid-grantor were to issue the GRANT EXECUTE
statement directly (without using the BY clause).
authid-grantor must be a valid authorization ID and cannot be SYSTEM.
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. The owner, or creator, of the stored procedure and
the super ID automatically have EXECUTE and WITH GRANT OPTION privileges on a
stored procedure. All other users must be granted both EXECUTE and WITH GRANT










