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-247
Examples of GRANT EXECUTE
OPTION privileges to grant other users the EXECUTE privilege. If you lack authority to
grant the EXECUTE privilege, the system returns an error.
If the super ID issues a GRANT EXECUTE statement using the BY authid-grantor
clause, the authid-grantor must have the right to grant the EXECUTE privilege.
Security Considerations
NonStop SQL/MX translates each authorization ID you specify into a 32-bit integer
value and then stores the number in the system metadata tables. The stored
identification number, not the characters of the authorization ID, is used to identify the
user who holds privileges on the specified objects.
Examples of GRANT EXECUTE
•
Suppose that the super ID on behalf of the owner of the SPJ, 'SYSMGT.ANDY',
grants EXECUTE and WITH GRANT OPTION privileges on ADJUSTSALARY to
two other users, 'SYSMGT.BEN' and 'SYSMGT.JASON':
GRANT EXECUTE
ON PROCEDURE samdbcat.persnl.adjustsalary
TO 'SYSMGT.BEN', 'SYSMGT.JASON'
WITH GRANT OPTION
BY 'SYSMGT.ANDY';
The users, 'SYSMGT.BEN' and 'SYSMGT.JASON,' can then issue EXECUTE
and WITH GRANT OPTION privileges to other users on the system. They can also
execute CALL statements.
•
The user 'SYSMGT.BEN' grants EXECUTE and WITH GRANT OPTION privileges
on spj1 to user 'HR.BETTY':
GRANT EXECUTE
ON PROCEDURE samdbcat.persnl.spj1
TO 'HR.BETTY'
WITH GRANT OPTION;
•
The user 'HR.BETTY' grants EXECUTE privilege on spj1 to some users in the
HR group:
GRANT EXECUTE
ON PROCEDURE samdbcat.persnl.spj1
TO 'HR.MIKE', 'HR.JOE', 'HR.HILDE';
•
The owner of spj2 grants EXECUTE privilege on that SPJ to all users of the
system:
GRANT EXECUTE
ON samdbcat.persnl.spj2
TO PUBLIC;










