GRANT (Monitor Form) Statement| SQL Data Control Language | Teradata Vantage - 17.05 - GRANT (Monitor Form) - 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

Grants system-wide performance monitoring privileges.

Required Privileges

You must have MONITOR privileges to use the monitor form of GRANT.

These privileges should be granted only to those users who are cleared to monitor all applications on all sessions.

There is no lower level of MONITOR privilege: its scope is always global. For example, the database administrator cannot grant user Addams the ability to do session-level monitoring of her applications only. Instead, the DBA would have to grant Addams the permission to do session-level monitoring of all applications by all sessions.

To determine who is currently using the MONITOR partition, issue the following query:

SELECT UserName, IFPNo
FROM DBC.SessionInfoV
WHERE partition = 'MONITOR';

The GRANT statement is used only to assign specific privileges.

To transfer ownership of a database or user, see GIVE.

Syntax

GRANT {
  MONITOR [ PRIVILEGES | BUT NOT monitor_privilege [,...] ] |
  monitor_privilege [,...]
}
  TO {
       { grantee [,...] | PUBLIC } [ WITH GRANT OPTION ] |
         role_name [,...]
     } [;]

Syntax Elements

MONITOR PRIVILEGES
The named recipients are to receive all MONITOR-related privileges. MONITOR PRIVILEGES does not permit the user to grant the indicated privilege to others without the WITH GRANT OPTION being specified.
MONITOR BUT NOT
The named recipients are to receive all of the grantable privileges except those specified after BUT NOT. If the ability to grant these privileges is to be included, the WITH GRANT OPTION must be specified explicitly.
monitor_privilege
A valid monitoring privilege.
See Monitor Privileges for a list of the valid monitoring privileges.
grantee
[ALL] user_name
role_name
ALL
Grants the specified object privilege set to the named database or user and to every database or user owned by that database or user now and in the future.
user_name
The name of a user or database to be granted the specified MONITOR privileges. You can specify up to 25 names.
user_name must be the identifier of a user already defined to the system.
PUBLIC
Indicates that the privileges are to be inherited by all existing and future database users.
WITH GRANT OPTION
Indicates that the grantee receives privileges WITH GRANT OPTION. If this option is not specified, the grantee receives the privilege set without the grant option.