REVOKE (Library)

Revokes the USAGE privilege on a library from a user or role.

To revoke functions inside the library, a user must have separate REVOKE privileges for those functions.

Syntax

REVOKE { USAGE | ALL }
... ON LIBRARY [ [ db-name.]schema.]library-name [ , ... ] 
... FROM { username | PUBLIC | role } [ , ... ]
...[ CASCADE ] 

Parameters

[[db-name.]schema.]
Specifies a schema and an optional database to which you are connected. Include the schema name if multiple schemas exist in the database.
library-name

The library from which to revoke the USAGE privilege. When using more than one schema, specify the schema that contains the procedure.

 username | role | PUBLIC } [,...]

The area from which the privilege gets revoked, valid values are:

  • username—revokes privileges from a specific user
  • role—revokes privileges from a role
  • PUBLIC—revokes privileges from all users and roles.
CASCADE

Revokes the privilege from the specified user or role and then from others. After a user or role has been granted a privilege, the user can grant that privilege to other users and roles. The CASCADE keyword first revokes the privilege from the initial user or role, and then from other grantees extended the privilege.

Privileges

You must have DBADMIN privileges to run REVOKE (Library).

Examples

This example revokes user1's USAGE privilege on the idolLib library in the v_idol schema.

=> REVOKE USAGE ON LIBRARY v_idol.IdolLib FROM user1;

See Also