SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Statements
HP NonStop SQL/MX Reference Manual540440-003
2-141
GRANT EXECUTE Statement
In this example, the super ID grants SELECT and DELETE privileges on a table on
behalf of sql.user1:
GRANT SELECT, DELETE ON TABLE sales.odetail
TO "sql.user3" BY "sql.user1";
GRANT EXECUTE Statement
Considerations for GRANT EXECUTE
Examples of GRANT EXECUTE
The GRANT EXECUTE statement grants privileges for calling a stored procedure in
Java (SPJ) to one or more specified users.
EXECUTE
specifies the privilege of calling the stored procedure.
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-52.
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.
GRANT EXECUTE
ON [PROCEDURE] procedure-ref
TO {grantee [,grantee ]...}
[WITH GRANT OPTION]
[BY authid-grantor]
procedure-ref is:
[[catalog-name.]schema-name.]procedure-name
grantee is:
authid | PUBLIC