Books
in black and white
Main menu
Share a book About us Home
Books
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics
Ads

Teradata RDBMS forUNIX SQL Reference - NCR

NCR Teradata RDBMS forUNIX SQL Reference - NCR, 1997. - 913 p.
Download (direct link): teradataforunix1997.pdf
Previous << 1 .. 152 153 154 155 156 157 < 158 > 159 160 161 162 163 164 .. 241 >> Next


8-162

Teradata RDBMS for UNIX SQL Reference
Teradata SQL Syntax Guide

GRANT Statement (MONITOR)

GRANT Statement (MONITOR)

The GRANT MONITOR statement grants system-wide performance monitoring privileges.

GRANT MONITOR is flagged as non-ANSI when the SQL flagger is enabled.

Syntax

Lall-I

PUBLIC-

Lwith grant-I

OPTION

FF07A056

where:

username

Syntax Element... Description
MONITOR PRIVILEGES Grants the specified recipients 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.
BUT NOT Grants all of the above grantable privileges except those specified. If the ability to grant these privileges is to be included, the WITH GRANT OPTION must be specified explicitly.
ABORTSESSION Aborts any outstanding request or ongoing transaction of one or more Teradata RDBMS sessions and, optionally, logs off the sessions.

Teradata RDBMS for UNIX SQL Reference

8-163
Teradata SQL Syntax Guide

GRANT Statement (MONITOR)

GRANT and GRANT MONITOR

GRANT Versus GRANT MONITOR

Syntax Element... Description
MONRESOURCE Gathers information on how each vproc is performing as well as the availability of each processor.
MONSESSION Gathers information about logged on sessions and overall system usage on a session-by-session basis.
SETRESRATE Sets the frequency at which processor resource usage data is updated in the Teradata RDBMS.
SETSESSRATE Sets the frequency at which session-level performance data is updated in the Teradata RDBMS.
WITH GRANT OPTION Specifies that the recipient will receive the listed privileges WITH GRANT OPTION.

The SQL and MONITOR forms of GRANT are separate statements; to grant a user all privileges including MONITOR, the grantor must execute both statements, thus:

GRANT ALL PRIVILEGES ON object

TO username WITH GRANT OPTION ;

GRANT MONITOR PRIVILEGES

TO username WITH GRANT OPTION ;

Do not specify the WITH GRANT OPTION if you do not want the recipient of the privilege to be able to grant those privileges to others.

ALL PRIVILEGES refers only to database-related privileges. MONITOR PRIVILEGES indicates all monitoring related privileges.

A major difference between the syntax of the GRANT and GRANT MONITOR privileges is that GRANT MONITOR has no clause specifying what the access right has been granted on. Because GRANT MONITOR allows a user to impact the entire system there is an implicit ‘ON PUBLIC’ clause.

It is illegal to specify an ON object clause in any GRANT MONITOR statement. However, it is illegal not to specify an ON object clause in any other GRANT statement. If you violate either one of these restrictions, a failure response occurs.

The two sets of GRANT privileges differ in function as well as in syntax. The GRANT privilege relates to controlling access to Teradata RDBMS database objects. The GRANT MONITOR privilege relates to monitoring the Teradata RDBMS itself.

8-164

Teradata RDBMS for UNIX SQL Reference
Teradata SQL Syntax Guide

GRANT Statement (MONITOR)

GRANT takes effect immediately when the grantee issues his next command. It’s unnecessary to log out to receive the privilege just granted.

Caution: Determine carefully who should be granted MONITOR access

rights. MONITOR access rights should be granted only to those users who are cleared to monitor all applications on all sessions. No lower level of MONITOR privileges exists. For example, the database administrator cannot grant user Addams the ability to do session-level monitoring of her applications only. Instead, the database administrator 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.SessionInfo WHERE Partition = 'MONITOR'

The GRANT statement is used only to assign specific privileges. To transfer ownership of a database or user, see the “GIVE” statement.

Teradata RDBMS for UNIX SQL Reference

8-165
Teradata SQL Syntax Guide

GRANT LOGON

Function

Syntax

GRANT LOGON

The GRANT LOGON statement gives specific users permission to log on to the Teradata RDBMS from one or more specific client systems. In addition, it may be used to change the current system defaults. This statement can be submitted only by the system administrator or by a trusted user to whom the system administrator has granted the EXECUTE privilege on the DBC.LogonRule macro.

GRANT LOGON is flagged as non-ANSI, when the SQL flagger is enabled.

GRANT LOGON

- ON —p^sf/d-ly-I—ALL—I

-AS DEFAULT -

—to-------J- dbname-I

i—l

-TO

-FROM-

I

WITH NULL PASSWORD

TU

FF07B027

where:

Syntax Element... Description
hostid Identifies a mainframe channel connection or a local area network connection that is currently defined to the Teradata RDBMS by the hardware configuration data. The interface need not be operational. The hostid for the Teradata RDBMS console is 0 (zero). For any other connector, hostid is a value from 1 to 1023.
Previous << 1 .. 152 153 154 155 156 157 < 158 > 159 160 161 162 163 164 .. 241 >> Next