SQL/MX 2.x Reference Manual (H06.04+)
SQL/MX Statements
HP NonStop SQL/MX Reference Manual—540440-003
2-171
Examples of REVOKE EXECUTE
Examples of REVOKE EXECUTE
•
To revoke the WITH GRANT OPTION privilege on ADJUSTSALARY from user
'HR.BETTY,' the super ID issues this REVOKE EXECUTE statement:
REVOKE GRANT OPTION FOR EXECUTE
ON PROCEDURE samdbcat.persnl.adjustsalary
FROM 'HR.BETTY'
BY 'SYSMGT.BEN';
The user 'HR.BETTY' no longer has the WITH GRANT OPTION privilege but still
has EXECUTE privilege on ADJUSTSALARY.
•
To revoke the EXECUTE privilege on ADJUSTSALARY from user 'HR.BETTY,'
the super ID issues this REVOKE EXECUTE statement with the CASCADE option:
REVOKE EXECUTE
ON PROCEDURE samdbcat.persnl.adjustsalary
FROM 'HR.BETTY' CASCADE
BY 'SYSMGT.BEN';
•
This REVOKE EXECUTE statement issued by the super ID fails because a
dependent privilege exists for the users of the HR group to whom the user
'HR.BETTY' granted the EXECUTE privilege on ADJUSTSALARY:
REVOKE EXECUTE
ON PROCEDURE samdbcat.persnl.adjustsalary
FROM 'HR.BETTY'
BY 'SYSMGT.BEN';
*** ERROR[1014] Privileges were not revoked. Dependent
privilege descriptors still exist.
--- SQL operation failed with errors.
•
This REVOKE EXECUTE statement issued by the super ID does not fail because
no dependent privileges exist for the HR group, which had only EXECUTE
privilege on ADJUSTSALARY:
REVOKE EXECUTE
ON PROCEDURE samdbcat.persnl.adjustsalary
FROM 'HR.MIKE', 'HR.JOE', 'HR.HILDE' RESTRICT
BY 'HR.BETTY';