SQL/MX Guide to Stored Procedures in Java (G06.24+, H06.03+)

Managing SPJs in NonStop SQL/MX
HP NonStop SQL/MX Guide to Stored Procedures in Java523727-004
6-4
Revoking Privileges on an SPJ
Revoking Privileges on an SPJ
Use the REVOKE EXECUTE or REVOKE statement to remove the EXECUTE or
WITH GRANT OPTION privilege on an SPJ from specific users. In a REVOKE
statement, specify ALL PRIVILEGES to revoke the EXECUTE privilege on an SPJ. For
the syntax of the REVOKE EXECUTE and REVOKE statements, see the SQL/MX
Reference Manual.
If you own the SPJ, you can revoke the EXECUTE and WITH GRANT OPTION
privileges on the SPJ from any user to whom you granted those privileges. If you are
the super ID acting on behalf of a grantor, you can revoke the EXECUTE and WITH
GRANT OPTION privileges on the SPJ from any user to whom the grantor granted
those privileges. If you are not the owner of the SPJ or the super ID, you must have
been granted the WITH GRANT OPTION privilege to revoke privileges from other
users, and you can revoke privileges only from other users to whom you have granted
privileges.
For example, the HR director of North America can revoke the EXECUTE privilege on
ADJUSTSALARY from one or more of the department managers to whom the director
granted privileges. In this example, the HR director revokes the EXECUTE privilege
from the Marketing Department manager:
VST013.vsd
REVOKE EXECUTE
ON PROCEDURE samdbcat.persnl.adjustsalary
FROM "MKG.RAYMOND";
Database Administrator
super ID
WITH GRANT OPTION
EXECUTE
HR Director North America
HR.MGRNA
WITH GRANT OPTION
EXECUTE
HR Director Europe
HR.MGREU
WITH GRANT OPTION
EXECUTE
Manager Research Dept.
RD.MCKAY
EXECUTE
Manager Corporate Dept.
CORP.GREEN
EXECUTE
Manager Marketing Dept.
MKG.RAYMOND
EXECUTE