This form of the REVOKE statement revokes CONTROL, BIND, and EXECUTE privileges against a package.
Invocation
This statement can be embedded in an application program or issued through the use of dynamic SQL statements. It is an executable statement that can be dynamically prepared. However, if the bind option DYNAMICRULES BIND applies, the statement cannot be dynamically prepared (SQLSTATE 42509).
Authorization
The privileges held by the authorization ID of the statement must include at least one of the following:
To revoke the CONTROL privilege, SYSADM or DBADM authority are required.
Refer to REVOKE (Database Authorities), REVOKE (Index Privileges), REVOKE (Schema Privileges), REVOKE (Server Privileges) and REVOKE (Table, View, or Nickname Privileges) for other GRANT statements.
Syntax
.-,-----------------. V | >>-REVOKE------+-BIND---------+--+------------------------------> +-CONTROL------+ | (1) | '-EXECUTE------' (2) >----ON--PACKAGE-------package-name-----------------------------> .-,------------------------------------. V | >----FROM----+-+-------+---authorization-name--+--+------------>< | +-USER--+ | | '-GROUP-' | '-PUBLIC--------------------------'
Notes:
Description
The BIND privileges cannot be revoked from an authorization-name that holds CONTROL privilege on the package without also revoking the CONTROL privilege.
Revoking CONTROL does not revoke the other package privileges.
The EXECUTE privilege cannot be revoked from an authorization-name that holds CONTROL privilege on the package without also revoking the CONTROL privilege.
The authorization ID of the REVOKE statement itself cannot be used (SQLSTATE 42502). It is not possible to revoke the privileges from an authorization-name that is the same as the authorization ID of the REVOKE statement.
Rules
Examples
Example 1: Revoke the EXECUTE privilege on package CORPDATA.PKGA from PUBLIC.
REVOKE EXECUTE ON PACKAGE CORPDATA.PKGA FROM PUBLIC
Example 2: Revoke CONTROL authority on the RRSP_PKG package for the user FRANK and for PUBLIC.
REVOKE CONTROL ON PACKAGE RRSP_PKG FROM USER FRANK, PUBLIC