Examples of Revoking Privileges On SQL Procedures - Analytics Database - Teradata Vantage

SQL Data Control Language

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
sgu1628111251052.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
dvv1472243528022
lifecycle
latest
Product Category
Teradata Vantageā„¢

The EXECUTE PROCEDURE privilege of user_2 on the SQL procedure named procedure_name in database_name must be revoked. Assume that all the specified database objects exist and that the grantor owns both the database and the SQL procedure.

You can submit any of the following REVOKE requests to revoke the specified privileges:

     REVOKE EXECUTE
     ON PROCEDURE database_name.procedure_name
     FROM user_2;
     REVOKE EXECUTE PROCEDURE
     ON database_name.procedure_name
     FROM user_2;
     REVOKE EXECUTE PROCEDURE
     ON PROCEDURE database_name.procedure_name
     FROM user_2;

Submit the following request to revoke CREATE PROCEDURE, DROP PROCEDURE, and EXECUTE PROCEDURE privileges simultaneously from user_2 on the database named database_name:

     REVOKE CREATE PROCEDURE, DROP PROCEDURE, EXECUTE PROCEDURE
     ON database_name
     FROM user_2;

To revoke ALTER PROCEDURE, EXECUTE, and DROP privileges simultaneously from user_2 on the SQL procedure named procedure_name in database database_name, you can perform either of the following requests:

     REVOKE ALTER PROCEDURE, EXECUTE, DROP
     ON PROCEDURE database_name.procedure_name
     FROM user2;
     REVOKE ALL
     ON PROCEDURE database_name.procedure_name
     FROM user2;

If you specify PROCEDURE without also specifying either CREATE or DROP in a REVOKE request, Vantage drops both the CREATE PROCEDURE and DROP PROCEDURE privileges on database_name.

For example, the following request drops both CREATE and DROP PROCEDURE privileges on database_name from user_2:

REVOKE PROCEDURE
ON database_name
FROM user_2;