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 Database Administration - NCR

NCR Teradata RDBMS Database Administration - NCR , 2004. - 616 p.
Download (direct link): teradatadatabaseadmin2004.pdf
Previous << 1 .. 75 76 77 78 79 80 < 81 > 82 83 84 85 86 87 .. 218 >> Next

&S current session number. SSSSSSSSS
&T time of day the SQL request was received. Note: If &T is in position 26 or higher, truncation occurs. You can use this truncation to monitor resources hourly or by the minute. This variable allows for one second granularity, causing the system to write a row for virtually every individual SQL request. If the system receives two or more SQL requests for the same user/account ID pair in the same second, the system sums AMP usage statistics. This summation can be any combination of subsecond requests, or a combination of subsecond requests with a longer request. If the system receives a multi-statement request, each individual SQL statement in the request has the same timestamp; therefore, the row written to DBC.AMPUsage contains the summation of the statistics of the individual statements. If you use the &T variable without the &D variable, the system sums statistics collected for a specified time on one day with existing statistics for the same time on other days. HHMMSS (24 hour clock)

5 - 40

Teradata RDBMS Database Administration Chapter 5: Setting Up Users, Profiles, Accounts and Accounting

System Accounting Functions

Usage Rules for ASE Variables

The following restrictions and cautions apply to ASE variables:

Account strings cannot exceed 30 characters. If the expanded account string exceeds 30 characters, characters to the right of position 30 are truncated.

Be aware that the account string character count includes:

Separation characters, such as colons (:) in time fields and slashes (/) in dates. If a string consists of all the ASE variables, the result is 32 characters long and is truncated to the right of position 30.

Performance group names (although ASE ignores them).

You can intersperse ASE variables with literals, subject to the constraints of length and of position relative to performance group controls (see "Accounts and Performance Group Names" on page 5-22).

You can use multiple ASE variables in any order in the account string following the first ASE variable.

Some combinations generate strings long enough to preclude certain combinations of real account strings and expansion values.

Although it is perfectly legal to combine the &H and &T options, the information collected is redundant.

If you specify &H or &T without &D, statistics collected on one day at one time are combined with statistics collected on other days at that same time.

ASE Interactions With Utilities

Except for the utilities and variables noted in the table below, you can use ASE with any utility that uses a standard Teradata interface to log on, including:

BTEQ

FastLoad

MultiLoad

TPump (except for &T)

FastExport

Teradata SQL Assistant (formerly known as Queryman) The exceptions are as follows:

Do not use this ASE code . With this utility . Because .
any ARC ARC uses HUTCTL and HUTPARSE sessions, which generate requests that are not parsed. As a result, substitution variables are never expanded, so the rows in AMPUsage contain literal ASE codes rather than the expected date, hour, and timestamp values.
&T TPump &T generates a row in AMPUsage for nearly every SQL statement.

5 - 40 Teradata RDBMS Database Administration

Chapter 5: Setting Up Users, Profiles, Accounts and Accounting

Using the Data Dictionary Views

Using the Data Dictionary Views

When a DDL or DCL statement is processed, rows are inserted in the appropriate system tables. CREATE and MODIFY are DDL statements. GRANT is a DCL statement.

The dictionary views that reflect the updates to the system tables as a result of a CREATE/MODIFY DATABASE, USER, ROLE or PROFILE statement include:

DBC.AccountInfo

DBC.AllSpace

I DBC.Databases

DBC.Database_Default_Journals

DBC.Owners

DBC.Parents

DBC.ProfileInfo

DBC.RoleInfo

DBC.RoleMember

DBC.SecurityDefaults

DBC.User_Default_Journals

DBC.Users

The dictionary views you use for viewing the updates resulting from of a GRANT statement include:

DBC.AccessRights

DBC.AllRights

DBC.AllRoleRights

DBC.UserGrantedRights

DBC.UserRights

DBC.UserRoleRights

For a description of every view, see Teradata RDBMS Data Dictionary.

The following EXPLAIN output illustrates the dictionary activity resulting from a simple CREATE USER statement:

EXPLAIN

CREATE USER DBA01 AS

PERM = 1e6, SPOOL = 1000000,

TEMPORARY = 1000000, PASSWORD = DBA01 ;

This statement returns a description of statement processing similar to the following:

5 - 32

Teradata RDBMS Database Administration Chapter 5: Setting Up Users, Profiles, Accounts and Accounting

Using the Data Dictionary Views

1 First, we lock data base dba01 for exclusive use.

2 Next, we lock a distinct DBC."pseudo table" for write on a RowHash to prevent global deadlock for DBC.DataBaseSpace.

3 We lock a distinct DBC."pseudo table" for write on a RowHash to prevent global deadlock for DBC.AccessRights.
Previous << 1 .. 75 76 77 78 79 80 < 81 > 82 83 84 85 86 87 .. 218 >> Next