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 .. 111 112 113 114 115 116 < 117 > 118 119 120 121 122 123 .. 241 >> Next


BEGIN/END LOGGING is non-ANSI. If the SQL flagger is enabled, it is flagged.

Syntax

BEGIN—p LOGGING END

Ldenials-I Lwith text-I

ON

¦ first --last-

¦ first and last------ EACH ------

Teradata RDBMS for UNIX SQL Reference

8-29
Teradata SQL Syntax Guide

BEGIN/END LOGGING

where

Syntax Element ... Description
DENIALS Specifies that entries should be made only when statement execution fails because the user did not have the privilege(s) necessary to execute the statement. DENIALS is applied to only those actions listed in the BEGIN LOGGING statement that contains it. For example, two BEGIN LOGGING statements may specify the same object, user, and action, but different frequency and DENIALS options. This allows the user to log all denials, but only the first successful use of a privilege. If this option is not specified, a log entry is potentially made if the privilege check either fails or succeeds.
WITH TEXT Specifies that the text of the statement which caused the log entry is to be saved in the log. If two BEGIN LOGGING statements specify the same user, object, and action, and one of the statements specifies the DENIALS option, then WITH TEXT may be specified on either one of the statements, on both statements, or on neither statement.

IF WITH TEXT is specified . . . THEN the text is . . .
only on the statement that also specifies DENIALS saved only when the entry is created as a result of a denial.
either without DENIALS or on both statements always saved.
on END LOGGING flag is turned off for the specified actions and for the DENIALS specification, but the logging frequency is not affected.

8-30

Teradata RDBMS for UNIX SQL Reference
Teradata SQL Syntax Guide

BEGIN/END LOGGING

Syntax Element ... Description
FIRST LAST FIRST AND LAST EACH Default for a BEGIN LOGGING statement is FIRST. Allowed combinations are FIRST and LAST. An entry will potentially be made for either the first, the last, the first and last, or each time during any session that the specified action is attempted against the specified object. If logging is already begun for an action on an object, a subsequent statement to begin logging for the same object, action, user, and DENIALS specification causes only the current frequency to be changed according to the new statement.
ALL Operation (or Privilege Definitions) GRANT Specifies the frequency with which log entries should be made. ALL specifies that a log entry will potentially be made when any of the actions listed in the table following this one is attempted against the specified object. Note that the column name and id are displayed for each logged column when you log rights to UPDATE and REFERENCES. If logging has already begun for ALL actions on an object, a subsequent statement to begin or end logging for an action will change logging activity only for the specified action. One or more action-names from the list in , can be used to specify the type of access to be logged (note that these are the same as the functions for which an access right can be granted.)
BY dbname Specifies the community for which log entries should be made. If username is specified, it must be a user currently defined in the Teradata RDBMS; that is, a name for which space has been created and under which a Teradata RDBMS session may be established. Absence of the “BY username” option implies all users (those already defined on the Teradata RDBMS as well as any defined in the future while this logging directive is in effect). If both “BY username” and “ON keyword object-name” are absent, then potentially the specified action is logged for all users and objects throughout the Teradata RDBMS system.

Teradata RDBMS for UNIX SQL Reference

8-31
Teradata SQL Syntax Guide

BEGIN/END LOGGING

Object Limits

Syntax Element ... Description

ON Specifies one or more entities for which log entries should

be made.

Absence of the “ON keyword object-name” option implies all entities the user attempts to access.

If both “ON keyword object-name” and “BY username” are absent, then potentially the specified action is logged for all users and objects throughout the Teradata RDBMS.

Note: The MONITOR privilege does not require the ON keyword, and is illegal if ON is specified in relation to MONITOR access rights. Therefore, to check who has MONITOR privileges, leave the ON clause out of the BEGIN/END LOGGING statement.

The keyword DATABASE, USER, TABLE, VIEW, or MACRO must precede each object-name.

An object-name is the name of a database, user, table, view, or macro.

The name of a table, view, or macro must be qualified by the name of the database or user under which that object is defined.

DATABASE

dbname

USER dbname

TABLE

dbname.name

VIEW

dbname.name

MACRO

dbname.name

CHECKPOINT DROP MACRO INSERT
CREATE DATABASE DROP TABLE MONITOR
CREATE MACRO DROP USER REFERENCES
CREATE TABLE DROP VIEW RESTORE
Previous << 1 .. 111 112 113 114 115 116 < 117 > 118 119 120 121 122 123 .. 241 >> Next