17.05 - Examples of Revoking Privileges On SQL Procedures - Teradata Database

Teradata Vantageā„¢ - SQL Data Control Language

prodname
Advanced SQL Engine
Teradata Database
vrm_release
17.00
17.05
created_date
June 2020
category
Programming Reference
featnum
B035-1149-170K

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, Teradata Database 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;