REVOKE (Monitor Form) Statement | SQL Data Control Language | Teradata Vantage - REVOKE (Monitor Form) - Advanced SQL Engine - Teradata Database

SQL Data Control Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
lmb1556233084626.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1149
lifecycle
previous
Product Category
Teradata® Vantage™ NewSQLEngine

Revokes system-wide performance monitoring privileges.

REVOKE MONITOR takes effect immediately when the revoked users issue their next statement.

Required Privileges

For REVOKE (Monitor), the user submitting a REVOKE statement must have all the privileges that are to be revoked with GRANT option.

Syntax

REVOKE [ GRANT OPTION FOR ]
  { MONITOR [ PRIVILEGES | BUT NOT monitor_privilege [,...] ] |
    monitor_privilege [,...]
  }
  { TO | FROM } { revokee [,...] | PUBLIC } [;]
revokee
[ALL] user_name

Syntax Elements

GRANT OPTION FOR
Indicates that only the grant authority is removed from the specified privileges for the specified grantees.
REVOKE GRANT OPTION FOR revokes the privilege of the recipient to grant, but does not revoke the stated privileges themselves.
MONITOR PRIVILEGES
Revokes from the specified user all privileges, except MONITOR, that can be granted on the specified object, and that are possessed WITH GRANT OPTION by the user executing the REVOKE.
To revoke all privileges for a user, including MONITOR, you must perform at least two statements as follows:
REVOKE ALL PRIVILEGES ON  object  FROM  user_name;
REVOKE MONITOR PRIVILEGES FROM  user_name;
ALL PRIVILEGES means all database privileges.
If you specify the ALL PRIVILEGES option, then only the privileges possessed with grant authority are revoked from the grantee.
MONITOR PRIVILEGES indicates all monitoring privileges.
The ANSI/ISO SQL:2011 standard requires ALL to be followed by PRIVILEGES.
MONITOR BUT NOT
Revokes all of the MONITOR privileges except those specified by monitor_privilege.
monitor_privilege
The monitoring privileges that are to be revoked.
You can specify as many of the following privileges as you wish, separated by commas:
  • ABORTSESSION
  • CTCONTROL
  • MONRESOURCE
  • MONSESSION
  • SETRESRATE
  • SETSESSRATE
See Monitor Privileges for the definitions of these monitoring privileges.
ALL
Indicates that the monitoring privileges are to be to revoked from the named database or user, and every database or user owned by that database or user now and in the future.
ALL user_name is a Teradata extension to the ANSI/ISO SQL:2011 standard.
user_name
The database or user from whom monitoring privileges are to be revoked. You can specify up to 25 names.
PUBLIC
Indicates that the monitoring privileges are to be revoked from all currently defined and future Teradata Database users.
ALL DBC is equivalent to PUBLIC.

Example of Revoking All Privileges From a User

This statement pair revokes all SQL privileges on the accounting database and all monitor privileges on the system from a user named ted. This example assumes that the revoker has the necessary privileges either implicitly or explicitly WITH GRANT OPTION.

REVOKE ALL PRIVILEGES ON accounting
FROM ted;

REVOKE MONITOR PRIVILEGES
FROM ted;

Example of Revoking Specific Privileges From a User

This statement revokes the ABORTSESSION, MONSESSION, and SETSESSRATE monitor privileges from user pls. This example assumes that the revoker has the necessary privileges either implicitly or explicitly WITH GRANT OPTION.

REVOKE ABORTSESSION, MONSESSION, SETSESSRATE FROM pls;

For information about granting monitor privileges, see GRANT (Monitor Form).