data dictionary views

250
Teradata ® RDBMS Data Dictionary V2R4.1 B035-1092-061A June 2001

Upload: vijay-bhaskar

Post on 08-Apr-2015

241 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Data Dictionary Views

Teradata® RDBMSData Dictionary

V2R4.1

B035-1092-061AJune 2001

Page 2: Data Dictionary Views

The product described in this book is a licensed product of NCR Corporation.

BYNET is an NCR trademark registered in the U.S. Patent and Trademark Office.CICS, CICS/400, CICS/600, CICS/ESA, CICS/MVS, CICSPLEX, CICSVIEW, CICS/VSE, DB2, DFSMS/MVS, DFSMS/VM, IBM, NQS/MVS, OPERATING SYSTEM/2, OS/2, PS/2, MVS, QMS, RACF, SQL/400, VM/ESA, and VTAM are trademarks or registered trademarks of International Business Machines Corporation in the U. S. and other countries.DEC, DECNET, MICROVAX, VAX and VMS are registered trademarks of Digital Equipment Corporation.HEWLETT-PACKARD, HP, HP BRIO, HP BRIO PC, and HP-UX are registered trademarks of Hewlett-Packard Co.KBMS is a trademark of Trinzic Corporation.INTERTEST is a registered trademark of Computer Associates International, Inc.MICROSOFT, MS-DOS, MSN, The Microsoft Network, MULTIPLAN, SQLWINDOWS, WIN32, WINDOWS, WINDOWS 2000, and WINDOWS NT are trademarks or registered trademarks of Microsoft Corporation.SAS, SAS/C, SAS/CALC, SAS/CONNECT, and SAS/CPE are registered trademarks of SAS Institute Inc.SOLARIS, SPARC, SUN and SUN OS are trademarks of Sun Microsystems, Inc.TCP/IP protocol is a United States Department of Defense Standard ARPANET protocol.TERADATA and DBC/1012 are registered trademarks of NCR International, Inc.UNICODE is a trademark of Unicode, Inc.UNIX is a registered trademark of The Open Group.X and X/OPEN are registered trademarks of X/Open Company Limited.YNET is a trademark of NCR Corporation.

THE INFORMATION CONTAINED IN THIS DOCUMENT IS PROVIDED ON AN “AS-IS” BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO THE ABOVE EXCLUSION MAY NOT APPLY TO YOU. IN NO EVENT WILL NCR CORPORATION (NCR) BE LIABLE FOR ANY INDIRECT, DIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS OR LOST SAVINGS, EVEN IF EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

The information contained in this document may contain references or cross references to features, functions, products, or services that are not announced or available in your country. Such references do not imply that NCR intends to announce such features, functions, products, or services in your country. Please consult your local NCR representative for those features, functions, products, or services available in your country.

Information contained in this document may contain technical inaccuracies or typographical errors. Information may be changed or updated without notice. NCR may also make improvements or changes in the products or services described in this information at any time without notice.

To maintain the quality of our products and services, we would like your comments on the accuracy, clarity, organization, and value of this document. Please e-mail: [email protected]

or write:

Information EngineeringNCR Corporation100 North Sepulveda BoulevardEl Segundo, CA 90245-4361U.S.A.

Any comments or materials (collectively referred to as “Feedback”) sent to NCR will be deemed non-confidential. NCR will have no obligation of any kind with respect to Feedback and will be free to use, reproduce, disclose, exhibit, display, transform, create derivative works of and distribute the Feedback and derivative works thereof without limitation on a royalty-free basis. Further, NCR will be free to use any ideas, concepts, know-how or techniques contained in such Feedback for any purpose whatsoever, including developing, manufacturing, or marketing products or services incorporating Feedback.

Copyright © 1996-2001, NCR CorporationAll Rights Reserved

Page 3: Data Dictionary Views

Preface

Supported Software Release

This book supports Teradata RDBMS V2R4.1.

Changes to This Book

This book includes the following changes to support the current release:

Date Description

June 2001 • Added the following features:– Single Sign On– Database Query Manager • Added referenced column(s)• Added material on hex unicode constants• Added two new views: ColumnStats and IndexStats• Performed DR fixes and enhancement requests

June 2000 The new features added to this book for this release include the following:

• Stored procedures, called Persistent Stored Modules (PSM) in the ANSI SQL-99 specifications, are created in the user’s database space as tables. A stored procedure consists of a set of control and condition-handling statements that make SQL a computationally complete programming language.

• Ability to preserve the same table version number when only journaling options are used on the RDBMS to allow suitable backup and recovery operations.

• Increased macro and view text limits to 26000 bytes based on new 64KB row size.

Teradata RDBMS Data Dictionary i

Page 4: Data Dictionary Views

Preface

December 1999 This book has been redesigned for this release. Changes made to this book include the following:

• Reorganization and consolidation of the listings of views and view columns to add hypertext links and eliminate redundancy.

• Added information on which tables are referenced by each view.

• Addition of new chapter on tables that lists the tables and columns of the DBC, noting the primary and secondary index columns, data type, and format.

• Deletion of Appendix A that lists the differences between the TOS and Teradata RDBMS versions of the Data Dictionary.

Date Description

Teradata RDBMS Data Dictionaryii

Page 5: Data Dictionary Views

PrefaceAbout This Book

About This Book

Purpose

This book describes the Teradata RDBMS Data Dictionary and contains information about system views that allow different types of users to access underlying table information stored in Teradata RDBMS.

This includes specific information about the following:

• Database objects• Sessions• Resource usage

Audience

This book is intended for system administrators, database administrators, and other technical personnel responsible for maintaining the Teradata Relational Database Management System (RDBMS). More specifically, the manual provides information for the following types of users:

• End users• Supervisory users• Teradata RDBMS database administrators• Teradata RDBMS security administrators • Operations control users

How This Book Is Organized

This book contains five chapters:

Chapter 1: “Teradata RDBMS Data Dictionary Overview” describes the contents and organization of the Data Dictionary, how the system accesses the DD, and how you use information obtained from the DD.

Chapter 2: “System Views” contains an alphabetically organized table of all the DBC system views and a corresponding table that describes in detail each of the columns selected by the views.

Chapter 3: “System Views: Usage and Examples” provides detailed descriptions of the system views that allow users to obtain information from the Data Dictionary.

Chapter 4: “System Tables” provides a listing and description of all the tables and columns of the system DBC, including the formats and data types of the columns.

Chapter 5: “Macros” provides information on system macros including the TwoPCRule, ResUsage, and DIPVIEW macros.

Teradata RDBMS Data Dictionary iii

Page 6: Data Dictionary Views

PrefaceAbout This Book

Prerequisites

You should be familiar with relational databases in general and the Teradata RDBMS in particular.

It may be helpful to review the following books:

• Introduction to Teradata RDBMS• Teradata RDBMS Database Design• Teradata RDBMS SQL Reference, Volume 1• Teradata RDBMS Database Administration

Teradata RDBMS Data Dictionaryiv

Page 7: Data Dictionary Views

PrefaceList of Acronyms

List of Acronyms

This book uses acronyms, which the following table lists in alphabetical order:

2PC Two-Phase Commit

AMP Access Module Process or Access Module Processor

ANSI American National Standards Institute

API Application Programming Interface

ASCII American Standard Code for Information Interchange

AWS Administration Workstation

ASF2 Archive Storage Facility 2

BTEQ Basic Teradata Query

CICS Customer Information Control System (IBM)

CLI Call-Level Interface

CPU Central Processing Unit

DBA Database Administrator

DBC Name of database with Teradata RDBMS system tables

DBQM Database Query Manager

DBS Database System or Database Software

DD Data Dictionary

DDL Data Definition Language

DIP Database Initialization Program or DBC Initialization Procedure or DBC/1012 Initialization Program

DML Data Manipulation Language

DSU Disk Storage Unit

EBCDIC Extended Binary-Coded Decimal Interchange Code

HI Hash Index

HW Hardware

ID Identifier/Identification

I/O Input/Output

IMS Information Management System

JI Join Index

Teradata RDBMS Data Dictionary v

Page 8: Data Dictionary Views

PrefaceList of Acronyms

KB Kilobytes

LAN Local Area Network

MVS Multiple Virtual Storage

NUPI Non-unique Primary Index

NUSI Non-unique Secondary Index

ODBC Open Database Connectivity

OLCP Online Complex Processing

OLAP Online Analytical Processing

OS Operating System

PC Personal Computer

PDE Parallel Data Extension

PE Parser Engine

PI Primary Index (unique or non-unique)

PJ Permanent Journal

PM/API Performance Monitor Application Programming Interface

PMA Processor Module Assembly

RCC Recovery Control Catalog

RDBMS Relational Database Management System

ResUsage Resource Usage

RI Referential Integrity

SPL Stored Procedure Language

SQL Structured Query Language

SSO Single Sign-On

SW Software

TDN Teradata Network

TDP Teradata Director Program

TP Transaction Processor

TOS Teradata Operating System

TSO Time Sharing Option (IBM)

UPI Unique Primary Index

USI Unique Secondary Index

Teradata RDBMS Data Dictionaryvi

Page 9: Data Dictionary Views

PrefaceList of Acronyms

VM Virtual Machine

VMS Virtual Memory System

Teradata RDBMS Data Dictionary vii

Page 10: Data Dictionary Views

PrefaceTechnical Information on the Web

Technical Information on the Web

The NCR home page ( http://www.ncr.com) provides links to numerous sources of information about Teradata. Among the links provided are sites that deal with the following subjects:

• Contacting technical support• Enrolling in customer education courses• Ordering and downloading product documentation• Accessing case studies of customer experiences with Teradata• Accessing third party industry analyses of Teradata data warehousing

products• Accessing white papers• Viewing or subscribing to various online periodicals

Teradata RDBMS Data Dictionaryviii

Page 11: Data Dictionary Views

Contents

Preface

Supported Software Release ............................................................................................ iChanges to This Book ....................................................................................................... i

About This Book .................................................................................................................iiiList of Acronyms .................................................................................................................vTechnical Information on the Web................................................................................ viii

Chapter 1: Teradata RDBMS Data Dictionary OverviewWhat is the Data Dictionary?......................................................................................... 1–2

Data Dictionary Users.................................................................................................. 1–2Accessing the Data Dictionary.................................................................................... 1–3Updating the Data Dictionary .................................................................................... 1–3How the System Uses Data Dictionary Information............................................... 1–4

Organization of the Data Dictionary ............................................................................ 1–5What are System Views? ................................................................................................ 1–6

Granted Rights on System Views............................................................................... 1–6Extending View Privileges .......................................................................................... 1–6System View Versions Non-X and X ......................................................................... 1–7

Views for Special Users .................................................................................................. 1–8Security Logging Views............................................................................................... 1–9Administrator Views.................................................................................................. 1–10Operations and Recovery Control Views ............................................................... 1–11Supervisory User Views ............................................................................................ 1–12End User Views .......................................................................................................... 1–12

Querying the Data Dictionary ..................................................................................... 1–14Special Keywords ....................................................................................................... 1–14Querying X Versus Non-X Views ............................................................................ 1–14Example for Non-X View Query.............................................................................. 1–15Example for X View Query ....................................................................................... 1–15Dictionary Information Using HELP and COMMENT ........................................ 1–16

Stored Procedures ......................................................................................................... 1–17What Is a Stored Procedure?..................................................................................... 1–17Relationship with DD ................................................................................................ 1–17

Teradata RDBMS Data Dictionary ix

Page 12: Data Dictionary Views

Contents

PM/API Queries............................................................................................................ 1–18MONITOR-Related Queries...................................................................................... 1–19

Monitoring Usage with Views..................................................................................... 1–20AllSpace and TableSize Views.................................................................................. 1–20AMPUsage View......................................................................................................... 1–21Compiling AMPUsage Statistics .............................................................................. 1–22Account String Expansion......................................................................................... 1–23Additional Information ............................................................................................. 1–24

DIPVIEW Script ............................................................................................................. 1–25Tracking Miscellaneous System Actions.................................................................... 1–26

Tracking System Events............................................................................................. 1–26Tracking Logon Rules ................................................................................................ 1–26Tracking Privileges..................................................................................................... 1–26

Sys_Calendar.................................................................................................................. 1–27Maintaining System Logs............................................................................................. 1–28Other System Objects .................................................................................................... 1–29Columns with Hex Unicode Constants...................................................................... 1–30

Chapter 2: System ViewsUsers of DD Views .......................................................................................................... 2–2X Version Views............................................................................................................... 2–3System Views Reference................................................................................................. 2–4System View Columns Reference ............................................................................... 2–22

Chapter 3: System Views: Usage and ExamplesAccessLog ......................................................................................................................... 3–2AccLogRules..................................................................................................................... 3–4AccountInfo[X]................................................................................................................. 3–7AllRights ........................................................................................................................... 3–8AllSpace[X] ..................................................................................................................... 3–10AllTempTables[X] ......................................................................................................... 3–12All_RI_Children............................................................................................................. 3–14All_RI_Parents ............................................................................................................... 3–15AMPUsage...................................................................................................................... 3–16Association ..................................................................................................................... 3–17CharSets .......................................................................................................................... 3–19CharTranslations ........................................................................................................... 3–20Children[X] ..................................................................................................................... 3–22Collations ........................................................................................................................ 3–23

Teradata RDBMS Data Dictionaryx

Page 13: Data Dictionary Views

Contents

Columns[X] .................................................................................................................... 3–24ColumnStats ................................................................................................................... 3–26Databases[X]................................................................................................................... 3–28Databases2 ...................................................................................................................... 3–29Database_Default_Journals[X] .................................................................................... 3–30DBCInfo .......................................................................................................................... 3–31DeleteAccessLog[X] ...................................................................................................... 3–32DeleteOldInDoubt ......................................................................................................... 3–33DiskSpace[X] .................................................................................................................. 3–34Events[X]......................................................................................................................... 3–37Events_Configuration[X].............................................................................................. 3–39Events_Media[X] ........................................................................................................... 3–41Hardware_Event_Log................................................................................................... 3–43HostsInfo ........................................................................................................................ 3–44Indices[X]........................................................................................................................ 3–45IndexStats ....................................................................................................................... 3–47InDoubtLog .................................................................................................................... 3–49Journals[X]...................................................................................................................... 3–50LogOnOff........................................................................................................................ 3–51LogonRules..................................................................................................................... 3–53RCC_Configuration[X] ................................................................................................. 3–54RCC_Media[X] ............................................................................................................... 3–55RI_Child_Tables ............................................................................................................ 3–56RI_Distinct_Children .................................................................................................... 3–57RI_Distinct_Parents....................................................................................................... 3–58RI_Parent_Tables........................................................................................................... 3–59SecurityDefaults ............................................................................................................ 3–60SecurityLog[X] ............................................................................................................... 3–61SessionInfo[X] ................................................................................................................ 3–62ShowColChecks ............................................................................................................. 3–64ShowTblChecks ............................................................................................................. 3–65Software_Event_Log ..................................................................................................... 3–66Table_LevelConstraints ................................................................................................ 3–68Tables[X] ......................................................................................................................... 3–69Tables2 ............................................................................................................................ 3–71TableSize[X].................................................................................................................... 3–72Triggers .......................................................................................................................... 3–73UserGrantedRights........................................................................................................ 3–75UserRights ...................................................................................................................... 3–76Users ................................................................................................................................ 3–78User_Default_Journals[X] ............................................................................................ 3–80

Teradata RDBMS Data Dictionary xi

Page 14: Data Dictionary Views

Contents

Chapter 4: System TablesCreating System Tables .................................................................................................. 4–2Special Table Information .............................................................................................. 4–3

DBC.ALL Table ............................................................................................................. 4–3DBC.TVM Table............................................................................................................ 4–3DBC.TVFields Table ..................................................................................................... 4–3Stored Procedures......................................................................................................... 4–3ResUsage Tables ........................................................................................................... 4–4

Non-Hashed Tables......................................................................................................... 4–5Data Dictionary FALLBACK Tables............................................................................. 4–6

Chapter 5: MacrosTwoPCRule Macro .......................................................................................................... 5–2

Creating the TwoPCRule Macro ................................................................................ 5–2TwoPCRule and the Resolver Base Module ............................................................. 5–2

ResUsage Macros............................................................................................................. 5–3DIPVIEW Macros ............................................................................................................ 5–4

ARC_NonEmpty_List Macro...................................................................................... 5–4ClearAccounting Macro............................................................................................... 5–5ClearPeakDisk Macro................................................................................................... 5–6CollAddStandard Macro ............................................................................................. 5–6CollInstallMulti Macro................................................................................................. 5–7DIPMarkNS10 Macro................................................................................................... 5–7LogonRule Macro ......................................................................................................... 5–8

Index.......................................................................................................................... Index–1

Teradata RDBMS Data Dictionaryxii

Page 15: Data Dictionary Views

Chapter 1:

Teradata RDBMS Data Dictionary Overview

This chapter describes the Teradata RDBMS Data Dictionary (DD) and provides information about the following topics:

• What the Data Dictionary consists of• How the Data Dictionary is organized• What views are and who uses them• How to perform queries on the Data Dictionary• What are stored procedures• Monitoring system use• DIPVIEW script• Tracking system events• System calendar• Maintaining system logs • Other system objects• Columns with Hex Unicode constants

Teradata RDBMS Data Dictionary 1 – 1

Page 16: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewWhat is the Data Dictionary?

What is the Data Dictionary?

The Teradata RDBMS Data Dictionary is composed of tables and views that reside in the system database called DBC. These tables and views are reserved for use by the system and contain information about the system’s associated data. DD system tables include current definitions, control information, and general information about the following:

• Databases• Character Sets• Users• Accounts• Tables• Views• Columns• Indices• Sessions and Session Attributes• Triggers• Access Rights• Journal Tables• Disk space• Events• Resource Usage• Macros• Stored Procedures

Data Dictionary Users

End users typically use views to obtain information on objects and system administrators generally create and update tables that system views reference. When a table is created, the complete data definition is stored in the Data Dictionary along with the following details:

• Table location, identification, database name, table name, creator name, version, database name, and user names of all owners in the hierarchy.

• Each column in the table, including column name, data type, length, and phrases.

• User/creator access privileges on the table.• Indexes defined for the table.• Constraints defined for the table.• Table backup and protection including fallback status and permanent

journals.

Teradata RDBMS Data Dictionary1 – 2

Page 17: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewWhat is the Data Dictionary?

• Date and time the object was created.

When a view or macro is created, the definition of the object is stored in the Data Dictionary, along with the following details:

• The text of the view or macro• Creation time attributes• User and creator access privileges on the view or macro

When a user creates a stored procedure, the following details are automatically entered in the Data Dictionary:

• Creation time attributes of the stored procedure. • Parameters of the stored procedure, including parameter name, parameter

type, data type, and default format.• User and creator access privileges on the stored procedure.• Join and hash are maintained as regular tables.

Accessing the Data Dictionary

For security and data integrity reasons, the default SELECT privilege is granted to PUBLIC for most views in both the X and non-X views in the Data Dictionary. You cannot use the INSERT, UPDATE, or DELETE SQL commands to alter the Data Dictionary in any way.

Updating the Data Dictionary

When a data definition statement is processed, the system tables are updated automatically. For example, when a user creates a table, the system associates the user with the new table and enters the following information about that table into the Data Dictionary:

• Version count • Location • Owner • Access rights • Table name, column names and attributes • Indexes • Journaling• Date and time

When a table is changed by an ALTER, CREATE, DROP, or RENAME statement, the DBC automatically increments the version count for that table. For more information about creating, changing, and dropping tables, see Chapter 4: “System Tables.”

Teradata RDBMS Data Dictionary 1 – 3

Page 18: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewWhat is the Data Dictionary?

How the System Uses Data Dictionary Information

The system uses information provided by the Data Dictionary in the following ways:

For each … The system …

request checks the DD to ensure that the requestor has the appropriate access privileges.

approved query uses the DD information, along with all other available statistics, to devise the best method of accessing the data.

approved request that references a macro name

executes the macro according to the definition stored in the DD.

approved request that references a view name

assembles the view according to the definition stored in the Data Dictionary, and returns data rows retrieved from the underlying tables or views to the user.

approved request that references a stored procedure name

obtains the stored procedure creation-time attributes from the DD and validates the usage of the submitted request.

Teradata RDBMS Data Dictionary1 – 4

Page 19: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewOrganization of the Data Dictionary

Organization of the Data Dictionary

Data Dictionary entries are stored in system tables in a special database, named DBC. Information in these system tables can be examined directly or through a series of views.

System views are pre-defined views that provide users with a way to retrieve frequently used data from underlying system tables. Views do not contain data and are stored as entries in the data dictionary. Views, which look like tables to users, display data in columns and rows only when a user submits an SQL statement that uses them. View names, such as “DiskSpace, “Users” and “Columns”are based on entries contained in the underlying tables.

The set of views that are available to a user is determined by the Teradata RDBMS administrator. Specialized views are designed to meet the needs of the following individuals:

• Teradata RDBMS security administrator• Teradata RDBMS and system administrator• A user who supervises other Teradata RDBMS users and accounts• An end user or client logged on to a Teradata RDBMS session• An operator using the database window of the Administration Workstation

(AWS) or responsible for running client utilities such as the Archive/Recovery or Archive Storage Facility2 (ASF2)

References to specific views for certain users are described in detail later in this chapter.

Teradata RDBMS Data Dictionary 1 – 5

Page 20: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewWhat are System Views?

What are System Views?

System views are part of the Teradata RDBMS Data Dictionary and reside in the space owned by the system user DBC. View definitions are stored in the table DBC.TVM.View column information is stored in DBC.TVFields.

The Teradata RDBMS system administrator loads the views for a site by running the Database Initialization Program (DIP) from the Database Window (DBW). For more information on running DIP from the DBW, see Teradata RDBMS Utilities. DIP is used to execute one or more of the standard DIP SQL scripts packaged with the Teradata RDBMS.

Supplied views allow the system administrator to provide a consistent image of the data stored in the Data Dictionary. In most instances, only the Teradata RDBMS administrator is allowed to update or delete a Data Dictionary view or its underlying system tables.

Granted Rights on System Views

The system administrator can GRANT or REVOKE a privilege on any view for a user at any time. In addition, since some views are applicable only to a security administrator or a field engineer, access to these views is normally restricted.

By default, the SELECT privilege is granted to PUBLIC on most views. This privilege allows any user to retrieve view information via the SELECT statement.

If no changes are made to the default access privilege (GRANT SELECT TO PUBLIC) in the view definitions, any user can query a system view by specifying its fully-qualified name (DBC.viewname).

For example, a user can review the current Teradata RDBMS version and release by submitting the following query from any client:

SELECT * FROM DBC.DBCInfo ;

Extending View Privileges

In some cases, the system administrator may want to grant to other users the SELECT or other privileges on certain administrator views. For example, it might be useful for development personnel and financial planners to monitor the use of system resources with information obtained from the AllSpace, TableSize, DiskSpace, AMPUsage, and LogOnOff views.

In addition, if full security auditing is implemented on the Teradata RDBMS, a security administrator user may need to be created and granted the privileges necessary to execute BEGIN/END LOGGING statements.

Teradata RDBMS Data Dictionary1 – 6

Page 21: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewWhat are System Views?

System View Versions Non-X and X

During system installation, two versions of the system views, non-X and X, are available for loading into the DBC user space.

Availability of views depends on the system administrator, who can load either or both versions. Generally, most available system views have a corresponding X version.

The standard non-X views are named according to the contents of their underlying tables, such as DBC.User_Default_Journals, DBC.DiskSpace, and DBC.TableSize.These views return every row of every column defined on the underlying table.

The X version of a view defines the same views followed with the character “X”. For example, DBC.DiskSpaceX, DBC.TableSizeX, and DBC.User_Default_JournalsX.

When using the X version of a view, you do not have to specify a WHERE clause in your query to obtain selective data, since the “X” definition includes a WHERE clause that limits the response data to objects associated only with the requesting user. X views run slower than non-X views due to the fact that the X views have security checks.

The WHERE clause limits the return from a view to only those rows associated with the requesting user, such as databases, users, or objects owned or created by the user, or on which the user has been granted privileges.

Example

For example, assume user Jones enters a query against the standard TableSize view, as follows:

SELECT * FROM DBC.TableSize;

This query returns size information for every data table in the Teradata RDBMS.

To limit the response, Jones could query the X version of the view. For example, if Jones submits the following query:

SELECT * FROM DBC.TableSizeX;

then information is returned only for those tables that Jones created or is otherwise associated with.

Teradata RDBMS Data Dictionary 1 – 7

Page 22: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewViews for Special Users

Views for Special Users

Some views are generally available only to special system users, and are not normally available to PUBLIC, although this depends solely on the privileges that are granted to each user. The following table describes who typically uses certain types of views:

The following sections describe the particular views that can be valuable to different types of users.

View Type Description

Security Logging The security logs, which store information about access rules and events, are populated as a result of executing BEGIN LOGGING and END LOGGING statements.

These statements may be executed only if the AccLogRule special security macro has been installed on the Teradata RDBMS server.

The system administrator should create a security administrator user, and grant to that user at least the SELECT privilege on the access logging views.

For more information, see Teradata RDBMS Security Administration.

SYSADMIN These views are generally available only to SYSADMIN. They provide information about Parser Engine (PE) vprocs (virtual processors) on the Teradata RDBMS, which are of interest to system administrators of Teradata RDBMS server systems that communicate with PC or workstation clients.

SYSTEMFE These views are generally available only to user SYSTEMFE. They are normally used by Field Engineers to review data about the automatic identification and recovery of bad disk sectors.

Teradata RDBMS Data Dictionary1 – 8

Page 23: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewViews for Special Users

Security Logging Views

The following Data Dictionary views are of interest to the user responsible for security of the data on the Teradata RDBMS.

These LOGGING statements may be executed only if the DBC.AccLogRule security macro has been created in the DBC. Otherwise, logging of Teradata SQL access requests is not performed. See Teradata RDBMS Security Administration for more information on creating this macro.

If access logging is specified for a data object (for example, a table), log entries will be generated only when that object is accessed by name. As an example, a logging statement specifying “FIRST SELECT ON DatabaseA.Table1” causes a log entry to be generated if an access statement is the following:

SELECT . . . FROM Table1

Logging will not occur on the following access statements unless a logging rule specifies the view or macro used:

• SELECT . . . FROM View1_of_Table1• EXECUTE MACRO1

(Where Macro1 contains the statement SELECT . . . FROM Table1)

Note: The behavior of not logging indirect access to underlying tables when views or macros are executed was introduced with Teradata RDBMS Version

View Definition

AccessLog Returns information on the results of privilege checks performed against user requests to access data, which are logged as determined by the access logging rules.

To keep space consumption under control, archive and empty the log regularly using the DeleteAccessLog[X] view.

AccLogRules Shows the rules generated as a result of successfully executed BEGIN LOGGING statements.

The AccessLog view provides an audit trail of access events logged as a result of applying these rules.

DeleteAccessLog[X] Used to remove AccessLog records that are more than 30 days old.

SecurityLog[X] Provides a subset of the information in the AccessLog view.

LogonRules What logon rules have been generated for username/hostid pairs as a result of successfully executed GRANT LOGON and REVOKE LOGON statements?

SecurityDefaults What password parameters, such as length, valid characters, number of logon attempts, and elapsed time for password expiration and re-use, are defined for your site?

Teradata RDBMS Data Dictionary 1 – 9

Page 24: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewViews for Special Users

2.0. In prior releases, if underlying tables had logging rules, then rows were added even if access was through a view or macro.

Note: It is strongly recommended that you not install the macro unless your site requires such security, since the logging feature extracts a performance penalty even if little or no logging is performed.

Administrator Views

Data Dictionary views of specific interest to a Teradata RDBMS administrator and a system administrator could include, but are not limited to the following:

View Description

AllRights What privileges on databases/users, tables, views, triggers, stored procedures, and macros have been granted to any user?

AllSpace[X] How much disk storage space or spool space is being used by a given table, database/user, or account, on all AMPs or specific AMPs?

AMPUsage What demands on Teradata RDBMS resources (AMP usage, I/Os) are generated by a given user/account string?

CharSets The names of any user-defined character sets that are installed and can be used in a session.

CharTranslations What names and hexadecimal codes have been defined in order to create non-standard International character sets?

Note: If this view does not exist or no rows are found, then no user-defined character sets have been inserted into the system table.

Children[X] What databases and users are owned by other databases and users?

ColumnStats Returns statistical information on the columns in a table for which statistics have been collected.

DBCInfo What Teradata RDBMS software version and release are running? What version and release are indicated after a restart?

DiskSpace[X] How much disk storage space or spool space is being used by a given database/user or account on all AMPs? On specific AMPs?

HostsInfo What character sets have been assigned to what client systems?

IndexStats Returns statistical information on the indexes defined on a table for which statistics have been collected.

Teradata RDBMS Data Dictionary1 – 10

Page 25: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewViews for Special Users

Note: When you are logging view accesses, only the access of the top view in a hierarchy is logged. Actions based on base views or tables are not logged.

Operations and Recovery Control Views

These views are useful to the system operator. They provide audit trails on the following activities:

LogOnOff What is the logon/logoff activity for a user, including account, date, time of day, and unsuccessful logon attempts?

LogonRules What logon rules have been generated for username/hostid pairs as a result of successfully executed GRANT LOGON and REVOKE LOGON statements?

SecurityDefaults What password parameters, such as length, valid characters, number of logon attempts, and elapsed time for password expiration and re-use, are defined for your site?

SessionInfo[X] What user name, account, default database, collation, logon hostid, logon sequence number, and logon source are associated with each current Teradata RDBMS session?

Software_Event_Log What software events have been logged by the diagnostic subsystem? What are the ids of the dump node and originating node, and what is the severity and category?

TableSize[X] What is the current and peak disk space usage (not including spool) for a given database/user, data table, journal table, or account on all AMPs? On a specific AMP?

View Description

Events[X] All archive and restore activity.

Events_Configuration[X] Archive and restore activity that did not affect all AMPs.

Events_Media[X] Archive and restore events that involved removable media.

RCC_Configuration[X] Utility events that did not affect all AMPs.

RCC_Media[X] Utility events that involved removable media.

Software_Event_Log Software events and error logging information.

Hardware_Event_Log Software events and error logging information.

Association Retrieves information about an object that was imported from another Teradata RDBMS.

View Description

Teradata RDBMS Data Dictionary 1 – 11

Page 26: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewViews for Special Users

Supervisory User Views

The following views are useful to a supervisory user:

End User Views

The following views are useful to an end user:

View Description

AccountInfo[X] What accounts are available to a given user?

Users What users are owned, or have been created, by a user?

View Description

Association What are the ported and original definitions of databases, users, and objects that were moved to a different Teradata RDBMS server via the Portable Dump/Restore utility.

CharSets What user-defined International character sets are currently installed on the Teradata RDBMS and available for sessions?

If this view does not exist or no rows are found, then either International character sets have not been defined (see the CharTranslations view), or those defined have not yet been installed.

CharTranslations What are the names and hexadecimal codes of all the translation tables that have been inserted to create International character sets?

If this view does not exist or no rows are found, then no International character sets have been defined.

Collations What are the names and hexadecimal codes of all the defined collation sequences? Which one is currently installed as the default sequence for MULTINATIONAL collation?

Columns[X] What columns are associated with a table or view, or what parameters are associated with a macro or stored procedure, on which you have privileges? What attributes have been defined for these columns or parameters? What join indexes have been defined using these columns?

Databases[X] What are the characteristics of the databases you own or on which you have privileges?

Teradata RDBMS Data Dictionary1 – 12

Page 27: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewViews for Special Users

Database_Default_Journals[X] What databases are defined as having a default journal table, and what are the journal table names?

HostsInfo What character sets have been assigned as the default to each Teradata RDBMS client connection in the Teradata RDBMS configuration?

If this view does not exist or no rows are found, then either user-defined International character sets are not available (see CharSets view), or have not been assigned as host defaults. In this case, the standard default is used; that is, EBCDIC for IBM mainframe hosts, ASCII for all others.

Indices[X] What kinds of indexes have been defined for a table?

Journals[X] What data tables use what journal tables, and in what database does each table reside?

Tables[X] What data tables, triggers, stored procedures, views, join indexes, and macros have been created in a database on which you have privileges?

TableSize{X] What is the AMP-by-AMP disk usage for each database, table, or account?

Triggers What event-driven specialized procedures are attached to a single table?

User_Default_Journals[X] What user spaces are defined as having a default journal table, and what are the journal table names?

UserGrantedRights What privileges have you granted to other users?

UserRights What privileges have you been granted to databases, tables, triggers, stored procedures, views, join indexes, and macros?

View Description

Teradata RDBMS Data Dictionary 1 – 13

Page 28: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewQuerying the Data Dictionary

Querying the Data Dictionary

You can review entries in the Data Dictionary by performing a query on a system view. Various utilities and tools, such as BTEQ and other third-party tools, may be used to enter the SELECT statement, and to display or print the results.

The examples included in this book show sample results of a query. The actual formatting of the results may differ, depending on the utility or tool used.

The following sections explain and show various methods for retrieving directory information.

Special Keywords

Three special keywords are used in queries of dictionary views. Although they appear as database names in information returned from a view, these keywords are not databases. Rather, they are character strings that serve as placeholders, appearing only as special “database names” in the queries of certain views.

The three special keywords are:

• ALL• DEFAULT• PUBLIC

These keywords must be enclosed in quotation marks when they are used.

For example, the following query uses ALL as a keyword and returns the logging rules that apply to all users:

SELECT * FROM DBC.AccLogRules WHERE UserName = ’ALL’;

Note: In general, users never reference these keywords in queries or other SQL commands. These keywords, although appearing as database names, actually have no content, no tables, and no views.

Querying X Versus Non-X Views

The amount of information that can be retrieved from system views at a particular site depends on the following conditions:

• Whether an X version is available for a particular view • The privilege granted, if any, on each available view • Whether the statement references “viewname” or “viewnameX”

Teradata RDBMS Data Dictionary1 – 14

Page 29: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewQuerying the Data Dictionary

Assuming that both the X and non-X versions of the views are installed, and that the SELECT privilege is granted to PUBLIC on both versions, the information returned by an unconditional SELECT depends on the specified viewname, as follows:

Example for Non-X View Query

For example, user “Test1” may query the Databases view with the following statement:

SELECT DatabaseName, CreatorName, OwnerName, PermSpaceFROM DBC.Databases ;

As a result, all the databases in the Teradata RDBMS would be listed, as shown below:

DatabaseName CreatorName OwnerName PermSpace

pers SYSADMIN SYSADMIN 500,000Accounting2 Jacobs Vettes 250,000SQLDBA DBC SYSADMIN 150,000abc123 SYSADMIN SYSADMIN 1,460,000PERSONNEL SYSADMIN SYSADMIN 1,500,000Accounting1 Hillstein Vettes 500,000Test1 SYSADMIN Test1 1,000,000Jane Jane Test1 500,000

. . . .

. . . .

. . . .

Example for X View Query

User “Test1” may use the same structure to query the X version of Databases, as follows:

SELECT DatabaseName, CreatorName, OwnerName, PermSpaceFROM DBC.DatabasesX;

In contrast to the results of the previous example, only those databases that Test1 owned or had access to would be listed:

FROM a view specified as … Information is returned on …

DBC.viewname all objects for which entries exist in the underlying table.

Note: Unconditional SELECTs on non-X views may cause the result to exhaust the available spool space of the user.

DBC.viewnameX only those objects that the requesting user:

• owns• created• has been granted privileges on

Teradata RDBMS Data Dictionary 1 – 15

Page 30: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewQuerying the Data Dictionary

DatabaseName CreatorName OwnerName PermSpace

SQLDBA DBC SYSADMIN 150,000Jane Jane Test1 500,000PERSONNEL SYSADMIN SYSADMIN 1,500,000Test1 SYSADMIN Test1 1,000,000. . . .. . . .. . . .

Dictionary Information Using HELP and COMMENT

If the SELECT privilege on one or more system views was revoked or not granted to PUBLIC, the HELP and COMMENT statements can be used to obtain directory information about a particular object.

HELP does not require long or complex queries and the returns can be formatted for printing.

The COMMENT statement returns descriptive information about a database or database object. This includes information about Data Dictionary views.

For example, the following COMMENT statement:

COMMENT ON DBC.UserGrantedRights ;

returns the following description:

The DBC.UserGrantedRights view provides information on accessrights that the current user has granted to other users. Thecolumn names are: DatabaseName, TableName, ColumnName,AccessRight, Grantee, Grant Authority, and Allnessflag.

Teradata RDBMS Data Dictionary1 – 16

Page 31: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewStored Procedures

Stored Procedures

What Is a Stored Procedure?

A stored procedure is a combination of procedural constructs and SQL statements specified with multiple parameters, local variables, and condition handlers. It is defined and stored as a database object, although unlike objects such as views and macros whose DDL statement text is stored in the Data Dictionary, a stored procedure is created in the user’s database space as a table.

Stored procedures provide a procedural interface to the Teradata RDBMS using the Stored Procedure Language (SPL). They use standard Teradata RDBMS interfaces between the client and server software, and are similar to other procedural interfaces, such as PP2, but reside and execute on the Teradata RDBMS server, thereby reducing network traffic between the client and server.

The stored procedure table in the RDBMS server contains the following information:

• SPL source text used for creating the stored procedure• Corresponding SPL object code (the compiled stored procedure)

Relationship with DD

Information pertaining to stored procedures is included in the following Teradata RDBMS DD tables:

• DBC.TVM • DBC.TVFields • DBC.AccLogRuleTbl

The privileges relating to stored procedures are CREATE PROCEDURE, EXECUTE PROCEDURE, and DROP PROCEDURE.

Note: A stored procedure created on a Teradata RDBMS UNIX platform cannot be executed on a Teradata RDBMS Windows platform and vice versa.

See Chapter 4: “System Tables” for more specific information on tables affected by stored procedures.

Teradata RDBMS Data Dictionary 1 – 17

Page 32: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewPM/API Queries

PM/API Queries

Performance Monitor Application Programming Interface (PM/API) monitors commands issued through a logon partition called MONITOR.

Using PM/API commands, performance data is collected on:

• Current system configuration• Resource usage and status of an individual Access Module Process (AMP),

Parsing Engine (PE), or node• Resource usage and status of individual sessions

PM/API affects the following:

• PM access rights (MONITOR SESSION, MONITOR RESOURCE, SET SESSION RATE, SET RESOURCE RATE)

• ABORT SESSION, which can force a user off the system• Execution of the commands SET RESOURCE, SET SESSION, and ABORT

SESSION are considered major system events and are, thus, logged to the DBC.SW_Event_Log table

The LogonSource column, referenced by the SW_Event_Log and the SessionTbl tables includes additional information about the source of sessions logged on from an MVS or VM client, including information on the TDP and job name.

Queries against the following tables can possibly result in new PM/API-related values for some columns:

• DBC.AccessRights• DBC.SessionTbl• DBC.SW_Event_Log• DBC.Dbase

The following Data Dictionary views, which are built on those tables, are also affected by PM/API:

• AllRights• AllSpace(X)• Databases(X)• DiskSpace(X)• Software_Event_Log• LogOnOff• SessionInfo• UserGrantedRights• UserRights

Teradata RDBMS Data Dictionary1 – 18

Page 33: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewPM/API Queries

MONITOR-Related Queries

Queries related to the Performance Monitor are made in a manner similar to other Data Dictionary queries.

The following queries provide information about MONITOR-related activities:

To determine who is using the monitor, enter the following:

SELECT UserName, IFPNo FROM DBC.SessionInfoWHERE Partition = ’MONITOR’ ;

Queries regarding the use of system monitoring can be made much like other SELECT queries. For example, to determine what users have the privilege to force other users off the system, enter the following:

SELECT DISTINCT UserName FROM DBC.AllRightsWHERE AccessRight = ’AS’ ;

The ‘AS’ indicates the ABORT SESSION privilege.

To find out what users have been forced off the system in the past two days, enter the following:

SELECT DISTINCT UserName FROM DBC.LogOnOffWHERE Event = ’Forced Off’AND LogDate > DATE - 3 ;

Teradata RDBMS Data Dictionary 1 – 19

Page 34: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewMonitoring Usage with Views

Monitoring Usage with Views

Information on the usage of the Teradata RDBMS is collected by user and by account number. Control is determined by the definition of each CREATE USER statement.

An account is a group of users whose usage charges are maintained by the Teradata RDBMS. An account may be established for a user with the ACCOUNT phrase in the CREATE USER statement. If ACCOUNT is not specified, the default is the account of the immediate owner of the user. If the owner has multiple ids, then the first id is taken for the user.

The following sections describe the accounting information available for any Teradata RDBMS session.

You can monitor usage with the following system views:

• AccountInfo• AllSpace• AMPUsage• DiskSpace• LogOnOff• TableSize

The AllSpace, DiskSpace, TableSize, and AMPUsage views are useful in tracking Teradata RDBMS resources for accounting purposes, and in determining how effectively resources are being utilized by accounts and users.

AllSpace and TableSize Views

You use the AllSpace, Diskspace, and TableSize views that access data from the DatabaseSpace table to show how efficiently a table is distributed across the AMPs on which it is stored.

For example, the following statement:

SELECT CurrentPerm, PeakPerm, AMP FROM DBC.AllSpaceWHERE TableName = ’Personnel.Department’;

returns a row for each AMP on which the Department table is stored. Data in the CurrentPerm column shows, in bytes, how Department data is distributed across the AMPs.

If the distribution is uneven, you can tell from the CurrentPerm data. In addition, the PeakPerm column data indicates any fluctuations in distribution since the table was created.

Teradata RDBMS Data Dictionary1 – 20

Page 35: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewMonitoring Usage with Views

AMPUsage View

The AMPUsage view supplies information about AMP CPU time consumed, and the number of AMP to DSU read and write operations generated by a given user or account.

This view also tracks the activities of any console utilities. A row is returned for each AMP in the system unless aggregate figures are specified.

When you ask for resource usage logging, data about CPU overhead, user service, and user execution is collected by vproc type and by node.

You can use the AMPUsage, AllSpace, DiskSpace, and TableSize views to summarize resource usage for all AMPs, or for AMPs on which data is stored.

Example 1

To obtain a list (in the order of the amount of space used) of those databases currently using more than 80% of their permanent space allocation, submit the following statement:

SELECT DatabaseName, SUM(CurrentPerm)FROM DBC.DiskSpaceGROUP BY DatabaseNameHAVING (SUM(CurrentPerm)/NULLIFZERO(SUM(MaxPerm))) >.8ORDER BY SUM(CurrentPerm) DESC;

You can also use the AMPUsage and DiskSpace views to compile and maintain usage statistics that can later be selected and analyzed as described in the following sections.

Example 2

The DBC.AMPUsage, which is a view for the DBC.Acctg system table, provides information about the usage of each AMP for each user and account.

For example, the CPU time in a given row is the cumulative CPU time of the user since logon plus the cumulative previous logon time for that user. The I/O entry in a row records the total I/O accesses for the user during any reporting logon period.

The following occurs to DBC.Acctg, which is a non-fallback and non-hashed system table when an AMP is down:

• Data rows on the down AMP are not available, and DML statements such as SELECT, INSERT, UPDATE, and DELETE do not apply to the down AMP.

• Resource accounting information for the down AMP temporarily disappears until the AMP is back online.

• Any aggregate query on the DBC.Acctg includes only the online AMPs.• No resource accounting information is recorded during the down AMP

recovery.

Teradata RDBMS Data Dictionary 1 – 21

Page 36: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewMonitoring Usage with Views

• The down AMP recovery is not associated with any particular user. However, the resource accounting associated with the Transient Journal (TJ) rolling back for the down AMP is charged to the user. (That is, no resource accounting is charged to the user while the down AMP recovers from offline to online except when the updates on the TJ apply to the down AMP.)

• A system restart may impact the cumulative totals in the DBC.Acctg. (That is, any accounting data accumulated in the cache since the last time the cache was flushed before the restart will be lost completely and will not contribute to the totals in DBC.Acctg resulting from the loss of cache memory.)

Compiling AMPUsage Statistics

You can use the AMPUsage view to build and maintain a history table of CPU time and disk input/output statistics for each username/accountname.

To create the history table, enter the following statement:

CREATE TABLE AMPUseHist( AccountName VARCHAR(30),

UserName VARCHAR(30),CPUtime INTEGER,DiskIO INTEGER,CollectDate DATE,CollectTime FLOAT )PRIMARY INDEX (UserName, AccountName);

Periodically, collect usage statistics using the following procedure:

This procedure may be carried out using the following BTEQ script:

.LOGON username, password

INSERT INTO AMPUseHistSELECT AccountName, UserName,

SUM(CPUtime), SUM(DiskIO),DATE, TIMEFROM DBC.AMPUsage

GROUP BY AccountName, UserName, DATE, TIME;UPDATE DBC.AMPUsage

SET CPUTime = 0, DiskIO = 0 ALL;.QUIT

Step Action

1 Select statistics from the AMPUsage view and insert them in the history table.

2 Reset AMPUsage counters to zero for the next collection period.

Teradata RDBMS Data Dictionary1 – 22

Page 37: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewMonitoring Usage with Views

The units in which Disk I/O are measured represent data block accesses. CPU time is measured in seconds.

Refer to the DiskSpace View to see how you can use the DiskSpace view to build and maintain a table of disk space usage.

After a collection period, you may select AMPUsage and DiskSpace statistics from the history tables using BTEQ to archive the data on the client system. BTEQ stores the selected data in sequential data sets on the host computer for subsequent analysis.

A BTEQ script can be used to achieve the following:

• Creates a client-resident file (in this case, the client is MVS), • Uses the BTEQ .EXPORT command to save the data being selected into that

file, and then • Selects all rows from the DiskSpace history table

The following example shows how such a BTEQ job is used to select data from the DiskSpace history table:

//JOBNAME JOB jobcard//EXTRACT EXEC PGM=ITBMAIN//STEPLIB DD DSN=TERADATA.APPLOAD,DISP=SHR//SYSPRINT DD SYSOUT=*//SYSABEND DD SYSOUT=*//SAVEDATA DD DSN=ACC.SAVEDATA.DATA,DISP=(NEW,CATLG)// UNIT=SYSDA,SPACE=(TRK,(1,1),RLSE),// DCB=(LRECL=80,RECFM=FB,BLKSIZE=800)//SYSIN DD DATA,DLM=##.LOGON somebody,password.EXPORT DATA DDNAME=SAVEDATASELECT * FROM DiskSpaceHistORDER BY CollectDate,CollectTime;.QUIT##

Once selected and stored, historical data can be used for analysis, as follows:

• Client-resident software packages such as SAS can be used to perform trend analysis and other statistical manipulation on the data.

• Graphic software packages can be used to display the data.

Account String Expansion

Another way to measure resource usage is by using the optional Account String Expansion (ASE) feature. It allows you to append date, time, hour, or logon time stamp data to the DBC.Acctg table.

This allows more precise measurement of individual Teradata SQL statement execution, more precise statistics, more accurate capacity planning, and more information for chargeback and accounting software.

Teradata RDBMS Data Dictionary 1 – 23

Page 38: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewMonitoring Usage with Views

Other Methods of Evaluating Capacity

You can use the ResNode macro to evaluate the capacity of current system resources, and the Performance Monitor/Application Program Interface (PM/API) feature to determine current capacity during an active session.

Additional Information

The following references provide additional information on resource usage:

Book Chapter Section

Teradata RDBMS PM/API Reference

Other Performance Monitoring Tools

AMPUsage View

Teradata RDBMS Resource Usage Macros and Tables

Resource Usage Macros

• ResUsage Macro Names• ResUsage Macro Functions• ResNode Macros

Teradata RDBMS Data Dictionary1 – 24

Page 39: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewDIPVIEW Script

DIPVIEW Script

The DIPVIEW script allows database administration to install the data dictionary and system views. It is provided on the Teradata RDBMS CD-ROM or release tape.

The DIPVIEW script also creates the special user DBQM used to support the Database Query Manager (DBQM) feature. For details, see Teradata RDBMS Administration.

Teradata RDBMS Data Dictionary 1 – 25

Page 40: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewTracking Miscellaneous System Actions

Tracking Miscellaneous System Actions

Tracking System Events

The Software_Event_Log and Hardware_Event_Log views display, by date and time, any events that have affected processing, such as a memory parity error, a disabling of logons, a Teradata RDBMS restart, or execution of a PM/API SET COLLECT command, along with an associated message. The processor is identified when appropriate.

The LogOnOff view, because it chronologically records all logon and logoff activity as well as the reasons for unsuccessful logons and logoffs, allows you to detect actual and attempted security violations. This view also lets you know how long any user is connected to the Teradata RDBMS.

Tracking Logon Rules

The LogonRules view is used to review the rules generated by the GRANT LOGON and REVOKE LOGON statements. These statements define which user can log on from what mainframe or LAN host connection, and whether the logon string of the user is acceptable without a password.

The initial default is that all users may logon from all hosts, and that every logon string must contain a password. To change the default, use the GRANT LOGON and REVOKE LOGON statements.

Tracking Privileges

The UserRights view provides information about the privileges that have been granted to any user.

See the description of the GRANT statement in the Teradata RDBMS SQL Reference, Volume 4, for an explanation of the types of privileges and how they are granted.

If a more detailed audit trail is necessary, this information may be supplemented by log entries that provide an audit trail of the results of checks against requests to access table data. See also Teradata RDBMS Security Administration.

Teradata RDBMS Data Dictionary1 – 26

Page 41: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewSys_Calendar

Sys_Calendar

The DIPCAL SQL script must be run from the DIP utilities by the administrator to create the SYS_CALENDAR database and CALENDAR view.

The primary key of the calendar is the SQL “DATE” data type. The calendar dates range from 1900 to 2100 and are stored in a table in the SYS_CALENDAR database.

For more information on how to use the OLAP Calendar capabilities, see the section on Data Definitions in Teradata RDBMS SQL Reference, Volume 1.

Teradata RDBMS Data Dictionary 1 – 27

Page 42: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewMaintaining System Logs

Maintaining System Logs

The resource usage logs and the tables underlying the AMPUsage, AccessLog, LogOnOff, and Software_Event_Log views are not purged automatically by the system.

Outdated information in these tables should be deleted periodically by an authorized user such as a security, database, or system administrator, or by NCR support personnel.

Because the errors and events that comprise Software_Event_Log information are scrutinized in order to enhance the product, this information is often maintained by NCR field support personnel.

Purging Outdated Information

You must purge outdated AMPUsage information using the Teradata SQL DELETE statement. For example, the following statement could be used to purge information for account $M619 after an accounting period has closed.

DELETE FROM DBC.AMPUsageWHERE Accountname = ’$M619’;

A similar statement could be used to eliminate usage information after a user has been dropped from the system.

LogOnOff information also should be purged periodically to reclaim disk space. For example, the following statement purges LogOnOff information that is more than 90 days old:

DELETE FROM DBC.LogOnOffWHERE (DATE-Logdate) > 90;

Log entries that are more than 30 days old may be deleted from the access log by using the name of the DeleteAccessLog view as the parameter of the DELETE statement, as follows.

DELETE FROM DBC.DeleteAccessLog ALL ;

If preferred, you can periodically archive the contents of system tables to tape using the BTEQ .EXPORT command, ASF2, or the Archive/Recovery utility.

Teradata RDBMS Data Dictionary1 – 28

Page 43: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewOther System Objects

Other System Objects

The following system objects are not covered in detail in this manual:

Object Reference for More Information

SysAdmin.Fastlog table This internal table containing FastLoad information does not needed to be accessed directly by the user.

SystemFE database Teradata RDBMS SystemFE Macros

Resource Usage tables Teradata RDBMS Resource Usage Macros and Tables

Sys_Calendar database Teradata RDBMS SQL Reference, Volume 3.

Teradata RDBMS Data Dictionary 1 – 29

Page 44: Data Dictionary Views

Chapter 1: Teradata RDBMS Data Dictionary OverviewColumns with Hex Unicode Constants

Columns with Hex Unicode Constants

The columns listed in the following tables are stored with a CharType based on the system’s support of Japanese Language (see ”System Initializer Utility” in Teradata RDBMS Utilities).

Constants are converted to the _Unicode’..’XC format if they would otherwise not be sharable (see Teradata SQL Reference, Volume 3, "Data Types and Literals").

Database Name Table Name Column Name

DBC TableConstraints TableCheck

DBC TriggersTbl CreateText

DBC TVFields ColumnCheck

DBC TVM CreateText

Teradata RDBMS Data Dictionary1 – 30

Page 45: Data Dictionary Views

Chapter 2:

System Views

This chapter serves as a reference for users of system views and consists of the following:

• A brief description of the various types of users that have access to the system DBC views.

• A reference table describing the DBC views, the tables referenced by each view, the columns selected by that view, and the typical user of that view.

• A reference table that lists and describes all the columns referenced by the system views in alphabetical order including the data type and format of each column.

Note: In general, each column name is descriptive of the type of data referenced by that column.

In the online document, hypertext links for the system views table exist that allow you to go to the columns table and get the detailed information on any column that you select for a specified view.

Teradata RDBMS Data Dictionary 2 – 1

Page 46: Data Dictionary Views

Chapter 2: System ViewsUsers of DD Views

Users of DD Views

Many of the views in the Teradata RDBMS Data Dictionary may be restricted to special types of users, while others are accessible by all users. The ability to access views is controlled by granting of access rights by the system administrator. The following table defines the information needs of various types of users:

This type of user … Needs to know this information …

End • Objects to which the user has access

• Types of access available to the user• Access rights the user has granted to other users

Supervisory • How to create and organize databases • How to monitor space usage• How to define new users • How to allocate access privileges• How to create indexes• How to perform archiving operations

Teradata RDBMS system administrator

• Performance• Status and statistics• Errors• Accounting

Teradata RDBMS security administrator

• Access logging rules generated by the execution of BEGIN LOGGING statements

• Results of access checking events, logged as determined by the access logging rules

Operations control

Archive and recovery activities.

Teradata RDBMS Data Dictionary2 – 2

Page 47: Data Dictionary Views

Chapter 2: System ViewsX Version Views

X Version Views

In views that include an X version, the additional tables that are referenced by the X version of the same view are preceded by an X as the examples on this page show.

Note The DBC.UserDB and DBC.OwnerDB system views will not be covered in this section because they are not usually referenced directly by users. These views are used only to join other system tables and views (especially the X version of views).

View Name and Description Referenced Tables User Type Columns Selected

DBC.AccountInfo[X]

Provides information about the accounts the user can control, that is, accounts the user owns or can modify.

Accounts

Dbase

[X]AccessRights [X]Userdb

[X]Owners

Supervisory UserName

AccountName

Teradata RDBMS Data Dictionary 2 – 3

Page 48: Data Dictionary Views

Chapter 2: System ViewsSystem Views Reference

System Views Reference

The following table lists all the views included in the database DBC and includes a brief description of how the view is used, the referenced tables, and columns selected by that view.

You can view detailed information for a specific column in the view by using the index in this book, or online by clicking on the blue hypertext link for column name in the system views table, which automatically links you to that column description in the columns table.

View Name and DescriptionReferenced Tables and

ViewsUser Type Columns Selected Referenced column(s)

DBC.AccessLog

Displays, by row, the results of a privilege check performed in response to a request.

AccLogTbl Security Administrator

LogDateLogTimeLogonDateLogonTimeLogicalHostIdIFPNoSessionNoUserNameAccountNameOwnerNameAccessTypeFrequencyEventCountResultDatabaseNameTVMNameColumnNameStatementTypeStatementText

NoneNoneNoneNoneNoneNoneNoneDbase.DatabaseNameNoneDbase.DatabaseNameNoneNoneNoneNoneDbase.DatabaseNameTVM.TVMNameNoneNoneNone

Teradata RDBMS Data Dictionary2 – 4

Page 49: Data Dictionary Views

Chapter 2: System ViewsSystem Views Reference

View Name and DescriptionReferenced Tables

and ViewsUser Type Columns Selected Referenced column(s)

DBC.AccLogRules

Provides information about logging rules that are currently in effect on the system.

AccLogRuleTblDbaseTVM

Security Administrator

UserName

DatabaseName

TVMNameAcrCheckpointAcrCreateDatabaseAcrCreateMacroAcrCreateProcedureAcrCreateTableAcrCreateUserAcrCreateViewAcrDeleteAcrDropDatabaseAcrDropProcedureAcrDropMacroAcrDropTableAcrDropUserAcrDropViewAcrDumpAcrExecuteAcrExecuteProcedureAcrGrantAcrIndexAcrInsertAcrReferenceAcrRestoreAcrSelectAcrUpdateAcrCreateTriggerAcrDropTriggerCreatorName

CreateTimeStamp

Dbase.DatabaseNameAcclogTbl.UserNameDbase.DatabaseNameAcclogTbl.UserNameTVM.TVMNameNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneDbase.DatabaseNameAcclogTbl.UserNameNone

DBC.AccountInfo[X]

Gives the accounts the user can control, that is, accounts the user owns or can modify.

AccountsDbase[X]AccessRights [X]Userdb[X]Owners

Supervisory UserName

AccountName

Dbase.DatabaseNameAcclogTbl.UserNameNone

Teradata RDBMS Data Dictionary 2 – 5

Page 50: Data Dictionary Views

Chapter 2: System ViewsSystem Views Reference

DBC.AllRights

Gives every explicit right for the privileges on databases, users, tables, views, stored procedures, and macros that have been granted for every user on the system.

AccessRightsDbaseTVMTVFields

Administrator UserName

DatabaseName

TableNameColumnNameAccessRightGrantAuthorityGrantorNameAllnessFlagCreatorNameCreateTimeStamp

Dbase.DatabaseNameAcclogTbl.UserNameDbase.DatabaseNameAcclogTbl.UserNameTVM.TVMNameNoneNoneNoneNoneNoneDbase.DatabaseNameNone

DBC.AllSpace[X]

Gives both database and table space utilization.

DatabaseSpaceDbaseTVM[X]AccessRights[X]Owners

Administrator VprocDatabaseNameAccountNameTableNameMaxPermMaxSpoolMaxTempCurrentPermCurrentSpoolCurrentTempPeakPermPeakSpoolPeakTemp

NoneDbase.DatabaseNameNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNone

DBC.AllTempTables[X]

Gives the local temporary table materialized with the exact same definition as the base table.

TempTablesDbaseTVMSessionTbl

Administrator HostNoSessionNoUserNameB_DatabaseNameB_TableNameE_TableId

SessionTbl.HostNoSessionTbl.SessionNoDbase.DatabaseNameNoneNoneTVM.TVMId

DBC.All_RI_Children

Provides information about all tables in child-parent order. It is similar to the RI_Child_Tables view, but returns the names of databases, tables, and columns, instead of IDs

ReferencingTblsDbaseTVMTVFields

All users IndexIDIndexNameChildDBChildTableChildKeyColumnParentDBParentTableParentKeyColumnInconsistencyFlagCreatorNameCreateTimeStamp

NoneNoneDbase.DatabaseNameNoneNoneDbase.DatabaseNameNoneNoneNoneDbase.DatabaseNameNone

View Name and DescriptionReferenced Tables

and ViewsUser Type Columns Selected Referenced column(s)

Teradata RDBMS Data Dictionary2 – 6

Page 51: Data Dictionary Views

Chapter 2: System ViewsSystem Views Reference

DBC.All_RI_Parents

Provides information about all tables in parent-child order. It is similar to the RI_Parent_Tables view, but returns the names of databases, tables, and columns, instead of IDs.

ReferencedTblsDbaseTVMTVFields

All users IndexIDIndexNameParentDBParentTableParentKeyColumnChildDBChildTableChildKeyColumnInconsistencyFlagCreatorNameCreateTimeStamp

NoneNoneDbase.DatabaseNameNoneNoneDbase.DatabaseNameNoneNoneNoneDbase.DatabaseNameNone

DBC.AmpUsage

Gives CPU and I/O accounting information saved by the DBC.

Acctg Administrator AccountNameUserNameCPUTimeVprocVprocTypeModelDiskIO

NoneDbase.DatabaseNameNoneNoneNoneNoneNone

DBC.Association

Retrieves information about tables that have been ported using the Dump/Restore facility.

DBCAssociationDbaseTVM

Operations Control

DatabaseName

TableNameEventNumOriginal_DatabaseNameOriginal_TableNameOriginal_TableKindOriginal_VersionOriginal_ProtectionTypeOriginal_JournalFlagOriginal_CreatorNameOriginal_CommentString

RCEvent.DatabaseNameDbase.DatabaseNameNoneNoneNoneNoneNoneNoneNoneNoneNoneNone

DBC.CharSets

Returns the names assigned to user-defined character sets currently installed on the RDBMS.

Translation End CharSetName None

View Name and DescriptionReferenced Tables

and ViewsUser Type Columns Selected Referenced column(s)

Teradata RDBMS Data Dictionary 2 – 7

Page 52: Data Dictionary Views

Chapter 2: System ViewsSystem Views Reference

DBC.CharTranslations

Shows hexadecimal codes inserted by the Teradata RDBMS system administrator to form translation tables that enable the Teradata RDBMS to store and manipulate non-English character sets.

Translation End CharSetNameCharSetIdInstallFlagE2IE2IUpI2EI2EUp

NoneNoneNoneNoneNoneNoneNone

DBC.Children[X]

Provides the names of all the databases under a user.

OwnersDbase[X]AccessRights[X]Userdb

Administrator ChildParent

Dbase.DatabaseNameDbase.DatabaseName

DBC.Collations

Provides definitions for standard Swedish and Norwegian collations as well as custom collation sequence definitions.

CollationTbl End CollNameCollInstallCollEqvClassCollOrderCSCollOrderUC

NoneNoneNoneNoneNone

View Name and DescriptionReferenced Tables

and ViewsUser Type Columns Selected Referenced column(s)

Teradata RDBMS Data Dictionary2 – 8

Page 53: Data Dictionary Views

Chapter 2: System ViewsSystem Views Reference

DBC.Columns[X]

Provides information about the columns of tables or views, or the parameters of stored procedures and macros that the user can access.

TVFieldsDbaseTVM[X]AccessRights[X]Owners

End DatabaseName

TableNameColumnNameColumnFormatColumnTitleColumnTypeColumnLengthDefaultValueNullableCommentStringDecimalTotalDigitsDecimalFractionalDigitsColumnId

UpperCaseFlagCompressibleCompressValueColumnConstraintConstraintCountCreatorNameCreateTimeStampLastAlterNameLastAlterTimeStampCharTypeSPParameterType

RCEvent.DatabaseNameAcclogTbl.UserNameNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneAccessrights.FieldIdReferencingTbls.ForeignKeyFIDReferencedTbls.ParentKeyFIDIndexes.FieldIdNoneNoneNoneNoneNoneDbase.DatabaseNameNoneNoneNoneNoneNone

DBC.ColumnStats

Displays statistics for the columns in a table for which statistics have been collected.

TVFieldsDbaseTVM

All users DatabaseNameIFieldID FieldStatisticsTVMNameI

NoneNoneNoneNone

DBC.CSPSessionInfo(Reserved for internal use.)

Returns information on crashdumps.

SessionTbl OperationsControl

SessionNo,HostNo,StartMBox,LogonSource

View Name and DescriptionReferenced Tables

and ViewsUser Type Columns Selected Referenced column(s)

Teradata RDBMS Data Dictionary 2 – 9

Page 54: Data Dictionary Views

Chapter 2: System ViewsSystem Views Reference

DBC.Databases[X]

Provides information about the databases that the user can access.

Dbase[X]AccessRights[X]Userdb[X]Owners

End DatabaseName

CreatorNameOwnerNameAccountNameProtectionTypeJournalFlagPermSpaceSpoolSpaceTempSpaceCommentStringCreateTimeStampLastAlterNameLastAlterTimeStampDBKind

RCEvent.DatabaseNameAcclogTbl.UserNameDbase.DatabaseNameDbase.DatabaseNameNoneNoneNoneNoneNoneNoneNoneNoneDbase.DatabaseNameNoneNone

DBC.Databases2

Provides ID definition information about databases.

Dbase All users DatabaseNameDatabaseId

UnResolvedRICount

NoneAccounts.UserIdDatabasespace.DatabaseIdAccessrights.UserIdOwners.OwnerIdTVM.DatabaseIdReferencingTbls.Refer-encing.DbIdDBCAssociation.DatabaseIdOwners.OwneeIdReferencedTbls.ReferencedDbIdTableConstraints.DbaseIdTriggertbl.DatabaseIdNone

DBC.Database_Default_Journals[X]

Provides the name for each database that has a default journal table.

DbaseTVM[X]AccessRights[X]Owners

End DatabaseNameJournal_DBJournalName

Dbase.DatabaseNameDbase.DatabaseNameNone

View Name and DescriptionReferenced Tables

and ViewsUser Type Columns Selected Referenced column(s)

Teradata RDBMS Data Dictionary2 – 10

Page 55: Data Dictionary Views

Chapter 2: System ViewsSystem Views Reference

DBC.DBCInfo

Provides information on the current version and release of the DBC. It is updated during each system restart.

DBCInfoTbl Administrator InfoKeyInfoData

NoneNone

DBC.DeleteAccessLog[X]

Provides a means of controlling deletion of the DBC. AccLogTbl. Only rows older than 30 days from the current date can be deleted.

AccLogTbl[X]Dbase[X]Owners[X]Userdb

Security Administrator

LogDateLogTime

NoneNone

DBC.DeleteOldInDoubt

Displays those rows in the DBC.InDoubtResLog table that are more than 30 days old.

InDoubtResLog Administrator LogicalHostIdCoordTaskIdLogonUserNameCommitOrRollbackCompletionDateUserLogonTimeSessionNumberRunUnitIdResolvingUserLogonNameUserLogonDateCompletionTimeOptions

NoneNoneDbase.DatabaseNameNoneNoneNoneNoneNoneDbase.DatabaseName

NoneNoneNone

DBC.DiskSpace[X]

Provides AMP-by-AMP information about disk space usage, including spool, for each database or account that the use can access.

DatabaseSpaceDbase[X]AccessRights[X]Userdb[X]Owners

Administrator VprocDatabaseNameAccountNameMaxPermMaxSpoolMaxTempCurrentPermCurrentSpoolCurrentTempPeakPermPeakSpoolPeakTemp

NoneDbase.DatabaseNameNoneNoneNoneNoneNoneNoneNoneNoneNoneNone

View Name and DescriptionReferenced Tables

and ViewsUser Type Columns Selected Referenced column(s)

Teradata RDBMS Data Dictionary 2 – 11

Page 56: Data Dictionary Views

Chapter 2: System ViewsSystem Views Reference

DBC.Events[X]

Provides a row for each execution of a Host Utilityfunction or of a DBC/SQL checkpoint statement.

RCEvent[X]Dbase[X]AccessRights[X]Userdb[X]Owners

Operations Control

CreateDateCreateTimeEventNum

EventTypeUserNameDatabaseNameObjectTypeAllAMPsFlagRestartSeqNum

OperationInProcessTableNameCheckpointNameLinkingEventNumDataSetNameLockModeJournalUsedJournalSavedIndexPresentDupeDumpSet

NoneNoneRCConfiguration.EventNumRCMedia.EventNumberNoneDbase.DatabaseNameDbase.DatabaseNameNoneNoneRCConfiguration.RestartSeqNumNoneTVM.TVMNameNoneNoneNoneNoneNoneNoneNoneRCMedia.DupeDumpSet

DBC.Events_Con-figuration[X]

Provides a row for each execution of a Host Utility function or of a DBC/SQL checkpoint statement, which was executed on a subset of the AMP processors.

RCEventRCCon-figuration[X]Dbase[X]AccessRights[X]Userdb[X]Owners

Operations Control

VprocCreateDateCreateTimeEventNum

EventTypeUserNameLogProcessorPhyProcessorProcessorStateRestartSeqNum

NoneNoneNoneRCConfiguration.EventNumRCMedia.EventNumberNoneDbase.DatabaseNameNoneNoneNoneNone

DBC.Events_Media[X]

Provides a row for each execution of a Host Utility dump or restore function, which created or used removable media.

RCEventRCMedia[X]Dbase[X]AccessRights[X]Userdb[X]Owners

Operations Control

CreateDateCreateTimeEventNum

EventTypeUserNameDataSetNameVolSerialIdVolSequenceNumDupeDumpSet

NoneNoneRCConfiguration.EventNumRCMedia.EventNumberNoneDbase.DatabaseNameNoneNoneNoneNone

View Name and DescriptionReferenced Tables

and ViewsUser Type Columns Selected Referenced column(s)

Teradata RDBMS Data Dictionary2 – 12

Page 57: Data Dictionary Views

Chapter 2: System ViewsSystem Views Reference

DBC.Hardware_Event_Log

Provides information about system failures, error conditions and other events originating in the Parallel Data Extensions (PDE) or the Teradata RDBMS.

HW_Event_Log Operations Control

TheDateTheTimeEvent_TagCategorySeverityPrimary_Part_NumberRevision_LevelSecondary_Part_NumberSerial_NumberPMAModule_TypeSlotSlot_TypeSubSlotSubSlot_TypeFW_VersionVcc_MarginFrequency_MarginVcc_VoltsVcc_AmpsTemperatureLineTextError_Data

NoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNone

DBC.HostsInfo

Provides information about any user-defined character sets assigned by the Teradata RDBMS system administrator as the default for the client systems in the Teradata RDBMS configuration.

Hosts End LogicalHostIdHostNameDefaultCharSet

NoneNoneNone

DBC.IndexStatsDisplays statistics on the indexes defined on a table for which statistics have been collected.

IndexesDbaseTVM

All users DatabaseNameIIndexNumberIndexStatisticsTVMNameI

NoneNoneNoneNone

View Name and DescriptionReferenced Tables

and ViewsUser Type Columns Selected Referenced column(s)

Teradata RDBMS Data Dictionary 2 – 13

Page 58: Data Dictionary Views

Chapter 2: System ViewsSystem Views Reference

DBC.Indices[X]

Describes each of the indexes on each table that the user can access.

IndexesDbaseTVMTVFields[X]AccessRights[X]Owners

End DatabaseNameTableNameIndexNumberIndexTypeUniqueFlagIndexNameColumnNameColumnPositionCreatorNameCreateTimeStampLastAlterNameLastAlterTimeStamp

Dbase.DatabaseNameTVM.TVMNameNoneNoneNoneNoneNoneNoneDbase.DatabaseNameNoneDbase.DatabaseNameNone

DBC.InDoubtLog

Displays the contents of the DBC.InDoubtResLog table.

InDoubtResLog Administrator LogicalHostIdCoordTaskIdLogonUserNameUserLogonDateCompletionDateCommitOrRollBackSessionNumberRunUnitIdResolvingUserLogonNameUserLogonTimeCompletionTimeOptions

NoneNoneDbase.DatabaseNameNoneNoneNoneNoneNoneDbase.DatabaseName

NoneNoneNone

DBC.Journals[X]

Provides specific information about journal to table mapping for each data table the user can access.

DbaseTVM[X]AccessRights[X]Owners

End Tables_DBTableNameJournals_DB

JournalName

Dbase.DatabaseNameNoneRCEvent.DatabaseNameDbase.DatabaseNameNone

DBC.LogOnOff

Gives the DBA access to the session event table that records logon, logoffs, and attempted logons.

EventLog Security Administrator

LogDateLogTimeUserNameAccountNameEventLogicalHostIdIFPNoSessionNoLogonDateLogonTimeLogonSource

NoneNoneDbase.DatabaseNameDbase.AccountNameNoneNoneNoneNoneNoneNoneNone

View Name and DescriptionReferenced Tables

and ViewsUser Type Columns Selected Referenced column(s)

Teradata RDBMS Data Dictionary2 – 14

Page 59: Data Dictionary Views

Chapter 2: System ViewsSystem Views Reference

DBC.LogonRules

Retrieves information about logon rules generated as a result of successfully processed GRANT/REVOKE LOGON statements.

LogonRuleTblDbase

SecurityAdministrator

UserName

LogicalHostIdLogonStatusNullPasswordCreatorNameCreateTimeStamp

Dbase.DatabaseNameAcclogTbl.UserNameNoneNoneNoneDbase.DatabaseNameNone

DBC.RCC_Con-figuration[X]

Provides a row for each execution of a Host Utility function or of a Teradata SQL checkpoint statement, which was executed on a subset of the AMP processors.

RCCon-figuration[X]Dbase[X]AccessRights[X]Userdb[X]Owners

Operations Control

EventNumLogProcessorPhyProcessorProcessorStateRestartSeqNumVproc

RCEvent.EventNumNoneNoneNoneNoneNone

DBC.RCC_Media[X]

Provides a row for each execution of a Host Utility dump or restore function that created or used removable media.

RCMedia[X]Dbase[X]AccessRights[X]Userdb[X]Owners

Operations Control

EventNumVolSerialIdVolSequenceNumDupeDumpSet

RCMediaEventNumberNoneNoneNone

DBC.RI_Child_Tables

The RI_Child_Tables view provides information about tables in child-parent order. It is similar to the DBC.All_RI_Children view but returns the internal IDs of databases, tables, and columns instead of names.

ReferencingTblsDbase

All users IndexIDIndexNameChildDbIDChildTID

ChildKeyFIDParentDbIDParentTID

ParentKeyFIDInconsistencyFlagCreatorNameCreateTimeStamp

NoneNoneDbase.DatabaseIdTVM.TVMIdTVFields.TableIdTVFields.FieldIdDbase.DatabaseIdTVM.TVMIdTVFields.TableIdTVFields.FieldIdNoneDbase.DatabaseNameNone

View Name and DescriptionReferenced Tables

and ViewsUser Type Columns Selected Referenced column(s)

Teradata RDBMS Data Dictionary 2 – 15

Page 60: Data Dictionary Views

Chapter 2: System ViewsSystem Views Reference

DBC.RI_Distinct_Children

Provides information about tables in child-parent order without the duplication that could result from multi-column foreign keys.

ReferencingTblsDbaseTVM

All users IndexIDIndexNameChildDBChildTableParentDBParentTableInconsistencyFlagCreatorNameCreateTimeStamp

NoneNoneDbase.DatabaseNameNoneDbase.DatabaseNameNoneNoneDbase.DatabaseNameNone

DBC.RI_Distinct_Parents

Provides information about tables in parent-child order without the duplication that could result from multi-column foreign keys.

ReferencingTblsDbaseTVM

All users IndexIDIndexNameParentDBParentTableChildDBChildTableInconsistencyFlagCreatorNameCreateTimeStamp

NoneNoneDbase.DatabaseNameNoneDbase.DatabaseNameNoneNoneDbase.DatabaseNameNone

DBC.RI_Parent_Tables

Provides information about all tables in parent-child order.

ReferencingTblsDbase

All users IndexIDIndexNameParentDbIDParentTID

ParentKeyFIDChildDbIDChildTID

ChildKeyFIDInconsistencyFlagCreatorNameCreateTimeStamp

NoneNoneDbase.DatabaseIdTVM.TVMIdTVFields.TableIdTVFields.FieldIdDbase.DatabaseIdTVM.TVMIdTVFields.TableIdTVFields.FieldIdNoneDbase.DatabaseNameNone

DBC.SecurityDefaults

Describes the password features selected on the site.

SysSecDefaults SecurityAdministrator

ExpirePasswordPasswordMinCharPasswordMaxCharPasswordDigitsPasswordSpecCharMaxLogonAttemptsLockedUserExpirePasswordReuse

NoneNoneNoneNoneNoneNoneNoneNone

View Name and DescriptionReferenced Tables

and ViewsUser Type Columns Selected Referenced column(s)

Teradata RDBMS Data Dictionary2 – 16

Page 61: Data Dictionary Views

Chapter 2: System ViewsSystem Views Reference

DBC.SecurityLog[X]

Provides access to the DBC.AccLogTbl. Rows are logged as directed by BEGIN/END LOGGING.

AccLogTbl[X]Dbase[X]Owners[X]Userdb

SecurityAdministrator

LogDateLogTimeLogTypeUserNameAccountNameDatabaseNameTableNameText

NoneNoneNoneDbase.DatabaseNameNoneDbase.DatabaseNameTVM.TVMNameNone

DBC.SessionInfo[X]

Gives one row for each time the user is logged on; used as a review of accounts set by user.

SessionTbl Administrator UserNameAccountNameSessionNoDefaultDataBaseIFPNoPartitionLogicalHostIdHostNoCurrentCollationLogonDateLogonTimeLogonSequenceNoLogonSourceExpiredPasswordTwoPCModeTransaction_Mode

Dbase.DatabaseNameDbase.AccountNameTemptables.SessionNoDbase.DatabaseNameNoneNoneNoneTempTables.HostNoNoneNoneNoneNoneNoneNoneNoneNone

DBC.SHOWCOLCHECKS

Provides information about column constraints for a table in a database.

TVFieldsDbaseTVM

All users DatabaseNameTableNameColumnNameColCheckCreatorNameCreateTimeStamp

Dbase.DatabaseNameTVM.TVMNameNoneNoneDbase.DatabaseNameNone

DBC.SHOWTBLCHECKS

Provides information about table constraints for a database.

TableConstraintsDbaseTVM

All users DatabaseNameTableNameCheckNameTblCheckCreatorNameCreateTimeStamp

Dbase.DatabaseNameTVM.TVMNameNoneNoneDbase.DatabaseNameNone

View Name and DescriptionReferenced Tables

and ViewsUser Type Columns Selected Referenced column(s)

Teradata RDBMS Data Dictionary 2 – 17

Page 62: Data Dictionary Views

Chapter 2: System ViewsSystem Views Reference

DBC.Software_Event_Log

Provides information about logged software events originating in the Parallel Data Extensions (PDE) or the Teradata RDBMS.

SW_Event_Log Operations Control

TheDateTheTimeEvent_TagCategorySeverityPMAVprocPartitionTaskFunctionSW_VersionLineTextStacktraceError_Data

NoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneNone

DBC.Table_Level Constraints

Provides information about table constraints for a database.

TableConstraintsDbaseTVM

All users DatabaseNameTableNameConstraintNameConstraintTextCreatorNameCreateTimeStamp

Dbase.DatabaseNameTVM.TVMNameNoneNoneDbase.DatabaseNameNone

DBC.Tables[X]

Provides information about the tables, views, stored procedures, join indexes, or macros that the user can access.

TVMDbase[X]AccessRights[X]Owners

All users DatabaseNameTableNameVersionTableKindProtectionTypeJournalFlagCreatorNameRequestTextCommentStringParentCountChildCountNamedTblCheckCountUnnamedTblCheckExistPrimaryKeyIndexIdCreateTimeStampLastAlterNameLastAlterTimeStamp

Dbase.DatabaseNameTVM.TVMNameNoneNoneNoneNoneDbase.DatabaseNameNoneNoneNoneNoneNoneNoneNoneNoneDbase.DatabaseNameNone

View Name and DescriptionReferenced Tables

and ViewsUser Type Columns Selected Referenced column(s)

Teradata RDBMS Data Dictionary2 – 18

Page 63: Data Dictionary Views

Chapter 2: System ViewsSystem Views Reference

DBC.Tables2

Provides ID definition information about tables. It is similar to the Tables view but includes the ID of the table and database instead of the other information (Version, TableKind, etc.) provided by the Tables view.

TVM All users TVMNameTVMId

DatabaseId

ParentCountChildCount

TVM.TVMNameAcclogRuleTbl.TVMIdDatabaseSpace.tableIdAccessrights.TVMIdTemptables.BaseTableIdReferencingTbls.Refer-encingTblIdReferencedTbls.Refer-encedTblIdDBCAssociation.TVMIdTVFields.TableIdDbase.JournalIdIndexes.TableIdTableconstraints.TVMIdAccessrights.DatabaseIdOwners.owneeIdDbase.DatabaseIdNoneNone

DBC.TableSize[X]

Provides AMP-by AMP information about disk space usage, excluding spool, for any database, data table, journal table, or account the user can access.

DataBaseSpaceDbaseTVM[X]AccessRights[X]Owners

End VprocDatabaseNameAccountNameTableNameCurrentPermPeakPerm

NoneDbase.DatabaseNameNoneTVM.TVMNameNoneNone

DBC.Triggers

Provides information about event-driven, specialized procedures attached to a single table and stored in the database.

TriggersTblDbaseTVM

End DatabaseNameTableNameTriggerNameEnabledFlagActionTimeEventKindOrderNumberTriggerCommentRequestTextCreatorNameCreateTimeStampLastAlterNameLastAlterTimeStamp

Dbase.DatabaseNameTVM.TVMNameNoneNoneNoneNoneNoneNoneNoneNoneDbase.DatabaseNameNoneDbase.DatabaseNameNone

View Name and DescriptionReferenced Tables

and ViewsUser Type Columns Selected Referenced column(s)

Teradata RDBMS Data Dictionary 2 – 19

Page 64: Data Dictionary Views

Chapter 2: System ViewsSystem Views Reference

DBC.UserGrantedRights

Describes the explicit rights that the user has granted to other users.

AccessRightsDbaseTVMTVFieldsOwnerdb

End DatabaseNameTableNameColumnNameGranteeGrantAuthorityAccessRightAllnessFlagCreatorNameCreateTimeStamp

Dbase.DatabaseNameNoneNoneNoneNoneNoneNoneDbase.DatabaseNameNone

DBC.UserRights

Describes the explicit rights of each user for access to tables, views, join indexes, stored procedures or macros.

AccessRightsDbaseTVMTVFieldsUserdb

End DatabaseNameTableNameColumnNameAccessRightGrantAuthorityGrantorNameCreatorNameCreateTimeStamp

Dbase.DatabaseNameTVM.TVMNameNoneNoneNoneNoneDbase.DatabaseNameNone

View Name and DescriptionReferenced Tables

and ViewsUser Type Columns Selected Referenced column(s)

Teradata RDBMS Data Dictionary2 – 20

Page 65: Data Dictionary Views

Chapter 2: System ViewsSystem Views Reference

DBC.Users

Describes in detail all information about users that you control, includingpasswords.

DbaseAccessRightsUserdbOwners

Supervisory UserName

CreatorNamePasswordLastModDatePasswordLastModTimeOwnerNamePermSpaceSpoolSpaceTempSpaceProtectionTypeJournalFlagStartupStringDefaultAccountDefaultDatabaseCommentStringDefaultCollationPasswordChgDateLockedDateLockedTimeLockedCountTimeZoneHourTimeZoneMinuteDefaultDateFormCreateTimeStampLastAlterName

LastAlterTimeStampDefaultCharType

RCEvent.DatabaseNameAcclogTbl.UserNameDbaseDatabaseNameNoneNoneDbase.DatabaseNameNoneNoneNoneNoneNoneNoneNoneDbase.DatabaseNameNoneNoneNoneNoneNoneNoneNoneNoneNoneNoneRCEvent.DatabaseNameAcclogTbl.UserNameNoneNone

DBC.User_Default_Journals[X]

Describes the users that have default journal tables, including the name and database for each journal table.

DbaseTVMAccessRightsOwners

End UserName

Journal_DB

JournalName

RCEvent.DatabaseNameAcclogTbl.UserNameRCEvent.DatabaseNameAcclogTbl.UserNameNone

View Name and DescriptionReferenced Tables

and ViewsUser Type Columns Selected Referenced column(s)

Teradata RDBMS Data Dictionary 2 – 21

Page 66: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

System View Columns Reference

The following columns table describes the columns of each of the system views in the DBC in alphabetical order. In addition, it includes information on which views select that column, and the data type and format of the column.

Using the information included in the view columns table, you can write a SELECT statement that will return the information you want.

View Column Name Description Data Type Format Associated Views

AccessRight Returns a code that identifies a privilege granted on the object. Possible values for privilege type are as follows:

CHARNOT NULL

X(2) AllRightsUserGrantedRightsUserRights

• AS = ABORT SESSION

• CD = CREATE DATABASE

• CG = CREATE TRIGGER

• CM = CREATE MACRO

• CP = CHECKPOINT

• CT = CREATE TABLE

• CU = CREATE USER

• CV = CREATE VIEW

• D = DELETE

• DD = DROP DATABASE

• DG = DROP TRIGGER

• DM = DROP MACRO

• DP = DUMP

• DT = DROP TABLE

• DU = DROP USER

• DV = DROP VIEW

• E = EXECUTE (MACRO)

• I = INSERT

• IX = INDEX

• MR = MONITOR RESOURCE

• MS = MONITOR SESSION

• PC = CREATE PROCEDURE

• PD = DROP PROCEDURE

• PE = EXECUTE PROCEDURE

• R = RETRIEVE/SELECT

• RF = REFERENCE

• RS = RESTORE

• SS = SET SESSION RATE

• SR = SET RESOURCE RATE

• U = UPDATE

Teradata RDBMS Data Dictionary2 – 22

Page 67: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

AccessType(for “Acr”-type columns)

Returns the type of privilege for which the check that generated this log entry was performed.

CHARNOT NULL

X(2) AccessLog

• AN=ANY PRIVILEGE *(Indicates a HELP or SHOW statement for which at least one privilege, but no specific privilege, is required.)

• AS = ABORT SESSION

• CD = CREATE DATABASE

• CG = CREATE TRIGGER

• CM = CREATE MACRO

• CP = CHECKPOINT

• CT = CREATE TABLE

• CU = CREATE USER

• CV = CREATE VIEW

• D = DELETE

• DD = DROP DATABASE

• DG = DROP TRIGGER

• DM = DROP MACRO

• DP = DUMP

• DT = DROP TABLE

• DU = DROP USER

• DV = DROP VIEW

• E = EXECUTE

• G = GRANT

• I = INSERT

• IX = INDEX

• HR = HUT RELEASE LOCK *(Indicates that a client system utility lock is involved, which could require a check for one or more of the privileges associated with DUMP and RESTORE.)

• MR = MONITOR RESOURCE

• MS = MONITOR SESSION

• PC = CREATE PROCEDURE

• PD = DROP PROCEDURE

• PE = EXECUTE PROCEDURE

• R = RETRIEVE/SELECT

• RF = REFERENCE

• RS = RESTORE

• SS = SET SESSION RATE

• SR = SET RESOURCE RATE

• U = UPDATE

• WL = WRITE LOCK *(Indicates that a LOCKING objectname “FOR WRITE” is involved, which may require checks for one or more of the following privileges: INSERT, UPDATE, DELETE.)

* Indicates the statement required multiple checks

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary 2 – 23

Page 68: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

AccountName Returns the account in effect when the request that generated this log entry was submitted.

VARCHAR NOT NULL

X(30) AccessLogSecurityLog[X]

Note: The system account name SYSTEMACCOUNTNO tracks console utility activity such as table rebuild, Diskcopy, or Scandisk.

CHAR NOT NULL

X(30) AccountInfo[X]AllSpace[X]AMPUsageDatabases[X]DiskSpace[X]LogOnOffSessionInfo[X]TableSize[X]

AcrCheckPoint Returns the logging in effect for the CHECKPOINT privilege on the objects or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: CPT

AccLogRules

AcrCreateDatabase Returns the logging in effect for the CREATE DATABASE privilege on the objects or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: CDB

AccLogRules

AcrCreateMacro Returns the logging in effect for the CREATE MACRO privilege on the objects or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: CMC

AccLogRules

AcrCreateProcedure Returns the logging in effect for the CREATE PROCEDURE privilege on the objects or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: CSP

AccLogRules

AcrCreateTable Returns the logging in effect for the CREATE TABLE privilege on the objects or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: CTB

AccLogRules

AcrCreateTrigger Returns the logging in effect for the CREATE TRIGGER privilege on the objects or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: CTG

AccLogRules

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary2 – 24

Page 69: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

AcrCreateUser Returns the logging in effect for the CREATE USER privilege on the objects or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: CUS

AccLogRules

AcrCreateView Returns the logging in effect for the CREATE VIEW privilege on the objects or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: CVW

AccLogRules

AcrDelete Returns the logging in effect for the DELETE privilege on the objects or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: DEL

AccLogRules

AcrDropDatabase Returns the logging in effect for the DROP DATABASE privilege on the objects or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: DDB

AccLogRules

AcrDropMacro Returns the logging in effect for the DROP MACRO privilege on the objects or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: DMC

AccLogRules

AcrDropProcedure Returns the logging in effect for the DROP PROCEDURE privilege on the objects or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: DSP

AccLogRules

AcrDropTable Returns the logging in effect for the DROP TABLE privilege on the objects or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: DTB

AccLogRules

AcrDropTrigger Returns the logging in effect for the DROP TRIGGER privilege on the objects or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: DTG

AccLogRules

AcrDropUser Returns the logging in effect for the DROP USER privilege on the objects or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: DUS

AccLogRules

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary 2 – 25

Page 70: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

AcrDropView Returns the logging in effect for the DROP VIEW privilege on the objects or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: DVW

AccLogRules

AcrDump Returns the logging in effect for the DUMP privilege on the objects or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: DMP

AccLogRules

AcrExecute Returns the logging in effect for the EXECUTE privilege on the objects or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: EXE

AccLogRules

AcrExecuteProcedure

Returns the logging in effect for the EXECUTE PROCEDURE privilege on the objects or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: ESP

AccLogRules

AcrGrant Returns the logging in effect for the GRANT privilege on the objects or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: GRT

AccLogRules

AcrIndex Returns the logging in effect for the CREATE/DROP INDEX privilege on the object(s) or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: IDX

AccLogRules

AcrInsert Returns the logging in effect for the INSERT privilege on the objects or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: INS

AccLogRules

AcrReference Returns the logging in effect for the Reference privilege on the object(s) or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: REF

AccLogRules

AcrRestore Returns the logging in effect for the RESTORE privilege on the objects or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: RST

AccLogRules

AcrSelect Returns the logging in effect for the SELECT privilege on the objects or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: SEL

AccLogRules

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary2 – 26

Page 71: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

AcrUpdate Returns the logging in effect for the UPDATE privilege on the objects or users (or both) to which the rule applies.

CHAR NOT NULL

X(3)Title: UPD

AccLogRules

ActionTime Returns a code to signify when, in relation to the SQL statement, the trigger is fired:

• B = Before• A = After• I = Instead of the

statement

CHAR UPPERCASE NOT NULL

X(1) Triggers

AllAMPsFlag Returns a code that indicates whether the event was executed on all AMPs, clusters, or processors. The codes are as follows:

• A = all AMPs used• C = all Clusters• P = all Processors

CHAR NOT NULL

X(1) Events[X]

AllnessFlag Returns Y (yes) or N (no) to indicate whether or not the privilege was granted to all subordinate users, or to all users who are owned by the grantee.

CHAR UPPERCASE NOT NULL

X(1) AllRightsUserGrantedRights

B_DatabaseName Returns the name of the database in which the temporary table resides

CHAR(30)NOT NULL

X(30) AllTempTables[X]

B_TableName Returns the name of the base temporary table.

CHAR(30)NOT NULL

X(30) AllTempTables[X]

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary 2 – 27

Page 72: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

Category Shows the category code assigned to a software event. Possible values are as follows:

• 0 None• 1 CPU Hardware• 2 Memory Hardware• 3 TDN Hardware• 4 Disk Hardware• 5 Channel Hardware• 6 Host

• 7 Driver• 8 Resource• 9 System• 10 User• 11 Occurrence• 12 Abnormal• 52 Base TP• 64 Max TP

BYTEINT Z9 Software_Event_Log

Returns the category code assigned to a hardware event. Possible values are:

P = Permanent events

T = Transient events

CHAR X(1) Hardware_Event_Log

CharSetId Returns the number assigned to the character set defined by this row.

BYTEINTNOT NULL

ZZ9 CharTranslations

CharSetName Returns the name of a user-defined character set that is installed and available for the current session, or the name assigned to the character set defined by this row.

CHAR UPPERCASE NOT NULL

X(30) CharSetsCharTranslations

CharType Returns the type of the different character data types as follows: 1 for Latin, 2 for Unicode, 3 for KanjiSJIS, 4 for Graphic, and 5 for Kanji1, and 0 for all other data types.

SMALLINT ---,--9 Columns[X]

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary2 – 28

Page 73: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

CheckName Returns the name of the table-level check. This field is NULL if this is an unnamed table check.

CHAR X(30) SHOWTBLCHECKS

CheckpointName Returns the checkpoint name as specified by the user in the CHECKPOINT statement.

VARCHAR X(30) Events[X]

Child Returns the name of a referencing database or user.

CHAR NOT NULL

X(30) Children[X]

ChildCountC Returns the count of the referencing tables for the table.

SMALLINT NOT NULL

---,--9 Tables[X]Tables2

ChildDb Returns the name of the referencing database.

CHAR NOT NULL

X(30) All_RI_ChildrenAll_RI_ParentsRI_Distinct_ChildrenRI_Distinct_Parents

ChildDbId Returns the database ID of the referencing table.

BYTE NOT NULL

X(8) RI_Child_TablesRI_Parent_Tables

ChildKeyColumn Returns the name of a column in the referencing key.

CHAR NOT NULL

X(30) All_RI_ChildrenAll_RI_Parents

ChildKeyFID Returns the field ID of a column in the referencing key.

SMALLINT NOT NULL

---,--9 RI_Child_TablesRI_Parent_Tables

ChildTable Returns the name of the referencing table.

CHAR NOT NULL

X(30) All_RI_ChildrenAll_RI_ParentsRI_Distinct_ChildrenRI_Distinct_Parents

ChildTID Returns the table ID of the referencing table.

BYTE NOT NULL

X(12) RI_Child_TablesRI_Parent_Tables

ColCheck Returns the unresolved text for the column-level check condition.

VARCHAR(8192)

X(255) SHOWCOLCHECKS

CollEqvClass Returns the value of the equivalence class assigned to each character. Equivalence also is the first level of comparison in determining the collation sequence.

BYTE NOT NULL

X(512) Collations

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary 2 – 29

Page 74: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

CollInstall Returns the install flag for the collation. The option returns Y (yes) if the collation is installed when the Teradata RDBMS is started and N (no) if the collation is not installed when the Teradata RDBMS is started. This flag applies only to multinational collation. Other collations are never installed.

CHAR NOT NULL

X(1) Collations

CollName Returns the name of the collation sequence. Only the collation sequence with name MULTINATIONAL and the collInstall flag set to Y is installed on the Teradata RDBMS.

CHAR NOT NULL

X(30) Collations

CollOrderCS Returns the value assigned to each character to determine the relative order of the characters within the same class for second level, case-specific comparison.

BYTENOT NULL

X(512) Collations

CollOrderUC Returns the value assigned to each character to determine the relative order of the characters within the same class for second level, uppercase comparison.

BYTE NOT NULL

X(512) Collations

ColumnConstraint Returns the condition text for column-level check.

VARCHAR (8192)

X(255) Columns[X]

ColumnFormat Returns the format of a column or parameter.

CHAR X(30) Columns[X]

ColumnId Returns a two-byte value specifying the internal identifier for this column.

SMALLINT NOT NULL

---,--9 Columns[X]

ColumnLength Returns the length of a column as the maximum number of bytes used to physically store a column value in the row of a table.

SMALLINT ZZ,ZZ9 Columns[X]

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary2 – 30

Page 75: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

ColumnName Returns the column name that was entered on the access log.

VARCHAR X(30) AccessLog

Returns the column name or parameter.

CHAR NOT NULL

X(30) Columns[X]Indices[X]

Returns the column name to which a privilege has been granted.

CHAR NOT NULL

X(30) AllRightsUserGrantedRightsUserRights

Returns the column name having column-level checks.

CHAR NOT NULL

X(30) SHOWCOLCHECKS

ColumnPosition Returns the position of the column in the index. For a composite index, this indicates the order of the columns making up the index.

SMALLINT NOT NULL

Z9 Indices[X]

ColumnTitle Returns any column heading. VARCHAR X(60) Columns[X]

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary 2 – 31

Page 76: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

ColumnType Returns column name or parameter in the following formats:

• AT = TIME

• BF = BYTE

• BV = VARBYTE

• CF = CHAR

• CV = VARCHAR

• D = DECIMAL

• DA = DATE

• DH = INTERVAL DAY TOHOUR

• DM = INTERVAL DAY TOMINUTE

• DS = INTERVAL DAY TOSECOND

• DY = INTERVAL DAY

• F = FLOAT

• GF = GRAPHIC

• GV = VARGRAPHIC

• HM = INTERVAL HOURTO MINUTE

• HR = INTERVAL HOUR

• HS = INTERVAL HOURTO SECOND

• I1 = BYTEINT

• I2 = SMALLINT

• I8 = BYTEINTEGER

• I = INTEGER

• MI = INTERVAL MINUTE

• MO = INTERVAL MONTH

• MS = INTERVAL MINUTETO SECOND

• SC = INTERVAL SECOND

• SZ = TIMESTAMP WITHTIME ZONE

• TS = TIMESTAMP

• TZ = TIME WITH TIMEZONE

• YM = INTERVAL YEARTO MONTH

• YR = INTERVAL YEAR

CHAR X(2) Columns[X]

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary2 – 32

Page 77: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

CommentString Returns user-supplied text or commentary on the column, database, table, view, macro, stored procedure, or the user.

VARCHAR X(255) Columns[X]Databases[X]Tables[X]Users

CommitOrRollback Returns a code to indicate whether the transaction was committed or rolled back.

• C = Committed

• R = Rolled Back

CHAR (1) NOT NULL

X(1) DeleteOldInDoubtInDoubtLog

CompletionDate Returns the date the in-doubt transaction was resolved.

DATENOT NULL

YY/MM/DD DeleteOldInDoubtInDoubtLog

CompletionTime Returns the time the in-doubt transaction was resolved.

FLOAT NOT NULL

99:99:99 DeleteOldInDoubtInDoubtLog

Compressible Returns a C (Compress) if the COMPRESS phrase is defined for the column.

CHAR X(1) Columns[X]

CompressValue Returns the constant value specified for compression in the COMPRESS phrase. If the constant value is not defined, a null value is returned.

VARCHAR X(255) Columns[X]

ConstraintCount Returns the count of table level constraints referencing this column.

SMALLINT NOT NULL

---,--9 Columns[X]

ConstraintName Returns the name of the table-level check. This field is NULL if this is an unnamed table check.

CHAR X(30) Table_LevelConstraints

ConstraintText Returns the unresolved text for the table-level check condition.

VARCHAR(8192)

X(255) Table_LevelConstraints

CoordTaskId Returns the coordinator that had the in-doubt transaction.

VARBYTE (30)NOT NULL

X(60) DeleteOldInDoubtInDoubtLog

CpuTime Returns total CPU time in seconds

(with resolution of .01 second) used on an AMP (or on all AMPs if SUM aggregate is specified).

FLOAT NOT NULL

---,---,---,--9.99 AMPUsage

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary 2 – 33

Page 78: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

CreateDate Returns the date that the event took place.

DATE NOT NULL

YY/MM/DD Events[X]Events_Configuration[X]Events_Media[X]

CreateTime Returns the time that the event took place.

FLOAT NOT NULL

99:99:99.99 Events[X]Events_Configuration[X]Events_Media[X]

CreateTimeStamp Specifies the time the object was created.

TIMESTAMP yyyy-mm-ddhh:mm:ss

AccLogRulesAllRightsAll_RI_ChildrenAll_RI_ParentsColumns[X]Databases[X]Indices[X]LogonRulesRI_Child_TablesRI_Distinct_ChildrenRI_Distinct_ParentsRI_Parent_TablesSHOWCOLCHECKSSHOWTBLCHECKSTables[X]Table_LevelConstraintsTriggersUserGrantedRightsUserRightsUsers

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary2 – 34

Page 79: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

CreatorName Returns the name of the user who created the database, table, or the name of the user‘s creator.

CHAR NOT NULL

X(30) AccLogRulesAllRightsAll_RI_ChildrenAll_RI_ParentsColumns[X]Databases[X]Indices[X]LogonRulesRI_Child_TablesRI_Distinct_ChildrenRI_Distinct_ParentsRI_Parent_TablesSHOWCOLCHECKSSHOWTBLCHECKSTables[X]Table_LevelConstraintsTriggersUserGrantedRightsUserRightsUsers

CurrentCollation Returns the current collation of the session with the following values:

• A = ASCII• E = EBCDIC• H = Host• M = Multinational

CHAR UPPERCASE NOT NULL

X(1) SessionInfo[X]

CurrentPerm Returns an integer that represents the permanent space, in bytes, that is currently being used by the database or table. Unless a specific AMP is requested, this value includes all AMPs.

FLOAT NOT NULL

---,---,---,---,--9 AllSpace[X}DiskSpace[X]TableSize[X]

CurrentSpool Returns an integer that represents the spool space, in bytes, that is currently being used by the database on a specified AMP (or on all AMPs if the SUM aggregate is specified).

FLOAT NOT NULL

---,---,---,---,--9 AllSpace[X}DiskSpace[X]

CurrentTemp Returns the number of bytes currently used by a temporary table per vproc.

FLOAT NOT NULL

---,---,---,---,--9 AllSpace[X}DiskSpace[X]

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary 2 – 35

Page 80: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

DatabaseId Returns the ID of the database with the indicated count of unresolved references.

BYTE NOT NULL

X(8) Databases2

Returns the ID of the database which contains both the Child and Parent tables.

BYTE NOT NULL

X(8) Tables2

Returns the ID of the database where the trigger resides.

BYTENOT NULL

X(4) Triggers

DatabaseName Returns the database or user name of the object for which this log entry was made.

VARCHAR NOT NULL

X(30) AccessLogSecurityLog[X]

Returns the database to which the access logging rule applies; the special system keyword ’ALL’ may be specified.

CHAR NOT NULL

X(30) AccLogRules

Returns the name of the database on which a privilege was granted; either of the following special system keywords may be specified:

• ALL• PUBLIC (indicates

performance monitoring rights)

CHAR NOT NULL

X(30) AllRights

Returns the name of a database or one of the following special system keywords:

• ALL• DEFAULT• PUBLIC (denotes that a

user granted performance monitoring rights is granted those rights on all users of the system [the PUBLIC]). The values for MaxPerm, CurrentPerm, PeakPerm, CurrentSpool, PeakSpool, CurrentTemp, and Peak Temp are 0 for the PUBLIC database.

CHAR NOT NULL

X(30) AllSpace[X]Databases[X]DiskSpace[X]UserGrantedRightsUserRights

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary2 – 36

Page 81: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

DatabaseName(continued)

Returns the name of the database or user space in which the imported object now resides.

CHAR NOT NULL

X(30) Association

Returns the name of a database.

CHAR NOT NULL

X(30) Columns[X]Indices[X]TableSize[X]

Returns the name of a database for which a default journal table has been defined.

CHAR NOT NULL

X(30) Database_Default_Journals[X]

Returns the name of a database with the indicated count of unresolved references.

CHAR NOT NULL

X(30) Databases2

Returns the name of the database that was affected by the event.

CHAR NOT NULL

X(30) Events[X]

Returns the name of a database containing a table with a column-level check.

CHAR NOT NULL

X(30) SHOWCOLCHECKS

Returns the name of a database containing a table with a table-level check.

CHAR NOT NULL

X(30) SHOWTBLCHECKSTable_LevelConstraints

Returns the name of the database that contains the table.

CHAR NOT NULL

X(30) Tables[X]

Returns the name of the database where the trigger resides.

CHARNOT NULL

X(30) Triggers

Returns the databasename of the table, for which the column or index statistics are requested.

CHARNOT NULL

X(30) ColumnStatsIndexStats

DataSetName Returns the client system data set name for a dump or restore event.

VARCHAR X(44) Events[X]

Events_Media[X]

DBKind Returns information that indicates whether the row information represents a database (D) or a user (U).

CHAR NOT NULL

X(1) Databases[X]

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary 2 – 37

Page 82: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

DecimalFractionalDigits

Returns an integer indicating the total number of fractional digits (if the column is defined as decimal).

SMALLINT Z9 Columns[X]

DecimalTotalDigits Returns an integer indicating the total number of decimal digits (if the column is defined as a decimal)

SMALLINT Z9 Columns[X]

DefaultAccount Returns the name of any default account.

CHAR NOT NULL

X(30) Users

DefaultCharSet Returns the name of the character set to be used as the default for this client system. Possible values are as follows:

• EBCDIC• ASCII• The name of a

user-defined character set as displayed in the CharSets view.

CHAR NOT NULL

X(30) HostsInfo

DefaultCharType Returns the type of the user default character type as follows:

• 1 - Latin • 2 - Unicode • 3 - KanjiSJIS• 4 - Graphic • 5 - Kanji1

SMALLINT ---,--9 Users

DefaultCollation Returns the default collation for the user as defined in a CREATE/MODIFY USER statement; if not defined, the DefaultCollation is the collation of the logon client system. Possible values are as follows:

• A = ASCII• E = EBCDIC• H = Host• M = Multinational

CHAR NOT NULL

X(1) Users

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary2 – 38

Page 83: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

DefaultDatabase Returns the name of the current default database for the user.

CHAR NOT NULL

X(30) SessionInfo[X]

Returns the name of the default database for the user as defined in a CREATE/MODIFY USER statement; if not defined, the DefaultDatabase is the user space and the value returned is NULL.

CHAR X(30) Users

DefaultDateForm Returns either an INTEGERDATE or ANSIDATE that is set for a USER with the CREATE or MODIFY statement.

CHARUPPERCASE

X(1) Users

DefaultValue Returns any default value assigned to the column or parameter.

VARCHAR X(1024) Columns[X]

DiskIO Returns the total number of reads and writes to DSU by each AMP in the system (or the total for all AMPs if the sum aggregate is specified).

FLOAT NOT NULL

---,---,---,--9 AMPUsage

DupeDumpSet Returns a code to indicate whether the dump event created a duplicate archive dataset. The codes are as follows:

• Y = Yes for a duplicate dataset

• N = No for a single dataset; the first dataset created

CHAR X(1) Events[X]

Returns a code to indicate whether the dump event created a duplicate archive dataset. The codes are as follows:

• Y = Yes for a duplicate dataset

• N = No for a single dataset; the first dataset created

CHAR NOT NULL

X(1) Events_Media[X]RCC_Media[X]

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary 2 – 39

Page 84: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

E2I Returns the client system (external) to Teradata RDBMS (internal) Hex translation codes.

BYTE NOT NULL

X(512) CharTranslations

E2IUp Returns the client system (external) to Teradata RDBMS (internal) and uppercase Hex translation codes.

BYTE NOT NULL

X(512) CharTranslations

EnabledFlag Returns a code that indicates whether the trigger is enabled or disabled:

• Y = Yes (default)• N = No

CHAR UPPERCASENOT NULL

X(1) Triggers

Error_Data Returns event-specific data supplied by the diagnostic subsystem. This data can be extracted for further analysis.

VARBYTE X(512) Software_Event_Log

Returns event-specific data supplied by the diagnostic subsystem. This data can be extracted for further analysis.

VARBYTE X(128) Hardware_Event_Log

E_TableId Returns the identifier for the materialized (effective) temporary table.

CHAR(30)NOT NULL

X(30) AllTempTables[X]

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary2 – 40

Page 85: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

Event Returns a description of the type of action, using the following descriptions:

• Logon• Logoff• Logon failed• Bad user• Bad account• Bad password• Forced Off (indicates that

the user session was terminated from the Teradata RDBMS console or the Performance Monitor API)

CHAR NOT NULL

X(12) LogOnOff

Returns a code to signify which of the following SQL statements fires the trigger:

• U = UPDATE• I = INSERT• D = DELETE

CHARUPPERCASENOT NULL

X(1) Triggers

EventCount Returns the number of duplicate rows (that is, same occurrences) that preceded a ’LAST-occurrence- only’ row.

INTEGER --,---,---,--9 AccessLog

EventNum Returns the client system event number of the restore operation.

INTEGER NOT NULL

--,---,---,--9 Association

Returns the value assigned by the Teradata RDBMS to each user archive or recovery command processed.

INTEGER NOT NULL

--,---,---,--9 Events[X]RCC_Media[X]Events_Configuration[X]Events_Media[X]

Returns the value assigned by the Teradata RDBMS to each utility function performed or CHECKPOINT statement processed.

INTEGER NOT NULL

--,---,---,--9 RCC_Configuration[X]

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary 2 – 41

Page 86: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

Event_Tag Returns an integer value made up of the subsystem ID, the event code, and the subevent code. The event tag is a unique identifier for the type of event that occurred.

For Database Query Manager, the Event_Tag contains the error code for the DBQM error that occured. You can find the text of the error in the Text column. (The text of the error possibly spreads over multiple lines, so you must use the line number to extract it.)

INTEGER NOT NULL

Z99-99999-99 Software_Event_Log

Returns the form of 10 digit decimal ‘rbbeeeeehh’ according to the following format:

• r = 0..3 Reserved• bb = 0..99 Subsystem ID• eeeee = 0..99999 Event ID -

Unique error code• hh = 0..99 Event

Subcategory

DECIMAL rbbeeeeehh Hardware_Event_Log

EventType Returns the type of event that occurred, using the following:

• CHECKPOINT• RESTORE• DELETE• ROLLBACK• DUMP• ROLLFORWARD

CHAR NOT NULL

X(30) Events[X]Events_Configuration[X]Events_Media[X]

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary2 – 42

Page 87: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

ExpiredPassword Returns a code that indicates whether or not the defined session is in the process of a logon for a user with an expired password. The codes are as follows:

• Y = Yes, by Session Control procedures

• N = No, by the Parser when a new password is assigned to the user

CHAR (1) UPPERCASE

X(1) SessionInfo[X]

ExpirePassword Returns the number of days to elapse before the password expires. 0 indicates passwords do not expire.

SMALLINT NOT NULL

---,--9 SecurityDefaults

FieldStatistics Returns the statistics for each column in a table.

VARBYTE (16383)

X(55) ColumnStats

FW_Version Returns the version number of the firmware running at the time the event was logged.

CHAR X(11) Hardware_Event_Log

Frequency Returns the specified logging frequency, which is determined by the rule that caused this entry (see AccLogRules view). Possible values are as follows:

• B = Both FIRST and LAS T occurrences

• E = EACH occurrence• F = FIRST occurrence only• L = LAST occurrence only

CHAR NOT NULL

X(1) AccessLog

Frequency_Margin Returns the value of the frequency margin of the environment. Values inlcude:

• H = High,• N = Normal• L = Low

CHAR X(1) Hardware_Event_Log

Function Returns the identification string for the entity reporting a software event.

VARCHAR X(32) Software_Event_Log

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary 2 – 43

Page 88: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

GrantAuthority Returns the WITH GRANT OPTION attribute of the access right held by the user.

CHAR NOT NULL

X(1) AllRightsUserGrantedRightsUserRights

Grantee Returns the name of a user who was granted a privilege; ALL can be specified.

CHAR NOT NULL

X(30) UserGrantedRights

GrantorName Returns the name of the user who granted the privilege.

CHAR NOT NULL

X(30) AllRightsUserRights

HostName Returns the unique name defined for this client system.

CHAR NOT NULL

X(30) HostsInfo

HostNo Returns the number of the client system through which the user logged on to the Teradata RDBMS.

SMALLINT NOT NULL

---,--9 SessionInfo[X]CSPSessionInfoAllTempTables[X]

I2E Returns the Teradata RDBMS (internal) to client system (external) Hex translation codes.

BYTE NOT NULL

X(512) CharTranslations

I2EUp Returns the Teradata RDBMS (internal) to client system (external) and uppercase Hex translation codes.

BYTE NOT NULL

X(512) CharTranslations

IFPNo Returns the PE Vproc number of the PE through which the session was connected.

SMALLINT NOT NULL

-(4)9 AccessLog

Returns the PE Vproc number of the PE to which the session was assigned.

SMALLINT NOT NULL

-(4)9 LogOnOffSessionInfo[X]

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary2 – 44

Page 89: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

InconsistencyFlag A code indicating whether inconsistencies may exist between the definitions of the related parent-child objects after being restored (using ARC), as follows:

• Y = Yes, the definitions could be inconsistent

• N = No, the definitions are consistent

If Y, it may be possible to validate the reference indexes that have been marked as inconsistent. See the REVALIDATE REFERENCES statement in Teradata RDBMS SQL Reference.

CHAR UPPERCASE NOT NULL

X(1) All_RI_ChildrenAll_RI_ParentsRI_Child_TablesRI_Distinct_ChildrenRI_Distinct_ParentsRI_Parent_Tables

IndexId Returns the reference index number.

SMALLINT NOT NULL

---,--9 All_RI_ChildrenAll_RI_ParentsRI_Child_TablesRI_Distinct_ChildrenRI_Distinct_ParentsRI_Parent_Tables

IndexName Returns the name of the reference index.

CHAR NOT NULL

X(30) All_RI_ChildrenAll_RI_ParentsIndices[X]RI_Child_TablesRI_Distinct_ChildrenRI_Distinct_ParentsRI_Parent_Tables

IndexNumber Returns an internal index number.

SMALLINT NOT NULL

ZZ9 Indices[X]

Returns the internal number assigned to the index.

SMALLINT NOT NULL

---,--9 IndexStats

IndexPresent Returns Y (yes) or N (no) to indicate whether or not the INDEX option was used in a dump event.

CHAR X(1) Events[X]

IndexStatistics Returns the statistics relating to the indexes on a table. The output is sorted in the order of the index numbers.

VARBYTE (16383)

X(255) IndexStats

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary 2 – 45

Page 90: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

IndexType Returns the type of an index as:

• P (Primary)• S (Secondary)• J (join index)• N (hash index)• K (primary key)• U (unique constraint)• V (value ordered

secondary)

• H (hash ordered ALL covering secondary)

• O (valued ordered ALL covering secondary)

• I (ordering column of a composite secondary index)

• 1 (field1 column of a join or hash index)

• 2 (field2 column of a join or hash index)

CHAR UPPERCASE NOT NULL

X(1) Indices[X]

InfoData Returns the attribute identified by the contents of the InfoKey field.

VARCHAR X(16384) DBCInfo

InfoKey Returns the attribute described by the contents of the InfoData field.

VARCHAR NOT NULL

X(30) DBCInfo

InstallFlag Returns a code to indicate whether this character set is to be installed as currently available on the Teradata RDBMS. A maximum of six character sets can be installed at one time.

These are the codes:

• Y = Yes• N = No

CHAR UPPERCASE NOT NULL

X(1) CharTranslations

Journal_DB Returns the name of the database or user space in which the default journal table for DatabaseName resides.

CHAR NOT NULL

X(30) Database_Default_Journals[X]User_Default_Journals[X]

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary2 – 46

Page 91: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

JournalFlag Returns a code to indicate the journaling in effect for the table, or the journal default for the tables in the user space or in the database. The first character indicates the BEFORE setting and the second character indicates the AFTER setting.

These are the codes:

• N = No journal (default)

• S = Single journal• D = Dual journal• L = Local AFTER journal

(not used for BEFORE)

CHAR NOT NULL

X(2) Databases[X]Tables[X]Users

JournalName Returns the name of the journal table defined as the default for UserName.

CHAR NOT NULL

X(30) Database_Default_Journals[X]Journals[X]User_Default_Journals[X]

JournalSaved Returns one of the following codes to indicate whether or not the SAVE option was used in the event:

• Y = Yes• N = No

CHAR X(1) Events[X]

Journals_DB Returns the name of the database in which a journal table resides.

CHAR NOT NULL

X(30) Journals[X]

JournalUsed Returns one of the following codes to indicate which part of the journal table was used:

• C = Current• R = Restored• S = Saved

CHAR X(1) Events[X]

Kind Returns a code that indicates whether the trigger is evaluated for:

• S = the statement (once) • R = each row changed by

the triggering action

CHAR X(1) Triggers

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary 2 – 47

Page 92: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

LastAlterName Returns the name of the user who last updated the object.

CHAR NOT NULL

X(30) Columns[X]Databases[X]Indices[X]Tables[X]TriggersUsers

LastAlterTimeStamp Specifies the time the object was last updated.

TIMESTAMP yyyy-mm-ddhh:mm:ss

Columns[X]Databases[X]Indices[X]Tables[X]TriggersUsers

Line Returns the number that corresponds to the line of text for a multi-line error message.

For Database Query Manager, the Line column identifies sequential portions of the error message that may be spread over multiple lines.

BYTEINT NOT NULL

ZZ9 Software_Event_LogHardware_Event_Log

LinkingEventNum Returns the terminating event number specified by the user for a rollforward or rollbackward event.

INTEGER --,---,---,--9 Events[X]

LockedCount Returns the number of successive unsuccessful attempts to logon to the user with an erroneous password. A null or 0 value indicates there have been no attempts since the last successful logon.

BYTEINT ---9 Users

LockedDate Returns the Julian date on which the Dbase row was locked to logons due to excessive erroneous passwords. A null or 0 value indicates the row was never locked.

INTEGER DATE

YY/MM/DD Users

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary2 – 48

Page 93: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

LockedTime Returns the time (number of minutes after midnight) when the Dbase row was locked to logons due to excessive erroneous passwords. Value = 0 through 1439; a null or 0 value indicates the row was never locked.

INTEGER 99:99 Users

LockedUserExpire Returns the number of minutes to elapse before a locked user is unlocked. 0 indicates immediate unlock.

SMALLINT NOT NULL

---,--9 SecurityDefaults

LockMode Returns a code to indicate the type of lock used by the event. The codes are as follows:

• A = ACCESS or Group READ

• R = full READ

CHAR X(1) Events[X]

LogDate Returns the date that the access log entry was made.

DATENOT NULL

YY/MM/DD AccessLog

Returns any calendar date that precedes the current date by more than 30 days.

DATE NOT NULL

YY/MM/DD DeleteAccessLog[X]

Returns the date that the event occurred.

DATE NOT NULL

YY/MM/DD LogOnOffSecurityLog[X]

LogicalHostId Returns the ID of the client system from which the session logged on to the Teradata RDBMS.

SMALLINT NOT NULL

ZZZ9 AccessLog

Returns the ID of the client system that had the in-doubt transaction.

SMALLINT NOT NULL

---,--9 DeleteOldInDoubtInDoubtLog

Returns the identifier of the client system connection as defined by the hardware configuration data.

SMALLINTNOT NULL

ZZZ9 HostsInfo

Returns the number of the client system through which the user logged on to the Teradata RDBMS.

SMALLINT NOT NULL

ZZZ9 LogOnOff

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary 2 – 49

Page 94: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

LogicalHostId

(continued)

Returns the client system identifier, as defined by the hardware configuration data, to which the rule applies.

SMALLINT NOT NULL

ZZZ9 LogonRules

Returns the identity of the client system connector, based on the hardware configuration data, through which the user logged on.

SMALLINTNOT NULL

ZZZ9 SessionInfo[X]

LogonDate Returns the date that the session for which the log entry was made was logged on to the Teradata RDBMS.

DATE NOT NULL

YY/MM/DD AccessLog

Returns the date on which logon for the session occurred.

DATE NOT NULL

YY/MM/DD LogOnOff

Returns the date of logon for the session being reported.

DATE NOT NULL

YY/MM/DD SessionInfo[X]

LogonSequenceNo Returns the logon sequence number of the session.

BYTE X(8) SessionInfo[X]

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary2 – 50

Page 95: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

LogonSource Returns the origin of the session being reported, such as the userid or session number of the client system. LogonSource may contain the following names and identifiers:

VARCHAR X(128) LogOnOffSessionInfo[X]CSPSessionInfo

Channel-Attached LogonSource ValuesEach of the following fields contains eight characters:

1 Operating System Name (using the string VM or MVS, followed by trailing blank fill)

2 TDP Name (the TDP name, followed by trailing blank fill) 3 Virtual Machine Userid (VM) or MVS job name4 Environment Name: Blank for VM; for MVS, either TSO, IMS, BATCH, or CICS) 5 Userid from Security Product (Blank if VM, or if no such product)6 Group from Security Product (Blank if VM, or if no such product)7 Program Name (MVS only)8 Coordinator name (CICS or IMS only)9 Transaction identifier (CICS or IMS only)10 Terminal identifier (CICS only)11 User/operator identifier (CICS only)12 Job ID (MVS) or virtual machine name (VM)13 A suffix tag showing that this is a new-style LogonSource type. Older client software

may not generate information for all the fields and will not contain the tag. The tag ‘1101 LSS’ means LSS version 01 with 11 preceding fields. The tag ‘0701 LSS’ means LSS version 01 with seven preceding fields

Network-Attached LogonSource Values

Each of the following fields can contain a varying number of characters:

1 The string “(TCP/IP)”2 Port number of the logon source machine3 IP address of the logon source machine4 PID of the process that establishes the connection5 A suffix tag ‘01 LSS’ showing that this is a new-style LogonSource type. The tag ‘01

LSS’ means LSS version 01. Older client software may not generate information for the PID field and will not contain the tag.

PDE Internal Session LogonSource Values

The following fields represent a session logged on by a PDE debug or dump management application:

1 LIBDBSUTIL (the library that logged on the session)2 PID of the application process running on the client3 Application name4 Node name (where the application logged on)

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary 2 – 51

Page 96: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

LogonStatus Returns if the rule grants (G) or refuses (R) permission for the named user to log on from the identified client system.

CHAR NOT NULL

X(1) LogonRules

LogonTime Returns the time on which logon for the session occurred (useful on logoff events).

FLOAT NOT NULL

99:99:99.99 LogOnOff

Returns the time that the session for which the log entry was made was logged on to the Teradata RDBMS.

FLOAT NOT NULL

99:99:99 AccessLog

Returns the time of logon for the session being reported.

FLOAT NOT NULL

99:99:99.99 SessionInfo[X]

LogonUserName Returns the ID of the user who ran the in-doubt transaction.

VARCHAR (30)NOT NULL

X(30) DeleteOldInDoubtInDoubtLog

LogProcessor Returns the logical processor ID for an AMP not affected by the event.

SMALLINT -(4)9 Events_Configuration[X]RCC_Configuration[X]

LogTime Returns the time of day that the event occurred as HH:MM:SS.

FLOAT NOT NULL

99:99:99 AccessLog

DeleteAccessLog[X]

SecurityLog[X]

Returns the time of day that the event occurred as HH:MM:SS.

FLOAT NOT NULL

99:99:99.99 LogOnOff

LogType Returns the kind of statement for which the access log entry was made.

BYTEINT ---,--9 SecurityLog[X]

MaxLogonAttempts Returns the number of erroneous logons allowed, at which time the user becomes locked. For example, a 1 indicates that one erroneous logon will lock the user. 0 indicates that a user is never locked.

BYTEINT NOT NULL

---9 SecurityDefaults

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary2 – 52

Page 97: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

MaxPerm Returns an integer that represents either the maximum permanent space, in bytes, that is allocated to the database on a specified AMP (or on all AMPs if the SUM aggregate is specified).

FLOAT NOT NULL

---,---,---,---,--9 Allspace[X]DiskSpace[X]

MaxSpool Returns an integer that represents the maximum spool space, in bytes, allocated to the database on a specified AMP (or on all AMPs if the SUM aggregate is specified).

FLOAT NOT NULL

---,---,---,---,--9 Allspace[X]DiskSpace[X]

MaxTemp Returns the maximum number of bytes available for temporary space per vproc.

FLOAT NOT NULL

---,---,---,---,--9 Allspace[X]DiskSpace[X]

Model Returns the PMA (Processor Module Assembly) model information for the Vproc for which an event was logged.

CHAR NOT NULL

X(4) AMPUsage

Module_Type Returns the identity of the type of module affected by the hardware event. For example, PMA, ACA, CMA, PDU, SMA, etc.

BYTEINT Z9 Hardware_Event_Log

NamedTblCheckCount

Returns the count of named table-level check constraint for the table.

SMALLINT NOT NULL

---,--9 Tables[X]

Nullable Returns a code to indicate whether or not a column may have a null value. The following codes are used:

• Y = Yes• N = No

CHAR NULL X(1) Columns[X]

NullPassword Returns a code that specifies whether the rule allows this user to log on without a password from the specified client system. The following codes are used:

• T = True/yes• F = False/no

CHAR NOT NULL

X(1) LogonRules

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary 2 – 53

Page 98: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

ObjectType Returns a code to indicate the type of object associated with the event. The following codes are used:

• D = Database• T = Table• J = Journal Table

CHAR X(1) Events[X]

OperationInProcess Returns a code to indicate whether the event is still processing. The following codes are used:

• Y = Yes• N = No

CHAR NOT NULL

X(1) Events[X]

Options This field is assigned to NULL initially. It is not used by the system and users may update this one-character column to suit their needs.

CHAR(1) X(1) InDoubtLog

OrderNumber Specifies when triggers bearing the same action time and event will execute.

SMALLINT ---,--9 Triggers

Original_CommentString

Returns the original comment on the imported table.

VARCHAR X(255) Association

Original_CreatorName

Returns the original creator of the imported table.

CHAR NOT NULL

X(30) Association

Original_DatabaseName

Returns the name of the original database in which the object resided.

CHAR NOT NULL

X(30) Association

Original_JournalFlag

Returns a code to indicate the original journaling for the imported object. The first character indicates the BEFORE-image status and the second character indicates the AFTER-image status. The following codes are used:

• N = No journal (default value)

• S = Single journal• D = Dual journal• L = Local AFTER journal

(not used for BEFORE)

CHAR NOT NULL

X(2) Association

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary2 – 54

Page 99: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

Original_ProtectionType

Returns the original protection type of the imported object, using the following codes:

• F = Fallback• N = None

CHAR UPPERCASE NOT NULL

X(1) Association

Original_TableKind Returns the original kind of the imported object. Possible values are as follows:

• T = Data Table

• V = View• M = Macro• J = Journal Table• I = Join Index Table• P= Stored Procedure• G = Trigger

CHAR UPPERCASE NOT NULL

X(1) Association

Original_TableName

Returns the name of the original object.

CHAR UPPERCASE NOT NULL

X(30) Association

Original_Version Returns the original version of the imported object.

SMALLINT NOT NULL

---,--9 Association

OwnerName Returns the name of the owner of the objects targeted by the view, stored procedure, or macro referenced in the request that generated this log entry.

VARCHAR NOT NULL

X(30) AccessLog

Returns the name of the database owner.

CHAR NOT NULL

X(30) Databases[X]

Returns the name of the owner of the user.

CHAR NOT NULL

X(30) Users

Parent Returns the name of a parent database or user.

CHAR NOT NULL

X(30) Children[X]

ParentCount Returns the number of parent tables for the table specified in the TVM row.

SMALLINT NOT NULL

---,--9 Tables[X]Tables2

ParentDb Returns the name of the referenced dababase.

CHAR NOT NULL

X(30) All_RI_ChildrenAll_RI_ParentsRI_Distinct_ChildrenRI_Distinct_Parents

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary 2 – 55

Page 100: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

ParentDbId Returns the database ID of the referenced table.

BYTE NOT NULL

X(8) RI_Child_TablesRI_Parent_Tables

ParentKeyColumn Returns the name of the column in a referenced key.

CHAR NOT NULL

X(30) All_RI_ChildrenAll_RI_Parents

ParentKeyFID Returns the field ID of a column in the referenced key.

SMALLINT NOT NULL

---,--9 RI_Child_TablesRI_Parent_Tables

ParentTable Returns the name of the referenced table.

CHAR NOT NULL

X(30) All_RI_ChildrenAll_RI_ParentsRI_Distinct_ChildrenRI_Distinct_Parents

ParentTID Returns the table ID of the referenced table.

BYTENOT NULL

X(12) RI_Child_TablesRI_Parent_Tables

Partition Returns the name of the Teradata RDBMS partition to which the user is currently attached. Possible values are as follows:

CHAR X(20) SessionInfo[X]

• DBC/SQL = an SQL session• FASTLOAD = a FASTLOAD session

• EXPORT = a FASTEXPORT session• MLOAD = a MULTILOAD session• MONITOR = sessions running in a performance monitoring application• NONE = session is recognized but not yet assigned

Returns the number of the Teradata RDBMS partition in which the task that resulted in the logged event was running.

BYTEINT Z9 Software_Event_

Log

PasswordChgDate Returns the Julian date on which the current password was assigned to the user. This value is 0 for a new user.

DATE YY/MM/DD Users

PasswordDigits Returns a code to indicate if digits are to be allowed in the password. The following codes are used:

• Y = allow digits in a password

• N = do not allow digits

CHAR(1)UPPERCASENOT NULL

X(1) SecurityDefaults

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary2 – 56

Page 101: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

PasswordLastModDate

Returns the date that the user password was last modified.

DATE YY/MM/DD Users

PasswordLastModTime

Returns the time that the user password was last modified.

INTEGER 99:99:99 Users

PasswordMaxChar Returns the maximum number of characters in a valid password string. PasswordMaxChar must be equal to or greater than PasswordMinChar.

BYTEINTBETWEEN1 AND 30NOT NULL

--9 SecurityDefaults

PasswordMinChar Returns the minimum number of characters in a valid password string.

BYTEINTBETWEEN1 AND 30NOT NULL

--9 SecurityDefaults

PasswordReuse Returns the number of days to elapse before a password can be reused. 0 indicates immediate reuse.

SMALLINTNOT NULL

--9 SecurityDefaults

PasswordSpecChar Returns a code to indicate if special characters are to be allowed in the password. The following codes are used:

• Y = allow special characters in a password

• N = do not allow special characters

CHAR(1) X(1) SecurityDefaults

PeakPerm Returns an integer that represents the maximum permanent space, in bytes, that has been used at any one time by the database or table. Unless a specific AMP is requested, this value includes all AMPs.

The ClearPeakDisk macro allows the Teradata RDBMS administrator to clear this field.

FLOATNOT NULL

---,---,---,---,--9 AllSpace[X]DiskSpaceTableSize[X]

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary 2 – 57

Page 102: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

PeakSpool Returns an integer that represents the maximum spool space, in bytes, that was used at any one time by the database on a specified AMP (or on all AMPs if the SUM aggregate is specified).

Note: The ClearPeakDisk macro allows the Teradata RDBMS administrator to clear this field.

FLOATNOT NULL

---,---,---,---,--9 AllSpace[X]DiskSpace

PeakTemp Returns the peak number of bytes used at one time by a temporary table per vproc.

Note: The ClearPeakDisk macro allows the Teradata RDBMS administrator to clear this field.

FLOATNOT NULL

---,---,---,---,--9 AllSpace[X]DiskSpace

PermSpace Returns an integer indicating the total space allocated to the database on all AMPs.

FLOATNOT NULL

ZZZ,ZZZ,ZZZ,ZZZ,ZZ9

Databases[X]

Returns an integer that indicates the permanent space allocated to the user.

FLOATNOT NULL

---,---,---,---,--9 Users

PhyProcessor Returns the physical processor ID for an AMP not affected by the event.

SMALLINT ZZ9-9 Events_Configuration[X]RCC_Configuration[X]

PMA Identifies the Processor Module Assembly (PMA) on which the event occurred.

INTEGERNOT NULL

ZZ9-9 Software_Event_LogHardware_Event_Log

Primary_Part_Number

Returns the board information.

VARCHAR X(11) Hardware_Event_Log

PrimaryKeyIndexId Returns information about the identification of the table used as the primary index.

SMALLINTNOT NULL

---,--9 Tables[X]

ProcessorState Returns D (the event was for all AMPs and the processor was down) or U (the event was for specific AMPs)

CHARNOT NULL

X(1) Events_Configuration[X]RCC_Configuration[X]

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary2 – 58

Page 103: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

ProtectionType Returns F (Fallback) or N (None) to indicate whether the tables in the database are protected by the Fallback option.

CHARNOT NULL

X(1) Databases[X]Tables[X]Users

RequestText Returns the text of the most recent data definition statement that was used to change the table, view, join index, trigger, or macro.

VARCHAR(12,500)

X(255) Tables[X]

Returns the actual request text that was used to create the trigger.

VARCHAR(12,500)

X(255) Triggers

ResolvingUserLogonName

Returns the identity of the user who resolved the in-doubt transaction.

VARCHAR (30)NOT NULL

X(30) DeleteOldInDoubtInDoubtLog

RestartSeqNum Returns an integer (0 through n) to indicate the number of times that the Teradata RDBMS had to be restarted during the event. 0 indicates that no restarts took place.

SMALLINT ---,--9 Events[X]Events_Configuration[X]

Returns an integer (0 through n) indicating the iteration of the event for which the processor is defined. A 0 value indicates that a restart did not take place. This number matches the RestartSeqNum value in a row of the Events view.

SMALLINT ---,--9 RCC_Configuration[X]

Result Returns a code to indicate how the access request for which this log entry was made. Possible codes are as follows:

• G = Granted• D = Denied

CHARNOT NULL

X(1) AccessLog

Revision_Level Returns the revision level of the part.

VARCHAR X(2) Hardware_Event_Log

RunUnitId Returns the identity of the run unit that had the in-doubt transaction.

VARBYTE(30)NOT NULL

X(60) DeleteOldInDoubtInDoubtLog

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary 2 – 59

Page 104: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

Secondary_Part_Number

Returns the secondary part number assigned by manufacturing.

VARCHAR X(11) Hardware_Event_Log

SeqNumber Returns column sequence numbers derived from the field ID. The output is sorted in the order of the sequence numbers.

SMALLINT NOT NULL

---,--9 ColumnStats

Serial_Number Returns the serial number assigned by manufacturing.

VARCHAR X(10) Hardware_Event_Log

SessionNo Returns the identifier assigned to the session by the TDP or LAN interface.

INTEGERNOT NULL

--,---,---,--9 AccessLogLogOnOffSessionInfo[X]AllTempTables[X]CSPSessionInfo

SessionNumber Returns the number of the session that had the in-doubt transaction.

INTEGERNOT NULL

--,---,---,--9 DeleteOldInDoubtInDoubtLog

Severity The Severity option returns a code identifying the severity of a software event. Possible values are as follows:

SMALLINT ZZ9 Software_Event_Log

• 0 = Hardware and software are informational events (Occurrence)• 10 = Software abnormality--informational (SW Abnormality)• 20 = Hardware abnormality--informational (HW Abnormality)• 30 = Recoverable user error (UserError Retry)• 40 = Unrecoverable user error (UserError)• 50 = Unrecoverable user error, no user restart (UserFatal)• 60 = Unrecoverable Vproc error, Vproc restart required (VprocError)• 70 = Unrecoverable Vproc error, no Vproc restart (VprocFatal)• 80 = Recoverable PDE error (OSErrorRetry)• 90 = Unrecoverable PDE error, restart required (OSError)• 100 = Unrecoverable PDE error, restart not possible (OSFatal)• 110 = Unrecoverable CPU hardware error, restart required (CPUError)• 120 = Unrecoverable CPU hardware error, CPU stay down (CPUFatal)• 130 = Unrecoverable PMA hardware error, PMA restart required (PMAError)• 140 = Unrecoverable PMA hardware error, PMA stays down (PMAFatal)• 200 = Unrecoverable system error, system restart required (SystemError)• 210 = Unrecoverable system error, restart not possible (SystemFatal)

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary2 – 60

Page 105: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

Severity Returns a code identifying the severity of the hardware event. Possible values are:

C = Critical Event

F = Fatal - Subsystem down

D = Degraded

W = Warning

I = Information

CHAR X(1) Hardware_Event_Log

Slot Returns the slot number within the module assembly at which the hardware event is located.

BYTEINT Z9 Hardware_Event_Log

Slot_Type Returns the identity of the type of the slot affected by the hardware event. For example, CMA_pwr, SMA_pwr.

FLOAT NOT NULL

Hardware_Event_Log

SpoolSpace Returns an integer indicating the maximum spool space allowed for the database. SpoolSpace is 0 if DatabaseName is PUBLIC.

FLOATNOT NULL

ZZZ,ZZZ,ZZZ,ZZZ,ZZ9

Databases[X]

Returns an integer that indicates the spool space allocated to the user.

FLOATNOT NULL

---,---,---,---,

--9

Users

SPParameterType Returns the data type of a stored procedure parameter.

Possible types are:

CHARNOT NULL

X(1) Columns[X]

Stacktrace Identifies the software calling sequence to aid in debugging.

VARBYTE X(640) Software_Event_Log

StartMBox Returns the client/server mailbox ID where the SQL request is sent.

BYTE X(20) CSPSessionInfo

StartupString Returns the startup string (macro or SQL statement) specified for the user.

VARCHAR X(255) Users

View Column Name Description Data Type Format Associated Views

Type DescriptionI IN parameter

B INOUT parameter

O OUT parameter

Teradata RDBMS Data Dictionary 2 – 61

Page 106: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

StatementText Returns (if so defined in the associated rule) the text of the statement that caused the privilege check for which this log entry was made.

VARCHAR X(8192) AccessLog

StatementType Returns the type of statement that caused the privilege check for which this log entry was made.

VARCHAR NOT NULL

X(20) AccessLog

SubSlot Returns the number of the subslot affected by the event.

BYTEINT 9 Hardware_Event_Log

SubSlot_Type Returns the identity of the type of subslot affected by the hardware event. For example, Bynclk, MAPDP.

BYTEINT 9 Hardware_Event_Log

SW_Version Identifies the software version running at the time the event was logged.

VARCHAR X(64) Software_Event_Log

TableKind Returns the table type as one of the following:

• T = Table• V = View• M = Macro• J = Journal Table • I = Join Index Table• P = Stored Procedure• G = Trigger

CHAR NOT NULL

X(1) Tables[X]

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary2 – 62

Page 107: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

TableName Returns the name of a table, view, stored procedure, trigger, or macro on which a privilege was granted.

CHARNOT NULL

X(30) AllRights

Returns the name of a table. CHARNOT NULL

X(30) AllSpace[X]Indices[X]Tables[X]TableSize[X]

Returns the name of a table, view, stored procedure, or macro.

CHARNOT NULL

X(30) Columns[X]UserGrantedRightsUserRights

Returns the imported object name.

CHARNOT NULL

X(30) Association

Returns the name of the table affected by the event. If the object is a database, then the value is set to NULL.

CHARNOT NULL

X(30) Events[X]

Returns the name of a data table that has change images recorded in a journal table.

CHARNOT NULL

X(30) Journals[X]

Returns the name of the table, view, stored procedure, or macro for this log entry.

CHARNOT NULL

X(30) SecurityLog[X]

Returns the name of a table having column-level check constraints.

CHAR

NOT NULL

X(30) SHOWCOL

CHECKS

Returns the name of a table having table-level check constraints.

CHARNOT NULL

X(30) SHOWTBLCHECKSTable_LevelConstraints

Returns the name of the table the trigger is defined against.

CHARNOT NULL

X(30) Triggers

Returns the name of the table containing the column for which statistics are requested.

CHARNOT NULL

X(30) ColumnStatsIndexStats

Tables_DB Returns the name of the database in which a data table resides that will have change images written to a journal table.

CHARNOT NULL

X(30) Journals[X]

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary 2 – 63

Page 108: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

Task Returns the unique task number assigned to each task as it is created for execution.

SMALLINT ZZZZ9 Software_Event_Log

TblCheck Returns the unresolved text for the table-level check condition.

VARCHAR(8192)

X(255) SHOWTBLCHECKS

Temperature Returns the temperature of the power board in microdegrees Centigrade.

DECIMAL(4,1)

-ZZ.99 Hardware_Event_Log

TempSpace Returns the maximum temporary space allocated for a database or user in bytes.

FLOAT NOT NULL

---,---, ---,---,--9

Databases[X]

Returns an integer that indicates the temporary space allocated to the user.

FLOAT NOT NULL

---,---, ---,---,--9

Users

Text Returns the text associated with the numbered event in the error log.

For Database Query Manager, the Text column returns error messages that are broken into sections that can fit within this 255-character field.

VARCHAR X(8192) SecurityLog[X]

Returns the text associated with the logged event.

VARCHAR NOT NULL

X(255) Software_Event_LogHardware_Event_Log

TheDate Returns the calendar date on which the event was logged.

DATE NOT NULL

YY/MM/DD Software_Event_LogHardware_Event_Log

TheTime Returns the clock time at which the event was logged, based on a 24-hour clock (hh:mm:ss).

FLOAT NOT NULL

99:99:99.999999

Software_Event_LogHardware_Event_Log

TimeZoneHour Returns the format of the time zone as signed integer values from -12:59 to +13:00.

BYTE ---9 Users

TimeZoneMinute Returns the format of the time zone as signed integer values from -12:59 to +13:00.

BYTE ---9 Users

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary2 – 64

Page 109: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

Transaction_Mode Returns one of the following codes to indicate the mode of the session:

• T = TDBS• A = ANSI

CHAR X(1) SessionInfo[X]

TriggerComment Returns the optional comment for the trigger.

VARCHAR X(255) Triggers

TriggerName Returns the name of the trigger.

CHARNOT NULL(I)UPPERCASE

X(30) Triggers

TVMId Returns the internal ID of the table.

BYTENOT NULL

X(12) Tables2

TVMName Returns the table, view, stored procedure, or macro name of the object for which this log entry was made.

VARCHAR X(30) AccessLog

Returns the table, view, stored procedure, or macro to which the access logging rule applies.

CHARNOT NULL

X(30) AccLogRules

Returns the name of the table. CHARNOT NULL

X(30) Tables2

TwoPCMode Returns one of the following codes:

• 2 = 2PC mode• N = non-2PC mode

VARCHAR (1)UPPERCASE

X(1) SessionInfo[X]

UniqueFlag Returns a code to indicate whether the index is unique. The following codes are used:

• Y = Yes; index is unique• N = No; index is not

unique

CHAR UPPERCASE NOT NULL

X(1) Indices[X]

UnnamedTblCheckExist

Returns an indicator for whether the table has an unnamed table-level check constraint, as follows:

• Y = Yes, has• N = No, does not have

CHAR NOT NULL

X(1) Tables[X]

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary 2 – 65

Page 110: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

UnResolvedRICount Returns the total number of unresolved Referential Integrity (RI) constraints in the database.

SMALLINT NOT NULL

’---,--9 Databases2

UpperCaseFlag Returns the case indicator flag for the column, and whether comparisons on the column are case specific. The column uses one of the following codes:

• U = Uppercase, not specific

• C = Not uppercase, specific

• N = Not uppercase, not specific

• B = Both

Note: Case flags U, C, and B are valid only for CHAR, VARCHAR, and LONG VARCHAR columns.

CHAR X(1) Columns[X]

UserLogonDate Returns the date that the specified user logged on.

DATENOT NULL

YY/MM/DD DeleteOldInDoubtInDoubtLog

UserLogonTime Returns the time that the specified user logged on.

FLOATNOT NULL

99:99:99 DeleteOldInDoubtInDoubtLog

UserName Returns the name of the user for whom the log entry was made.

VARCHARNOT NULL

X(30) AccessLogSecurityLog[X]

Returns the user to which the access logging rule applies; ALL may be specified.

CHARNOT NULL

X(30) AccLogRules

Returns the name of a user.

Note: SYSTEMUSERID is a system user name that tracks console utility activity such as table rebuild, Diskcopy, or Scandisk.

CHARNOT NULL

X(30) AccountInfo[X]AMPUsageUsers

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary2 – 66

Page 111: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

UserName(Continued)

Returns the name of a user to whom the privilege was granted.

CHARNOT NULL

X(30) AllRights

Returns the username associated with the event.

CHARNOT NULL

X(30) Events[X]Events_Configuration[X]LogOnOff

Returns the name of the user to whom the rule applies; DEFAULT may be specified.

CHARNOT NULL

X(30) LogonRules

Returns the Teradata RDBMS userid of the user who is currently logged on.

CHARNOT NULL

X(30) SessionInfo[X]

Returns the name of a user space for which a default journal table has been defined.

CHARNOT NULL

X(30) User_Default_Journals

Returns the username associated with the client system utility dump or restore event.

CHARNOT NULL

X(30) Events_Media[X]

Returns the logon name of the user that materialized the temporary table.

CHARNOT NULL

X(30) AllTempTables[X]

Vcc_Amps Returns the value of the main supply current in microamps.

DECIMAL(4,2)

Z9.99 Hardware_Event_Log

Vcc_Margin Returns the value of the main supply voltage margin.Values inlcude: H = High, N = Normal, and L = Low.

CHAR X(1) Hardware_Event_Log

Vcc_Volts Returns the value of the main supply voltage in microvolts.

DECIMAL(4,2)

-9.99 Hardware_Event_Log

Version Returns the version count, which is incremented each time the table is altered with a data definition statement.

SMALLINTNOT NULL

ZZZZ9 Tables[X]

VolSequenceNum Returns the sequence number of the volume, which defines the position of the volume in a multi-volume set.

SMALLINT ---,--9 RCC_Media[X]Events_Media[X]

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary 2 – 67

Page 112: Data Dictionary Views

Chapter 2: System ViewsSystem View Columns Reference

VolSerialId Returns the unique six character volume serial assigned to a device.

CHARNOT NULL

X(6) Events_Media[X]RCC_Media[X]

Vproc Identifies the virtual processor for which an event was logged.

SMALLINT -(4)9 Events_Configuration[X]RCC_Configuration[X]Software_Event_Log

Identifies the virtual processor for which an event was logged.

SMALLINTNOT NULL

-(4)9 AllSpace[X]AMPUsageDiskSpace[X]TableSize[X]

Vproctype Returns the type of Vproc for which an event was logged.

CHAR NOT NULL

X(4) AMPUsage

View Column Name Description Data Type Format Associated Views

Teradata RDBMS Data Dictionary2 – 68

Page 113: Data Dictionary Views

Chapter 3:

System Views: Usage and Examples

This chapter explains the purpose of each of the DBC Data Dictionary system views. The views are presented in alphabetical case-insensitive order by view name and include the following information:

• View form (a view that has an X version is shown in the form “ViewName[X]”)

• Columns that the view selects from the system table• Corresponding system tables• Usage notes about special information or uses of the view• Examples, where available, of the results returned by a SELECT request on

the view. If applicable to the type or quantity of information being selected, the example shows the X version of the view in the statement reference.

• Other Teradata RDBMS documents that can provide additional information about this view

Note: The results shown in the examples are for illustration purposes only. Utilities and tools, such as BTEQ, or other third-party products, may be used to enter queries and will format the results differently.

Note: If a statement returns a “security violation” error, a reference to the alternate version of the view name may yield results. If neither version is available, use the HELP statement to inquire about individual objects. If this is not adequate, the user should consult the Teradata database administrator.

Teradata RDBMS Data Dictionary 3 – 1

Page 114: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesAccessLog

AccessLog

Purpose

Returns logging entries generated by the application of access logging rules (see “AccLogRules”).

The corresponding system table is DBC.AccLogTbl.

Usage Notes

Each row AccessLog displays indicates the results of a privilege check. Whether a privilege check is logged depends on the presence and the criteria of an access logging rule (see “AccLogRules”).

Example

The following SELECT retrieves the name of the submitting user from the AccessLog, the type of request, and the request text of each request that caused a privilege check to be logged on a specific date. The response shows that one request caused a privilege check to be logged on that date. (The statement text column has been truncated in the results.)

View Name User Type Columns Selected

DBC.AccessLog Security Administrators

LogDateLogTimeLogonDateLogonTimeLogicalHostIdIFPNoSessionNoUserNameAccountNameOwnerNameAccessTypeFrequencyEventCountResultDatabaseNameTVMNameColumnNameStatementTypeStatementText

Teradata RDBMS Data Dictionary3 – 2

Page 115: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesAccessLog

==> SELECT LogDate, UserName, AccessType, StatementText FROMDBC.AccessLog WHERE LogDate = 890510;

LogDate UserName AccessType StatementText89/05/10 Jones CT CREATE TABLE Jones.EmpDup (Em

Teradata RDBMS Data Dictionary 3 – 3

Page 116: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesAccLogRules

AccLogRules

The AccLogRules view provides information about logging rules that are currently in effect on the system. The underlying table is populated as a result of successfully processed BEGIN LOGGING statements.

Corresponding system tables for this view include the following:

• DBC.AccLogRuleTbl• DBC.DBase• DBC.TVM

View Name User Type Columns Selected

DBC.AccLogRules Security

Administrator

UserNameDatabaseNameTVMNameAcrCheckpointAcrCreateDatabaseAcrCreateMacroAcrCreateProcedureAcrCreateTableAcrCreateUserAcrCreateViewAcrDeleteAcrDropDatabaseAcrDropMacroAcrDropProcedureAcrDropTableAcrDropUserAcrDropViewAcrDumpAcrExecuteAcrExecuteProcedureAcrGrantAcrIndexAcrInsertAcrReferenceAcrRestoreAcrSelectAcrUpdateAcrCreateTriggerAcrDropTriggerCreatorNameCreateTimeStamp

Teradata RDBMS Data Dictionary3 – 4

Page 117: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesAccLogRules

Usage Notes

The underlying table of this view is populated only if the security macro is installed and the Teradata RDBMS or security administrator has executed one or more BEGIN LOGGING statements.

Each row in the underlying table defines a rule controlling what privilege check is to be logged when a specific user attempts to access a specific object.

When a request is submitted that involves any of the rule criteria, the details of the involvement are recorded in the access log (see “AccessLog”).

In AccLogRules, each Access Rule (Acr...) column is named for a particular privilege, which is also associated with an access action and a SQL statement. In each column, each character position represents the frequency with which checks performed on that privilege are to be logged, as follows:

1 Position 1 (every privilege check) indicates how often to log checks on this privilege when performed against any requests (submitted by a specified user) that attempt to access the specified object. Possible values that could appear in each position are as follows: • B Both FIRST and LAST occurrences are to be logged.• E Each occurrence is to be logged.• F FIRST occurrence is to be logged.• L LAST occurrence is to be logged.• blank No logging.

2 Position 2 indicates how often to log checks on this privilege when performed against requests (submitted by a specified user) that are not allowed to access the specified object (that is, check results are Denials). • B Both FIRST and LAST occurrences are to be logged.• E Each occurrence is to be logged.• F FIRST occurrence is to be logged.• L LAST occurrence is to be logged.• blank No logging.

3 Position 3 (save text of request) indicates whether to record the text of the requests that cause a check on this privilege. • - Save text only for Denial entries.• + Save text for all entries. • = Save text for all entries (specified in multiple BEGIN LOGGING

statements). • blank No WITH TEXT option specified.

Example

If the following statements are submitted, a SELECT statement retrieving the AccLogRules entries for User1 returns the rows as shown:

Teradata RDBMS Data Dictionary 3 – 5

Page 118: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesAccLogRules

BEGIN LOGGING ON EACH CREATE TABLE BY Jones ON USER Jones ;BEGIN LOGGING DENIALS WITH TEXT ON FIRST CREATE DATABASE

BY Jones ON DATABASE Personnel ;

==> SELECT * FROM DBC.AccLogRules WHERE UserName = ’Jones’ ;

• In the first row, the UserName “Jones”, the DatabaseName “Jones”, and the “E” in the first position of the CTB column indicate that a log entry is to be made each time a check for the CREATE TABLE privilege is performed in response to a request by Jones to create a table in his own space.

• In the second row, the UserName “Jones”, the DatabaseName “Personnel”, and the “F” in the second position of the CDB column indicate that a log entry is to be made the first time a check for a CREATE DATABASE privilege that results in a denial is performed in response to a request by Jones to create a database in the Personnel database. The “-” in the third position of the CDB column indicates that the text of the denied statement is to be saved in the log entry.

UserName DatabaseName TVMName CPT CDB CMC CTB CUS

Jones Jones All E ...

Jones Personnel All F- ...

Teradata RDBMS Data Dictionary3 – 6

Page 119: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesAccountInfo[X]

AccountInfo[X]

The AccountInfo view provides information about valid accounts for the specified user(s).

Corresponding system tables for this view include the following:

• DBC.Accounts• DBC.DBase• DBC.AccessRights• DBC.DBase• DBC.Owners

This view also references the DBC.userdb view.

Example ==> SELECT UserName, AccountName FROM DBC.AccountInfo

WHERE UserName IN (’Bob’,’G417’) ;

UserName AccountNameBob 7654Bob Temp Work AreaG417 137G417 $HGAVE

Additional Information

See Teradata RDBMS Database Design for more information on controlling access, space, and ownership.

View Name User Type Columns Selected

DBC.AccountInfo[X] Supervisory UserNameAccountName

Teradata RDBMS Data Dictionary 3 – 7

Page 120: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesAllRights

AllRights

The AllRights view provides information about all users who have been explicitly or automatically granted privileges, and the objects on which the privileges were granted including: databases, users, tables, views, stored procedures, and macros.

Corresponding system tables for this view include the following:

• DBC.AccessRights• DBC.DBase• DBC.TVM• DBC.TVFields

Usage Notes

The AllRights view does not return information about implicit privileges for a user, only explicit rights granted on the object. The explicit rights include the following:

• AS = ABORT SESSION

• CD = CREATE DATABASE

• CG = CREATE TRIGGER

• CM = CREATE MACRO

• CP = CHECKPOINT

• CT = CREATE TABLE

• CU = CREATE USER

• CV = CREATE VIEW

• D = DELETE

• DD = DROP DATABASE

View Name User Type Columns Selected

DBC.AllRights Administrator UserName

DatabaseName

TableName

ColumnName

AccessRight

GrantAuthority

GrantorName

AllnessFlag

CreatorName

CreateTimeStamp

Teradata RDBMS Data Dictionary3 – 8

Page 121: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesAllRights

• DG = DROP TRIGGER

• DM = DROP MACRO

• DP = DUMP

• DT = DROP TABLE

• DU = DROP USER

• DV = DROP VIEW

• E = EXECUTE

• I = INSERT

• IX = INDEX

• MR = MONITOR RESOURCE

• MS = MONITOR SESSION

• PC = CREATE PROCEDURE

• PD = DROP PROCEDURE

• PE = EXECUTE PROCEDURE

• RO = REPLICATION OVERRIDE

• R = RETRIEVE/SELECT

• RF = REFERENCE

• RS = RESTORE

• SS = SET SESSION RATE

• SR = SET RESOURCE RATE

• U = UPDATE

Example

The following SELECT statement displays the privileges user Jones has on tables.

==> SELECT Tablename, AccessRight, GrantorNameFROM DBC.AllRights WHERE UserName = ’Jones’;

TableName AccessRight GrantorNameproject RS SYSTEMADproject DP SYSTEMADproject DT SYSTEMADproject G SYSTEMADproject D SYSTEMADproject I SYSTEMADproject U SYSTEMADproject R SYSTEMADemployee I SYSTEMADemployee U SYSTEMAD

Teradata RDBMS Data Dictionary 3 – 9

Page 122: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesAllSpace[X]

AllSpace[X]

The AllSpace view provides AMP-by-AMP information about disk space usage (including spool) for each database, data table, or journal table.

Corresponding system tables for this view include the following:

• DBC.DataBaseSpace• DBC.DBase• DBC.TVM• DBC.AccessRights• DBC.Owners

Usage Notes

When a database, user, or table is created, allocated disk space is divided evenly among all AMPs. The AllSpace view returns one row of usage information for each AMP in the Teradata RDBMS configuration (or for all AMPs if the SUM aggregate is used).

When a database is created, a space row is added to each AMP, with the processor field in each row initialized to 0. The first time the space row is updated (such as when a table is created in the database, or when the system is restarted), the processor field in each row is updated to indicate the actual processor number.

When a query applies a SUM aggregate to either of those columns without a WHERE clause, or with a WHERE clause that references only one tname or dbname, the returned values will be double the desired result.

View Name User Type Columns Selected

DBC.AllSpace[X] Administrator VprocDatabaseNameAccountNameTableNameMaxPermMaxSpoolMaxTempCurrentPermCurrentSpoolCurrentTempPeakPermPeakSpoolPeakTemp

Teradata RDBMS Data Dictionary3 – 10

Page 123: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesAllSpace[X]

For example, the following query, which returns the correct amount of space allocated to Peterson, also returns twice the amount of space currently being used by Peterson (see DiskSpace and TableSize views).

SELECT SUM(MaxPerm), SUM(CurrentPerm)FROM DBC.AllSpaceWHERE DatabaseName = ’Peterson’

Example

The following SELECT statement displays how the space currently used by the data table named Department is distributed on each AMP.

==> SELECT DatabaseName,TableName,AMP,CurrentPerm FROMDBC.AllSpaceWHERE TableName=’Department’ ORDER BY 1,2,3 ;

DatabaseName TableName AMP CurrentPerm

Test DEPARTMENT 1-0 1,024Test DEPARTMENT 1-1 512Test DEPARTMENT 1-2 1,024Test DEPARTMENT 1-3 512PERSONNEL department 1-0 2,048PERSONNEL department 1-1 1,536PERSONNEL department 1-2 1,536PERSONNEL department 1-3 1,536User1 department 1-0 2,048User1 department 1-1 1,536User1 department 1-2 1,536User1 department 1-3 1,536

Teradata RDBMS Data Dictionary 3 – 11

Page 124: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesAllTempTables[X]

AllTempTables[X]

The AllTempTables view provides information about all global temporary tables materialized in the system.

A global temporary table is created by explicitly stating the keywords GLOBAL TEMPORARY in the CREATE TABLE statement. The temporary table defined during the CREATE TABLE statement is referred to as the base temporary table.

When referenced in an SQL session, a local temporary table is materialized with the exact same definition as the base table. Once the temporary table is materialized, subsequent DML statements referring to that table are mapped to the materialized instance.

A materialized temporary table is automatically dropped at the end of a session.

Corresponding system tables for this view include the following:

• DBC.TempTables• DBC.DBase• DBC.TVM• DBC.SessionTbl

Usage Notes

A materialized temporary table is different from a permanent table in the following ways:

• It is always empty at the start of a session• The contents of the materialized table cannot be shared by other

sessions.• It can optionally be emptied at the end of each transaction.• It is automatically dropped at the end of each session.

View Name User Type Columns Selected

DBC.AllTempTables Administrator HostNoSessionNoUserNameB_DatabaseNameB_TableNameE_TableId

Teradata RDBMS Data Dictionary3 – 12

Page 125: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesAllTempTables[X]

Example

After a global temporary table definition is created, you can use the INSERT statement to create a local instance of the global temporary table for use during the session.

The following statement shows all temporary tables materialized by the login user in the system.

==> SELECT * FROM DBC.AllTempTablesX

HostNo SessionNo DatabaseName TableName TableId

52 3,409 TEST GTEMP1 00800A000000

Teradata RDBMS Data Dictionary 3 – 13

Page 126: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesAll_RI_Children

All_RI_Children

The All_RI_Children view provides information about all tables in child-parent order. It is similar to the RI_Child_Tables view but returns the names of databases, tables, and columns instead of IDs.

Corresponding system tables for this view include the following:

• DBC.ReferencingTbls• DBC.DBase• DBC.TVM• DBC.TVFields

Usage Notes

The All_RI_Children view is designed for use in a SELECT statement with a WHERE clause to narrow the selection criteria.

The All_RI_Children view is similar to the RI_Child_Tables view but returns the database, table, and column names instead of the IDs for access control purposes. The administrator can control who has access to internal ID numbers by limiting the access to the RI_Child_Tables view while allowing more (or all) users to access the names via the All_RI_Children view.

View Name User Type Columns Selected

DBC.All_RI_Children All users IndexIDIndexNameChildDBChildTableChildKeyColumnParentDBParentTableParentKeyColumnInconsistencyFlagCreatorNameCreateTimeStamp

Teradata RDBMS Data Dictionary3 – 14

Page 127: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesAll_RI_Parents

All_RI_Parents

The All_RI_Parents view provides information about all tables in parent-child order. It is similar to the RI_Parent_Tables view but returns the names of databases, tables, and columns instead of IDs.

Corresponding system tables for this view include the following:

• DBC.ReferencingTbls• DBC.DBase• DBC.TVM• DBC.TVFields

Usage Notes

The All_RI_Parents view is designed for use in a SELECT statement with a WHERE clause to narrow the selection criteria.

The All_RI_Parents view is similar to the RI_Parent_Tables view but returns the database, table, and column names instead of the IDs for access control purposes. The administrator can control who has access to internal ID numbers by limiting the access to the RI_Parent_Tables view while allowing more (or all) users to access the names via the All_RI_Parents view.

View Name User Type Columns Selected

DBC.All_RI_Parents All users IndexIDIndexNameParentDBParentTableParentKeyColumnChildDBChildTableChildKeyColumnInconsistencyFlagCreatorNameCreateTimeStamp

Teradata RDBMS Data Dictionary 3 – 15

Page 128: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesAMPUsage

AMPUsage

The AMPUsage view provides information about the usage of each AMP for each user and account.

AMPUsage monitors logical I/Os explicitly requested by the AMP database software or file system that is running in the context of an AMP worker task for the purpose of executing a step in the user query. I/Os done by UNIX for swapping are not included in AMPUsage, nor are the I/Os caused by parsing the user query.

A logical I/O is charged even if the requested segment is cached and no physical I/O is done.

The corresponding system table for this view is DBC.Acctg.

Example

The following SELECT statement is used to display, for a given account, total CPU time and total DSU accesses for all AMPs.

==> SELECT AccountName,SUM(CPUTime),SUM(Diskio)FROM DBC.AMPusage WHERE AccountName=’7654’

AccountName Sum(CPUTime) Sum(DiskIO)

7654 204,352.88 5,226,742

Additional Information

See Teradata RDBMS Database Design for more information on controlling access, space, and ownership.

View Name User Type Columns Selected

DBC.AmpUsage Administrator AccountNameUserNameCPUTimeVprocVprocTypeModelDiskIO

Teradata RDBMS Data Dictionary3 – 16

Page 129: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesAssociation

Association

The Association view allows the user to retrieve information about an object that was imported from another Teradata RDBMS.

Corresponding system tables for this view include the following:

• DBC.Association• DBC.DBase• DBC.TVM

Usage Notes

The Association view contains information about entities that were restored using the Archive and Recovery COPY utility. If a copied object is subsequently dropped, then the information is deleted and is no longer available.

Example

The following SELECT statement selects information about tables copied into the Personnel database.

==> SELECT Original_DatabaseName,Original_TableName,TableNameFROM DBC.Association WHERE DatabaseName = ’Personnel’;

Original_DatabaseName Original_TableName TableName

OldPersonnel Empl_Addr Emp_AddressPersonnel2 Empl_Dept Empl_Dept

View Name User Type Columns Selected

DBC.Association End DatabaseNameTableNameEventNumOriginal_DatabaseNameOriginal_TableNameOriginal_TableKindOriginal_VersionOriginal_ProtectionTypeOriginal_JournalFlagOriginal_CreatorNameOriginal_CommentString

Teradata RDBMS Data Dictionary 3 – 17

Page 130: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesAssociation

Additional Information

The following references provide additional usage information on recovery control.

Book Chapter Section

Teradata RDBMS Database Administration

Archiving and Recovering Data

• Recovery Control Views

Teradata Archive/Recovery Reference

Archive/Recovery Control Language

• All

Teradata RDBMS Data Dictionary3 – 18

Page 131: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesCharSets

CharSets

The CharSets view returns the names assigned to user-defined character sets. If the view does not exist, or if no rows are found, then no special character sets are currently available.

The corresponding system table for this view is DBC.Translation.

Usage Notes

The Teradata RDBMS can support many user-defined character sets (see the “CharTranslations”). A maximum of six character sets can be installed at any given time. The CharSets view Returns the names of character sets that are currently installed and thus can be specified at the session level. If the view does not exist or no rows are found, then no user-defined character sets are available.

Each name shown in CharSets can be used as the identifier in the BTEQ [.]SET SESSION CHARSET <’name’> command or the CLIv2 call CHARSET <name>. However, the specified character set should be compatible with the internal code of the logon client system.

If a CharSetName is ambiguous as to its compatibility with the logon client system of the viewer session, consult the Teradata RDBMS administrator.

Example

The following example shows that two user-defined character sets are available for the requesting user.

==> SELECT * from DBC.CharSets ;

CharSetName

French_EBCDICSwedish_EBCDIC

View Name User Type Columns Selected

DBC.CharSets End CharSetName

Teradata RDBMS Data Dictionary 3 – 19

Page 132: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesCharTranslations

CharTranslations

The CharTranslations view shows hexadecimal codes inserted by the Teradata RDBMS system administrator to form translation tables that enable the Teradata RDBMS to store and manipulate non-English character sets. Such translation tables usually define character sets for languages that use diacritical characters.

If the view is empty or no rows are found, then no user-defined character sets are available.

The corresponding system table for this view is DBC.Translation.

Usage Notes

The underlying table of this view is populated by the Teradata RDBMS system administrator or other responsible user. Each row in the table comprises a translation table for one character set. The amount of character sets that can be defined is limited only by the disk space available for the table. However, a maximum of 12 sets can be installed as currently available at any one time.

The Teradata RDBMS must be reset to install the rows containing a Y in the InstallFlag field. If the value of InstallFlag is Y in 12 rows or less, each Y row is loaded. If InstallFlag is Y in more than 12 rows, then the CharSetName values are sorted in ascending ASCII sequence, and rows are loaded in alphabetical order until 12 sets are installed or the names are exhausted.

If client system connections are to use the defined character sets, the Teradata RDBMS system administrator specifies which character set is assigned to which client system (see DBC.HostsInfo view). Otherwise, the standard default is used. Also, the user may specify a defined character set after a session is started (see “CharSets”).

When specifying a character set for a session, the choice should be compatible with the internal code of the logon client system; that is, an EBCDIC-compatible character set for sessions initiated from an IBM mainframe, ASCII-compatible sets for all others. It is suggested, therefore, that

View Name User Type Columns Selected

DBC.CharTranslations End CharSetNameCharSetIdInstallFlagE2IE2IUpI2EI2EUp

Teradata RDBMS Data Dictionary3 – 20

Page 133: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesCharTranslations

a convention be used for naming character sets which differentiates between EBCDIC and ASCII compatibility (see example).

Example

The example below shows that the hexadecimal translation tables for 6 character sets have been defined, and that two of these are flagged for loading.

==> SELECT * FROM DBC.CharTranslations;

Char InstallCharSetName Set Id Flag E2I

German_EBCDIC 100 N 00010203A809A97FD1D2D3...Italian_EBCDIC 105 N 00010203A809A97F2395EE...Spanish_EBCDIC 103 N 00010203A809A97FD1D2D3...French_EBCDIC 104 Y 00010203A809A97FD1D2D3...Norwegian_EBCDIC 101 N 00010203A809A97FD1D2D3...Swedish_EBCDIC 102 Y 00010203A809A97FD1D2D3...

Teradata RDBMS Data Dictionary 3 – 21

Page 134: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesChildren[X]

Children[X]

The Children view lists the names of databases and users and their parents in the hierarchy.

Corresponding system tables for this view include the following:

• DBC.AccessRights• DBC.DBase• DBC.Owners

This view also references the userdb view.

Example

The following SELECT statement displays databases and users that are owned by the Finance database.

==> SELECT Parent, Child FROM DBC.ChildrenWHERE Parent = ’Finance’;

Parent Child

Finance PersonnelFinance JonesFinance Accounting

View Name User Type Columns Selected

DBC.Children[X] Administrator ChildParent

Teradata RDBMS Data Dictionary3 – 22

Page 135: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesCollations

Collations

The Collations view provides definitions for standard Swedish and Norwegian collations as well as custom collation sequence definitions. The Collations view provides a view on all columns of the DBC.CollationTbl.

The corresponding system table for this view is DBC.CollationTbl.

Usage Notes

The DBC.Collation table initially contains two rows, SWEDISH_STANDARD and NORWEGIAN_STANDARD. Database administration can redefine the MULTINATIONAL collation sequence to meet other specific language collation needs.

Using the MULTINATIONAL option, for example, in SET SESSION COLLATION MULTINATIONAL, is the same. The final collation order, however, is changed according to the defined collation sequence.

Database administration runs the CollInstallMulti macros to set the collation sequence to MULTINATIONAL, SWEDISH_STANDARD, or NORWEGIAN_STANDARD. The Teradata RDBMS must be reset (initialized) before the new collation sequence can take effect.

When you define a new collation with a name other than ’MULTINATIONAL’, you should set the CollInstall flag to N to avoid extra processing during startup.

Example

The following statement returns the collation information for all collation sequences defined in the collation table:

SELECT CollNameFROM DBC.Collation ;

The result is the following list:

CollName

SWEDISH_STANDARDNORWEGIAN_STANDARDMULTINATIONAL

View Name User Type Columns Selected

DBC.Collations End CollNameCollInstallCollEqvClassCollOrderCSCollOrderUC

Teradata RDBMS Data Dictionary 3 – 23

Page 136: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesColumns[X]

Columns[X]

The Columns view provides information from the DBC.TVFields table about stored procedures, join indexes, the parameters of macros and stored procedures, and the columns of any table or view that the user owns or has SELECT privileges on.

Corresponding system tables for this view include the following:

• DBC.AccessRights• DBC.TVFields• DBC.TVM• DBC.DBase• DBC.Owners

Usage Notes

When querying DBC.Columns for a view, information on column attributes (length, type, etc.) will be null. Because column attributes correspond to the table for which they were defined, they are not stored in the dictionary and are

View Name User Type Columns Selected

DBC.Columns[X] End DatabaseNameTableNameColumnNameColumnFormatColumnTitleColumnTypeColumnLengthDefaultValueNullableCommentStringDecimalTotalDigitsDecimalFractionalDigitsColumnIdUpperCaseFlagCompressibleCompressValueColumnConstraintConstraintCountCreatorNameCreateTimeStampLastAlterNameLastAlterTimeStampCharTypeSPParameterType

Teradata RDBMS Data Dictionary3 – 24

Page 137: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesColumns[X]

not accessible through this view. Information on the columns of views can be obtained with the HELP COLUMN statement.

Example 1

This example shows a statement that selects from DBC.Columns the name, format, null status, and data type of all columns in the Personnel.Employee table:

==> SELECT ColumnName,ColumnFormat,Nullable,ColumnTypeFROM DBC.Columns WHERE DatabaseName=’Personnel’AND TableName = ’Employee’;

ColumnName ColumnFormat Nullable ColumnType

EmpNo 9(5) N IName X(12) N CVDeptNo 999 Y IJobTitle X(12) Y CVSalary zzz,zz9.99 Y DYrsExp z9 Y I

. . . .

. . . .

. . . .

Example 2

This example shows a statement that selects any available commentary about columns in the Employee table:

==> SELECT ColumnName,CommentString FROM DBC.ColumnsWHERE DatabaseName=’Personnel’ ANDTableName=’Employee’ORDER BY Columnid;

ColumnName CommentString

EmpNo Employee serial number.Name Employee name, last then first initial.DeptNoJobTitleSalaryYrsExp

Teradata RDBMS Data Dictionary 3 – 25

Page 138: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesColumnStats

ColumnStats

This view helps obtain statistical information on the columns of a table, for which the statistics are available.

When statistics are collected on a column of a data table, the information is saved into DBC.TVFields.FieldStatistics. The dictionary table TVFields is not accessible to PUBLIC. Through this view, all users can access the column statistics.

Corresponding system tables for this view are the following:

• DBC.DBase• DBC.TVFields• DBC.TVM

Usage Notes

This view is used by the client tools Teradata System Emulation Tool (TSET) and Teradata Visual Explain, besides any client application that requires the statistical information. TSET exports the statistical information for data tables as part of Target Level Emulation.

The information returned includes the Field Statistics for each column, table name and database name, and the sequence number of the column. The SeqNumber is derived from the FieldID. The output is sorted in the order of the SeqNumber.

Example

The following statement selects statistical information about the columns in the table ‘Query’, provided that the statistics have been collected:

==> SELECT *FROM DBC.ColumnStatsWHERE DatabaseName = 'QCD'ANDTableName = 'Query'ORDER BY SeqNumber;

View Name User Type Columns Selected

DBC.ColumnStats All users DatabaseNameI

TVMNameI

FieldStatistics

FieldID

Teradata RDBMS Data Dictionary3 – 26

Page 139: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesColumnStats

The output of this statement is:

FieldStatistics DatabaseName TableName SeqNumberD10706130F2716130100000000000000000000001200010000000000000 QCD QUERY 1

Note: The FieldStatistics information appears in an internal format. The client tools TSET or Teradata Visual Explain can interpret this information.

Teradata RDBMS Data Dictionary 3 – 27

Page 140: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesDatabases[X]

Databases[X]

The Databases view provides information about both databases and users from the DBC.DBase table.

Corresponding system tables for this view include the following:

• DBC.AccessRights• DBC.DBase• DBC.Owners

Usage Notes

The indicators in the JournalFlag column depend on the following:

• the FALLBACK and JOURNAL settings for the database, which serve as the default for all tables created in that database

• any FALLBACK and JOURNAL settings defined in the CREATE TABLE and ALTER TABLE statements

Settings defined for an individual table override the database defaults.

Example

The statement shown in the following screen selects information about the Personnel database.

==> SELECT AccountName,ProtectionType,PermSpace,SpoolSpaceFROM DBC.Databases WHERE DatabaseName = ’Personnel’;

AccountName ProtectionType PermSpace SpoolSpaceTeradata_Sample F 100,000 1,339,884,032

View Name User Type Columns Selected

DBC.Databases[X] End DatabaseNameCreatorNameOwnerNameAccountNameProtectionTypeJournalFlagPermSpaceSpoolSpaceTempSpaceCommentStringCreateTimeStampLastAlterNameLastAlterTimeStampDBKind

Teradata RDBMS Data Dictionary3 – 28

Page 141: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesDatabases2

Databases2

The Databases2 view provides ID definition information about databases. It is similar to the Databases view but returns the ID of the database and Referential Integrity (RI) information instead of the other information (Creator Name, Owner Name, etc.) provided by the Databases view.

The corresponding system table for this view is DBC.DBase.

Usage Notes

The Databases2 view is similar to the Databases view but, for access control purposes, returns the ID of the database instead of the various names other information associated with the database. See the columns of the Databases view for comparison.

The administrator can control who has access to internal ID numbers by limiting the access to the Databases2 view while allowing more (or all) users to access the names via the Databases view.

View Name User Type Columns Selected

DBC.Databases2 All users DatabaseNameDatabaseIdUnResolvedRICount

Teradata RDBMS Data Dictionary 3 – 29

Page 142: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesDatabase_Default_Journals[X]

Database_Default_Journals[X]

The Database_Default_Journals view provides information on each database that is defined as having a default journal table.

Corresponding system tables for this view include the following:

• DBC.AccessRights• DBC.TVM• DBC.DBase• DBC.Owners

Usage Notes

A journal table does not need to reside in the database which it serves.

Example

The following SELECT statement selects the information on each database accessible by the requesting user for which a default journal table is defined.

==> SELECT * FROM DBC.Database_Default_JournalsX;

DatabaseName Journal_DB JournalName

DtBs1 DtBs1 DtBs1JrnlDtBs2 DtBs2 DtBs2JrnlDtBs3 DtBs1 DtBs1Jrnl

View Name User Type Columns Selected

DBC.Database_Default_Journals[X] End DatabaseNameJournal_DBJournalName

Teradata RDBMS Data Dictionary3 – 30

Page 143: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesDBCInfo

DBCInfo

The DBCInfo view provides information about specific attributes of the Teradata RDBMS, such as the current software version and release level. It is updated during each system restart.

The corresponding system table for this view is DBC.InfoTbl.

Usage Notes

Two attributes are maintained in DBCInfo. They are:

• VERSION—Version of the software currently running on the Teradata RDBMS

• RELEASE—Release level of the software currently running on the Teradata RDBMS

Example

The following SELECT statement retrieves the version and release of the current Teradata RDBMS software.

==> SELECT * FROM DBC.DBCInfo;

InfoKey InfoData

VERSION V2R.nn.nn.nn.nnRELEASE nn.nnx.nn.nn

View Name User Type Columns Selected

DBC.DBCInfo Administrator InfoKeyInfoData

Teradata RDBMS Data Dictionary 3 – 31

Page 144: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesDeleteAccessLog[X]

DeleteAccessLog[X]

The DeleteAccessLog view is referenced in a DELETE statement to remove from the access log all entries that are more than 30 days old.

Corresponding system tables for this view include the following:

• DBC.AccLogTbl• DBC.DBase• DBC.Owners

This view also references the userdb view.

Usage Notes

The access log contains entries according to the application of the access logging rules (see “AccessLog” and “AccLogRules”).

The DeleteAccessLog view purges entries from the log that are more than 30 days old.

The view also may be used to display information about records that are eligible for deletion before the delete operation is performed.

Example

The following SELECT statement deletes entries logged against databases owned by the requesting user that were entered more than 30 days before the current calendar date.

==> DELETE FROM DBC.DeleteAccessLogX ALL;

DELETE COMPLETED. 79 RECORDS DELETED.

View Name User Type Columns Selected

DBC.DeleteAccessLog[X] Security Administrator

LogDateLogTime

Teradata RDBMS Data Dictionary3 – 32

Page 145: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesDeleteOldInDoubt

DeleteOldInDoubt

DeleteOldInDoubt view displays those rows in the DBC.InDoubtResLog table that are more than 30 days old. The table contains a row for each transaction that had been in-doubt, and that was subsequently manually resolved.

The corresponding system table for this view is the InDoubtResLog.

Usage Notes

The DeleteOldInDoubt view purges entries from the in-doubt transaction log that are more than 30 days old. Before a delete operation is performed the view may also be used to display information about records eligible for deletion.

Example

The following statement deletes entries logged against in-doubt transactions that were entered more than 30 days before the current calendar date.

==> DELETE FROM DBC.DeleteOldInDoubt ALL;

DELETE COMPLETED. 5 ROWS REMOVED.

View Name User Type Columns Selected

DBC.DeleteOldInDoubt Administrator LogicalHostIdCoordTaskIdLogonUserNameCommitOrRollbackCompletionDateUserLogonTimeSessionNumberRunUnitIdResolvingUserLogonNameUserLogonDateCompletionTimeOptions

Teradata RDBMS Data Dictionary 3 – 33

Page 146: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesDiskSpace[X]

DiskSpace[X]

The DiskSpace view provides AMP-by-AMP vproc information about disk space usage (including spool) for any database or account.

Corresponding system tables for this view include the following:

• DBC.AccessRights• DBC.DataBaseSpace• DBC.DBase• DBC.Owners

The view also references the userdb view.

Usage Notes

When a database or user is created, allocated disk space is divided evenly among all AMPs. The DiskSpace view returns one row of usage information for each AMP in the Teradata RDBMS (or for all AMPs if the SUM aggregate is used).

When a database is created, a space row is added on each AMP, with the processor field in each row initialized to 0. The first time the space row is updated, such as when a table is created in the database or the system is restarted, the processor field in each row is updated to reflect the actual processor number.

You can use the DiskSpace view to build and maintain a table of disk space usage statistics for each username/accountname.

To create the history table, enter the following statement:

CREATE TABLE DiskSpaceHist ( DataBaseName VARCHAR(30),AccountName VARCHAR(30),

View Name User Type Columns Selected

DBC.DiskSpace[X] Administrator VprocDatabaseNameAccountNameMaxPermMaxSpoolMaxTempCurrentPermCurrentSpoolCurrentTempPeakPermPeakSpoolPeakTemp

Teradata RDBMS Data Dictionary3 – 34

Page 147: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesDiskSpace[X]

MaxPerm FLOAT,MaxSpool FLOAT,CurrentPerm FLOAT,

PeakPerm FLOAT,PeakSpool FLOAT,CollectDate DATE,CollectTime FLOAT )PRIMARY INDEX (DataBaseName, AccountName);

Periodically, you can collect usage statistics using the following procedure:

Note: The maximum and peak DiskSpace counters are reset to zero using the ClearPeakDisk macro, which is provided on the release tape. Execute the ClearPeakDisk macro provided in the Teradata RDBMS Data Dictionary, to reset to zero the maximum and peak DiskSpace counters.

This procedure can be carried out using the following BTEQ script.

.LOGON username, password

INSERT INTO DiskSpaceHistSELECT DataBaseName, AccountName,SUM(MaxPerm),SUM(MaxSpool),SUM(CurrentPerm),SUM(PeakPerm),SUM(PeakSpool),DATE, TIMEFROM DBC.DiskSpaceGROUP BY DataBaseName, AccountName, DATE, TIME;

EXECUTE DBC.ClearPeakDisk;

.QUIT

Example

The following SELECT statement displays the permanent disk space across all AMPs.

==> SELECT DISTINCT AMP,DatabaseName,CurrentPerm,MaxPerm FROMDBC.DiskSpace;

AMP DatabaseName CurrentPerm MaxPerm. . . .

Step Action

1 Select statistics from the DiskSpace view and insert them in the history table.

2 Reset DiskSpace counters to zero for the next collection period.

Teradata RDBMS Data Dictionary 3 – 35

Page 148: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesDiskSpace[X]

. . . .0-0 stst14 0 125,0000-0 ud12 0 125,0001-0 atest 1,536 125,0001-0 a1 0 247,5001-0 btest 3,584 5,0001-0 b2test 49,664 250,000. . . .. . . .

1-1 atest 1,536 125,0001-1 a1 0 247,5001-1 btest 3,584 5,0001-1 b2test 50,688 250,000. . . .. . . .

1-2 atest 1,536 125,000

Teradata RDBMS Data Dictionary3 – 36

Page 149: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesEvents[X]

Events[X]

The Events view provides information about the execution of checkpoint statements and client system utility functions.

Corresponding system tables for this view include the following:

• DBC.AccessRights• DBC.RCEvent• DBC.DBase• DBC.Owners

This view also references the userdb view.

Usage Notes

The Events view returns a row for each archive or recovery activity. The types of event rows are as follows:

• Checkpoint Event Row—A row is created for each journal checkpointed. • Delete Event Row—A row is created for each journal deleted. • Dump Event Row—A row is created for each database or table dumped. • Restore Event Row—A row is created for each database or table restored. • Rollback Event Row—A row is created for each database or table rolled

back.

View Name User Type Columns Selected

DBC.Events[X] Operations Control

CreateDateCreateTimeEventNumEventTypeUserNameDatabaseNameObjectTypeAllAMPsFlagRestartSeqNumOperationInProcessTableNameCheckpointNameLinkingEventNumDataSetNameLockModeJournalUsedJournalSavedIndexPresentDupeDumpSet

Teradata RDBMS Data Dictionary 3 – 37

Page 150: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesEvents[X]

• Rollforward Event Row—A row is created for each database or table rolled forward.

The Events view contains the following standard and optional fields:

The CreateDate and CreateTime fields are updated by the PE on which the session is running; thus, all events for a given session are timestamp-ordered.

However, if multiple or concurrent sessions are running on different PEs, any discrepancy in AMP clocks may be reflected in the timestamp sequence. This may also occur if a Teradata RDBMS connects to more than one client system and the client system clocks are not synchronized.

Example

The following SELECT statement selects information associated with the requesting user from the DBC.EventsX view.

==> SELECT CreateDate, CreateTime, EventType, JournalUsed FROMDBC.EventsX;

CreateDate CreateTime EventType JournalUsed

87/03/18 11:10:45 Rollforward R87/03/18 11:18:20 Restore R87/03/19 12:06:34 Rollforward R87/02/12 14:13:38 Dump S

Standard fields Optional fields

EventNum DataSetName

CreateDate TableName,

CreateTime CheckpointName

UserName LinkingEventNum

EventType LockMode

DatabaseName JournalUsed

ObjectType JournalSaved

AllAMPsFlag IndexPresent

RestartSeqNum DupeDumpSet

OperationInProcess

Teradata RDBMS Data Dictionary3 – 38

Page 151: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesEvents_Configuration[X]

Events_Configuration[X]

The Events_Configuration view provides information about utility events that did not affect all AMPs.

Corresponding system tables for this view include the following:

• DBC.RCEvent• DBC.RCConfiguration• DBC.AccessRights• DBC.DBase• DBC.Owners

This view also reference the userdb view.

Usage Notes

The Events_Configuration view contains rows for each archive activity that does not affect all AMPs in the Teradata RDBMS configuration.

If the activity is for all AMPs and there are AMPs off-line, a row is inserted for each off-line AMP. If the activity is for specific AMPs, a row is inserted for each AMP that is specified and on-line.

The CreateDate and CreateTime fields are updated by the PE on which the session is running; thus, all events for a given session are timestamp-ordered.

However, if multiple or concurrent sessions are running on different PEs, any discrepancy in AMP clocks may be reflected in the timestamp sequence. This may also occur if a Teradata RDBMS is connected to more than one client system and the client system clocks are not synchronized.

View Name User Type Columns Selected

DBC.Events_Configuration[X] Operations Control

VprocCreateDateCreateTimeEventNumEventTypeUserNameLogProcessorPhyProcessorProcessorStateRestartSeqNum

Teradata RDBMS Data Dictionary 3 – 39

Page 152: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesEvents_Configuration[X]

Example

The statement on the following screen selects information concerning the requesting user from the DBC.Events_ConfigurationX view.

==> SELECT CreateDate, CreateTime, EventNum, EventTypeFROM DBC.Events_ConfigurationX;

CreateDate CreateTime EventNum EventType

87/03/18 08:53:48 30 Rollforward87/03/18 08:57:49 44 Rollforward87/03/18 08:54:42 33 Rollforward87/03/20 11:26:26 98 Dump87/03/18 09:00:05 52 Rollforward87/03/18 09:30:59 55 Restore87/03/18 08:57:02 41 Rollforward

Teradata RDBMS Data Dictionary3 – 40

Page 153: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesEvents_Media[X]

Events_Media[X]

The Events_Media view provides information about the execution of a client system utility dump or restore function that created or used removable media.

Corresponding system tables for this view include the following:

• DBC.RCEvent• DBC.RCMedia• DBC.AccessRights• DBC.DBase• DBC.Owners

This view also reference the userdb view.

Usage Notes

The CreateDate and CreateTime fields are updated by the PE on which the session is running; therefore, all events for a given session will be timestamp-ordered. However, if multiple or concurrent sessions are running on different PEs, any discrepancy in AMP clocks may be reflected in the timestamp sequence.

This may also occur if a Teradata RDBMS is connected to more than one client system and the client system clocks are not synchronized.

Example

In this example, the requesting user is researching the Events_Media view for events associated with the user named ’PAL’.

==> SELECT DataSetName,VolSerialId,DupeDumpSetFROM DBC.Events_Media WHERE UserName = ’PAL’ ;

View Name User Type Columns Selected

DBC.Events_Media[X] Operations Control

CreateDateCreateTimeEventNumEventTypeUserNameDataSetNameVolSerialIdVolSequenceNumDupeDumpSet

Teradata RDBMS Data Dictionary 3 – 41

Page 154: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesEvents_Media[X]

DataSetName VolSerialId DupeDumpSet

BRM.DBC.TEXT1 000469 NBRM.DBC.TEXT1 000469 NBRM.DBC.TEXT2 000469 NBRM.DBC.TEXT2 000469 NBRM.DBC.TEXT1 BRM001 YBRM.DBC.TEXT1 BRM002 YBRM.DBC.TEXT2 BRM001 NBRM.DBC.TEXT2 BRM002 N

Teradata RDBMS Data Dictionary3 – 42

Page 155: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesHardware_Event_Log

Hardware_Event_Log

The Hardware_Event_Log view provides information about system failures, error conditions and other events originating in the Parallel Data Extensions (PDE) or the Teradata RDBMS.

The corresponding system table for this view is DBC.HW_Event_Log.

Usage Notes

Returned information from this view can help to diagnose where the failure may originate for different types of events.

View Name User Type Columns Selected

DBC.Hardware_Event_Log Operations Control

TheDateTheTimeEvent_TagCategorySeverityPrimary_Part_NumberRevision_LevelSecondary_Part_NumberSerial_NumberPMAModule_TypeSlotSlot_TypeSubSlotSubSlot_TypeFW_VersionVcc_MarginFrequency_MarginVcc_VoltsVcc_AmpsTemperatureLineTextError_Data

Teradata RDBMS Data Dictionary 3 – 43

Page 156: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesHostsInfo

HostsInfo

The HostsInfo view displays information about any user-defined character sets assigned by the Teradata RDBMS system administrator as the default for the client systems in the Teradata RDBMS configuration (also see the “CharSets” and “CharTranslations”).

The corresponding system table for this view is DBC.Hosts.

Usage Notes

If this view does not exist or no rows are found, the default character set of each logon client system is in effect.

Example

The following SELECT statement selects any character sets assigned by the user as the defaults for the client systems in the Teradata RDBMS configuration.

==> SELECT * FROM DBC.HostsInfo;

LogicalHostId HostName DefaultCharSet

136 VM Norwegian_EBCDIC137 LAN ASCII

View Name User Type Columns Selected

DBC.HostsInfo End LogicalHostIdHostNameDefaultCharSet

Teradata RDBMS Data Dictionary3 – 44

Page 157: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesIndices[X]

Indices[X]

The Indices view provides information about each indexed column from the DBC.Indexes table.

Corresponding system tables for this view include the following:

• DBC.AccessRights• DBC.Indexes• DBC.TVM• DBC.TVFields• DBC.DBase• DBC.Owners

Usage Notes

One row is returned from the Indices view for each column in each index. Therefore, a query on an index made up of multiple columns will return multiple rows.

Example

The following SELECT statement displays index information for all the tables in the Personnel database.

==> SELECT TableName,ColumnName,ColumnPosition,IndexType,UniqueFlag FROM DBC.IndicesWHERE DatabaseName= ’Personnel’ORDER BY TableName,ColumnPosition ;

View Name User Type Columns Selected

DBC.Indices[X] Supervisory DatabaseNameTableNameIndexNumberIndexTypeUniqueFlagIndexNameColumnNameColumnPositionCreatorNameCreateTimeStampLastAlterNameLastAlterTimeStamp

Teradata RDBMS Data Dictionary 3 – 45

Page 158: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesIndices[X]

The results of this query are as follows:

TableName ColumnName ColumnPosition IndexType UniqueFlag

Charges Proj_id 1 S NCharges EmpNo 1 P NCharges Proj_id 2 P NDepartment DeptNo 1 P YEmployee EmpNo 1 P YEmployee Name 1 S NProject Proj_id 1 P Y

Teradata RDBMS Data Dictionary3 – 46

Page 159: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesIndexStats

IndexStats

This view helps obtain statistical information on the indexes defined on a table, for which the statistics are available.

When statistics are collected on the indexes of a data table, the information is saved into DBC.Indexes.IndexStatistics. The dictioanry table Indexes is not accessible to PUBLIC. Through this view, all users can access the index statistics.

Corresponding system tables for this view are the following:

• DBC.DBase• DBC.Indexes• DBC.TVM

Usage Notes

This view is used by the client tools Teradata System Emulation Tool (TSET) and Teradata Visual Explain, besides any client application that requires the statistical information.

The information returned includes the Index statistics, table name and database name, and the index number. The output is sorted in the order of the index number.

Example

The following statement selects statistical information about the indexes on the table T1.

==> SELECT *FROM DBC.IndexStatsWHERE DatabaseName = 'Test'ANDTableName = 't1'ORDER BY IndexNumber;

View Name User Type Columns Selected

DBC.IndexStats All users DatabaseName

TVMNameI

IndexStatistics

IndexNumber

Teradata RDBMS Data Dictionary 3 – 47

Page 160: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesIndexStats

The output of this statement is:

IndexStatistics DatabaseName TableName IndexNumber

D10706130F2716130100000000000000000000001200010000000000000 TEST T1 4

Note: The IndexStatistics information appears in an internal format. The client tools TSET or Teradata Visual Explain can interpret this information.

Teradata RDBMS Data Dictionary3 – 48

Page 161: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesInDoubtLog

InDoubtLog

The InDoubtLog view displays the contents of the DBC.InDoubtResLog table. The table contains a row for each transaction that had been in-doubt, and that was subsequently manually resolved.

The corresponding system table for this view is InDoubtResLog.

View Name User Type Columns Selected

DBC.InDoubtLog Administrator LogicalHostIdCoordTaskIdLogonUserNameUserLogonDateCompletionDateCommitOrRollBackSessionNumberRunUnitIdResolvingUserLogonNameUserLogonTimeCompletionTimeOptions

Teradata RDBMS Data Dictionary 3 – 49

Page 162: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesJournals[X]

Journals[X]

The Journals view provides information about the journal table for each data table that uses journal protection. The restricted version of the view displays only those objects that the requesting user either owns or holds access rights to.

Corresponding system tables for this view include the following:

• DBC.AccessRights• DBC.TVM• DBC.DBase• DBC.Owners

Example

The statement on the following screen selects information from the Journals view for the table named PriceA.

==> SELECT TableName,Tables_DB,Journals_DB,JournalNameFROM DBC.Journals WHERE Tablename = ’PriceA’ ;

TableName Tables_DB Journals_DB JournalName

PriceA Acctng Acctng JNLA. . . .. . . .. . . .

View Name User Type Columns Selected

DBC.Journals[X] End Tables_DBTableNameJournals_DBJournalName

Teradata RDBMS Data Dictionary3 – 50

Page 163: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesLogOnOff

LogOnOff

The LogOnOff view supplies information about logon and logoff activity, including attempted logons.

The corresponding system table for this view is Eventlog.

Usage Notes

Event data is useful in determining why a logon attempt was not successful. Information about logon and logoff activity is also maintained on the client system.

LogonSource Example

The following example shows logons from both network-attached and channel-attached clients:

View Name User Type Columns Selected

DBC.LogOnOff Administrator LogDateLogTimeUserNameAccountNameEventLogicalHostIdIFPNoSessionNoLogonDateLogonTimeLogonSource

Teradata RDBMS Data Dictionary 3 – 51

Page 164: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesLogOnOff

Figure 3-1 LogonSource Values

Example

The following SELECT statement displays information about the logon and logoff activity of a specific user for a particular date:

==> SELECT LogDate,LogTime,Event,LogicalHostId,IFPNoFROM DBC.LogOnOff WHERE LogDate=’87/09/29’AND UserName=’Tester’ ORDER BY LogTime;

LogDate LogTime Event LogicalHostId IFPNo

87/09/29 12:35:54 Logon 116 1-487/09/29 12:35:60 Logon 116 1-487/09/29 13:30:37 Logoff 116 1-487/09/29 13:31:45 Logoff 116 1-487/09/29 13:52:52 Logon 116 1-487/09/29 13:56:03 Logoff 116 1-487/09/29 14:05:27 Logon 116 1-487/09/29 14:12:12 Logoff 116 1-487/09/29 14:14:04 Logon failed 116 1-4. . . . .. . . . .. . . . .

Additional Information

See Teradata RDBMS Database Design for more information on controlling access, space, and ownership.

KY01A120

(TCP/IP) C079 153.64.69.48 756 01 LSS(TCP/IP) A401 153.64.69.48

VM TDP5 YT2 0701 LSSMVS TDP5 SDML BATCH FASTMAINJOB075760701 LSS

AGBCLI2JLIBDBSUTIL (673) APPL=CSPSLAVE HOST=BABBAGEBLIBDBSUTIL (651) APPL=CSPSLAVE HOST=BABBAGE

MVSMVSMVSMVSMVSMVSMVSMVS

TDP5TDP5TDP5TDP5TDP5TDP5TDP5TDP5

SDMEYT2COP1AGBMLDBYT2BETQYT2FLDAGBFAST1YT2TPMPYT2TO2

BATCHBATCHBATCHBATCHBATCHBATCHBATCHBATCH

++++++++*YT2 *AGB *++++++++*++++++++*AGB *++++++++*++++++++*

XPORT...........JOB053681101ARCMAIN.......JOB076391101MLOAD...........JOB048661101BTQMAIN.......JOB004431101FASTLOAD....JOB076391101FASTLOAD....JOB030551101TPUMP..........JOB050451101TRUMP..........JOB088881101

LSSLSSLSSLSSLSSLSSLSSLSS

Logons from network-attached clients

Logons from channel-attached clients

Internal PDE sessioninformation

Logons fromchannel-attachedclients

LogonSource Values

Teradata RDBMS Data Dictionary3 – 52

Page 165: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesLogonRules

LogonRules

The LogonRules view retrieves information about logon rules generated as a result of successfully processed GRANT LOGON statements.

Corresponding system tables for this view include the following:

• DBC.LogonRuleTbl • DBC.DBase

Usage Notes

The LOGON rules can be used to redefine the Teradata RDBMS defaults. See "GRANT LOGON" documentation for more information.

The initial defaults are that all users can log on from all client systems and that every logon string must contain a password.

In V2R4.1, Teradata RDBMS, running on Windows 2000, provides the capability of integrating with the Windows logon, so that users only need to identify themselves to Windows. Teradata RDBMS can then use this information to log clients on. Single Sign On is enabled by granting permission to log on "with null password" from the appropriate network, identified by host ID.

View Name User Type Columns Selected

DBC.LogonRules Administrator UserNameLogicalHostIdLogonStatusNullPasswordCreatorNameCreateTimeStamp

Teradata RDBMS Data Dictionary 3 – 53

Page 166: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesRCC_Configuration[X]

RCC_Configuration[X]

The RCC_Configuration view is the product of a join on the Events table and the Configuration table (see “Events[X]” and “Events_Configuration[X]”). It provides information about checkpoint statements and client system utility functions that did not affect all AMPs.

Corresponding system tables for this view include the following:

• DBC.RCConfiguration• DBC.AccessRights• DBC.DBase• DBC.Owners

The view also references the userdb view.

Usage Notes

The RCC_Configuration view contains rows for each client system utility function or CHECKPOINT statement that was executed on a subset of the AMP processors.

Example

The following SELECT statement selects event and processor information from the RCC_Configuration view.

==> SELECT EventNum, LogProcessor, PhyProcessorFROM RCC_Configuration;

EventNum LogProcessor PhyProcessor21 1 1-075 1 1-088 1 1-0

. . .

. . .

21 2 1-275 2 1-2

. . .

. . .

View Name User Type Columns Selected

DBC.RCC_Configuration[X] Operations Control EventNumLogProcessorPhyProcessorProcessorStateRestartSeqNumVproc

Teradata RDBMS Data Dictionary3 – 54

Page 167: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesRCC_Media[X]

RCC_Media[X]

The RCC_Media view is produced by a join on the Events table and the Media table. It provides information about a client system utility dump or restore function that created or used removable media.

Corresponding system tables for this view include the following:

• DBC.RCMedia• DBC.AccessRights• DBC.Owners• DBC.DBase

This view also references the userdb view.

Example

The following SELECT statement selects all rows and all columns from the RCC_Media view.

==> SELECT * FROM DBC.RCC_Media;

EventNum VolSerialID VolSequenceNum DupeDumpSet

21 KAZ002 1 N76 RDB003 1 N66 RDB007 1 N19 KAZ002 1 N66 RDB008 2 N37 MET001 1 N77 RDB003 1 N. . . .. . . .

View Name User Type Columns Selected

DBC.RCC_Media[X] Operations Control EventNumVolSerialIdVolSequenceNumDupeDumpSet

Teradata RDBMS Data Dictionary 3 – 55

Page 168: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesRI_Child_Tables

RI_Child_Tables

The RI_Child_Tables view provides information about tables in child-parent order. It is similar to the All_RI_Children view but returns the internal IDs of databases, tables, and columns instead of names.

Corresponding tables for this view include the following:

• DBC.ReferencingTbls• DBC.Dbase

Usage Notes

The RI_Child_Tables view is similar to the All_RI_Children view but returns the IDs of databases, tables, and columns instead of the names for access control purposes. The administrator can control who has access to internal ID numbers by limiting the access to the RI_Child_Tables view while allowing more (or all) users to access the names via the All_RI_Children view.

View Name User Type Columns Selected

DBC.RI_Child_Tables All users IndexIDIndexNameChildDbIDChildTIDChildKeyFIDParentDbIDParentTIDParentKeyFIDInconsistencyFlagCreatorNameCreateTimeStamp

Teradata RDBMS Data Dictionary3 – 56

Page 169: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesRI_Distinct_Children

RI_Distinct_Children

The RI_Distinct_Children view provides information about tables in child-parent order without the duplication that could result from multi-column foreign keys.

Corresponding system tables for this view include the following:

• DBC.ReferencingTbls• DBC.TVM• DBC.DBase

View Name User Type Columns Selected

DBC.RI_Distinct_Children All users IndexIDIndexNameChildDBChildTableParentDBParentTableInconsistencyFlagCreatorNameCreateTimeStamp

Teradata RDBMS Data Dictionary 3 – 57

Page 170: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesRI_Distinct_Parents

RI_Distinct_Parents

The RI_Distinct_Parents provides information about tables in parent-child order without the duplication that could result from multi-column foreign keys.

Corresponding tables for this view include the following:

• DBC.ReferencingTbls• DBC.TVM• DBC.Dbase

View Name User Type Columns Selected

DBC.RI_Distinct_Parents All users IndexIDIndexNameParentDBParentTableChildDBChildTableInconsistencyFlagCreatorNameCreateTimeStamp

Teradata RDBMS Data Dictionary3 – 58

Page 171: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesRI_Parent_Tables

RI_Parent_Tables

The RI_Parent_Tables view provides information about all tables in parent-child order.

Corresponding system tables for this view include the following:

• DBC.ReferencingTbls• DBC.DBase

Usage Notes

The RI_Parent_Tables view is similar to the All_RI_Parents view but returns the IDs of databases, tables, and columns instead of the names for access control purposes.

The administrator can control who has access to internal ID numbers by limiting the access to the RI_Parent_Tables view while allowing more (or all) users to access the names via the All_RI_Parents view.

View Name User Type Columns Selected

DBC.RI_Parent_Tables All users IndexIDIndexNameParentDbIDParentTIDParentKeyFIDChildDbIDChildTIDChildKeyFIDInconsistencyFlagCreatorNameCreateTimeStamp

Teradata RDBMS Data Dictionary 3 – 59

Page 172: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesSecurityDefaults

SecurityDefaults

The SecurityDefaults view describes the password features selected for the site.

The corresponding system table for this view is SysSecDefaults.

Additional Information

For more information on controlling access, space, and ownership, see the following manuals:

• Teradata RDBMS Database Design• Teradata RDBMS Security Administration• Teradata RDBMS Database Administration

View Name User Type Columns Selected

DBC.SecurityDefaults SecurityAdministrator

ExpirePasswordPasswordMinCharPasswordMaxCharPasswordDigitsPasswordSpecCharMaxLogonAttemptsLockedUserExpirePasswordReuse

Teradata RDBMS Data Dictionary3 – 60

Page 173: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesSecurityLog[X]

SecurityLog[X]

The SecurityLog view provides a subset of the information available through the AccessLog view. It is retained in this release to provide compatibility with earlier releases.

Note: Note that the column named DatabaseName was previously named ObjectName.

Corresponding system tables for this view include the following:

• DBC.AccLogTbl• DBC.DBase• DBC.Owners

This view also references the userdb view.

Usage Notes

For an explanation of the BEGIN/END LOGGING statements, please refer to Teradata RDBMS SQL Reference.

View Name User Type Columns Selected

DBC.SecurityLog[X] SecurityAdministrator

LogDateLogTimeLogTypeUserNameAccountNameDatabaseNameTableNameText

Teradata RDBMS Data Dictionary 3 – 61

Page 174: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesSessionInfo[X]

SessionInfo[X]

The SessionInfo view provides information about users who are currently logged on.

The corresponding system table for this view is SessionTbl.

Usage Notes

Information about current session pools, which are a collection of sessions that are logged on to the Teradata RDBMS under the same logonid, may be accessed by entering the DISPLAY POOL command.

Example

The following SELECT statement displays information on all current sessions.

==> SELECT UserName, SessionNo, DefaultDatabase, LogonSourceFROM DBC.SessionInfo;

UserName SessionNo DefaultDatabase LogonSource

BAS 1,020 BAS VM TDPM

SOFTDOC 1,016 Personnel MVS TDPG

UserTest 1,008 DBC

View Name User Type Columns Selected

DBC.SessionInfo[X] Administrator UserNameAccountNameSessionNoDefaultDatabasePartitionLogicalHostIdHostNoCurrentCollationLogonDateLogonTimeLogonSequenceNoLogonSourceExpiredPasswordTwoPCModeTransaction_Mode

Teradata RDBMS Data Dictionary3 – 62

Page 175: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesSessionInfo[X]

LogonSource Example

The following screen displays LogonSource information from the current sessions:

select logonsource from dbc.sessioninfo;

*** Query completed. 3 rows found. One column returned.*** Total elapsed time was 1 second.

LogonSource

(TCP/IP) 0438 153.64.115.59(TCP/IP) 0448 153.64.115.59 251 01 LSS(TCP/IP) 0491 141.206.19.180 893 01 LSS

0438 hex = 1080 decimal <---- winddi via ODBC from TD Manager0448 hex = 1096 decimal <---- dmteq PID = 251 from PC0491 hex = 1169 decimal <---- bteq PID = 893 from unix

root@napier# netstat -anActive Internet connections (including servers)Proto Recv-Q Send-Q Local Address Foreign Address (state)tcp 0 0 141.206.19.180.1025 153.64.115.59.1096 ESTABLISHEDtcp 0 0 141.206.19.180.1025 153.64.115.59.1080 ESTABLISHEDtcp 0 2 141.206.19.180.23 153.64.115.59.1063 ESTABLISHEDtcp 0 0 141.206.19.180.23 153.64.115.59.1062 ESTABLISHEDtcp 0 0 141.206.19.180.1025 141.206.19.180.1169 ESTABLISHEDtcp 0 0 141.206.19.180.1169 141.206.19.180.1025 ESTABLISHED

Teradata RDBMS Data Dictionary 3 – 63

Page 176: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesShowColChecks

ShowColChecks

The ShowColChecks view provides information about column constraints for a table in a database.

Corresponding system tables for this view include:

• DBC.TVFields• DBC.TVM• DBC.DBase

View Name User Type Columns Selected

DBC.ShowColChecks All users DatabaseNameTableNameColumnNameColCheckCreatorNameCreateTimeStamp

Teradata RDBMS Data Dictionary3 – 64

Page 177: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesShowTblChecks

ShowTblChecks

The ShowTblChecks view provides information about table constraints for a database.

Corresponding system tables for this view include the following:

• DBC.TableContraints• DBC.DBase• DBC.TVM

View Name User Type Columns Selected

DBC.ShowTblChecks All users DatabaseNameTableNameCheckNameTblCheckCreatorNameCreateTimeStamp

Teradata RDBMS Data Dictionary 3 – 65

Page 178: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesSoftware_Event_Log

Software_Event_Log

The Software_Event_Log view provides information about logged software events originating in the Parallel Data Extensions (PDE) or the Teradata RDBMS.

The corresponding system table for this view is SW_Event_Log.

Usage Notes

For Database Query Manager, the following fields are not used:

• Stacktrace• Error_Data• Category • Severity• PMA• Vproc• Partition• Task• Function• SW_Version

View Name User Type Columns Selected

DBC.Software_Event_Log Operations Control

TheDateTheTimeEvent_TagCategorySeverityPMAVprocPartitionTaskFunctionSW_VersionLineTextStackTrace

Error_Data

Teradata RDBMS Data Dictionary3 – 66

Page 179: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesSoftware_Event_Log

Example

The following statement requests the software event log information for any event with a severity level of 50 (unrecoverable user error, no user restart):

SELECT TheDate, TheTime, Category, SeverityFROM Software_Event_LogWhere Severity = ‘50’ ;

The result has the following form:

TheDate TheTime Category Severity92/08/20 10:10:30 4 50

Teradata RDBMS Data Dictionary 3 – 67

Page 180: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesTable_LevelConstraints

Table_LevelConstraints

The Table_LevelConstraints view provides information about table constraints for a database.

Corresponding system tables for this view include the following:

• DBC.Table_Contraints• DBC.DBase• DBC.TVM

View Name User Type Columns Selected

DBC.Table_LevelConstraints All users DatabaseNameTableNameConstraintNameConstraintTextCreatorNameCreateTimeStamp

Teradata RDBMS Data Dictionary3 – 68

Page 181: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesTables[X]

Tables[X]

The Tables view provides information about tables, views, stored procedures, join indexes, and macros.

The DBC.TVM table contains one row for each table, view, or macro in the database.

Corresponding system tables for this view include the following:

• DBC.AccessRights• DBC.TVM• DBC.DBase• DBC.Owners

Usage Notes

The RequestText data reflects the definitions specified by the user. This may not always match the data returned by the SHOW TABLE statement, which reflects the reconstructed definitions as they exist in the Teradata RDBMS Data Dictionary.

For example, when obsolete syntax that is still supported is converted internally to current syntax, RequestText returns the submitted (obsolete) syntax, while SHOW TABLE returns the converted (current) syntax.

View Name User Type Columns Selected

DBC.Tables[X] All users DatabaseNameTableNameVersionTableKindProtectionTypeJournalFlagCreatorNameRequestTextCommentStringParentCountChildCountNamedTblCheckCountUnnamedTblCheckExistPrimaryKeyIndexIdCreateTimeStampLastAlterNameLastAlterTimeStamp

Teradata RDBMS Data Dictionary 3 – 69

Page 182: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesTables[X]

Example

The following SELECT statement displays information about tables, views, and macros in the Personnel database.

==> SELECT TableName,CreatorName,TableKind,ProtectionType FROMDBC.Tables WHERE DatabaseName = ’Personnel’ ;

TableName CreatorName TableKind ProtectionType

NewEmp GREENE M FEmployeeInfo GREENE V FEmployee DBC T FDepartment DBC T FProject JONES T FCharges JONES T F

Teradata RDBMS Data Dictionary3 – 70

Page 183: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesTables2

Tables2

The Tables2 view provides ID definition information about tables. It is similar to the Tables view but includes the ID of the table and database instead of the other information (Version, TableKind, etc.) provided by the Tables view.

The corresponding system table for this view is TVM.

View Name User Type Columns Selected

DBC.Tables2 All users TVMNameTVMIdDatabaseIdParentCountChildCount

Teradata RDBMS Data Dictionary 3 – 71

Page 184: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesTableSize[X]

TableSize[X]

The TableSize view provides AMP-by-AMP vproc information about disk space usage (not including spool) for each database, table (including journal tables), stored procedure, join index, or account.

Corresponding system tables for this view include the following:

• DBC.AccessRights• DBC.DatabaseSpace• DBC.TVM• DBC.DBase• DBC.Owners

Usage Notes

When a database or table is created, the allocated disk space is divided evenly among all AMPs. The TableSize view returns one row of usage information for each AMP in the Teradata RDBMS (or for all AMPs if the SUM aggregate is used).

Example

The following SELECT statement is used to contrast the total disk space currently being used by the Employee table with its peak usage figure.

==> SELECT SUM(PeakPerm), SUM(CurrentPerm)FROM DBC.TableSize WHERE TableName=’Employee’ ;

Sum(PeakPerm) Sum(CurrentPerm)

260,608 260,608

View Name User Type Columns Selected

DBC.TableSize[X] Administrator VprocDatabaseNameAccountNameTableNameCurrentPermPeakPerm

Teradata RDBMS Data Dictionary3 – 72

Page 185: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesTriggers

Triggers

The Triggers view provides information about event-driven, specialized procedures attached to a single table and stored in the database.

Corresponding system tables for this view include the following:

• DBC.TriggersTbl• DBC.TVM• DBC.DBase

Usage Notes

A trigger is defined by a CREATE TRIGGER data modification statement. An INSERT, UPDATE or DELETE statement on the specified table or view causes the database to execute the trigger.

Triggers can be of two types: ROW or STATEMENT. When a triggered statement fires a trigger, cascading ensues that can, in some instances, fire other triggers and become triggering statements.

The REFERENCING clause must be used when referencing subject tables that are qualified with old or new table values. In addition, all subject table columns must use new or old correlation names.

Note: A positioned (updatable cursor) UPDATE or DELETE is not allowed to fire a trigger and generates an error. In addition, the FastLoad and MultiLoad utilities return an error if any triggers are enabled on the target table.

View Name User Type Columns Selected

DBC.Triggers Administrator DatabaseNameTableNameTriggerNameEnabledFlagActionTimeEventKindOrderNumberTriggerCommentRequestTextCreatorNameCreateTimeStampLastAlterNameLastAlterTimeStamp

Teradata RDBMS Data Dictionary 3 – 73

Page 186: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesTriggers

Example 1

The following example defines two triggers on a parent table. These triggers ensure that the changes made to the parent table are propagated to the child table.

CREATE TABLE Parent_Tab (PrimKey int, Col2 int, Col3 int);CREATE TABLE Child_Tab (PrimKey int, ForKey int, Col3 int);

CREATE TRIGGER UpdateForKey BEFORE UPDATE of (PrimKey) ONParent_Tab REFERENCING OLD AS OldRow NEW AS NewRowFOR EACH ROW(UPDATE Child_Tab SET ForKey = NewRow.PrimKey WHEREChild_Tab.ForKey = OldRow.PrimKey;);

CREATE TRIGGER DelForKey = BEFORE DELETE ON Parent_Tab REFERENCINGOLD AS OldRowFOR EACH ROW(UPDATE ChildTab SET ForKey = NULL WHERE ForKey =OldRow.PrimKey;);

Teradata RDBMS Data Dictionary3 – 74

Page 187: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesUserGrantedRights

UserGrantedRights

The UserGrantedRights view provides information about objects on which the current user has explicitly granted privileges to other users.

Corresponding system tables for this view include the following:

• DBC.AccessRights• DBC.TVM• DBC.TVFields• DBC.DBase

This view also references the ownerdb view.

Example

The following SELECT statement displays all rights that the current user has granted to other users.

==> SELECT DatabaseName,TableName,Grantee,AccessRightFROM DBC.UserGrantedRights;

DatabaseName TableName Grantee AccessRight

Personnel Employee Greene RPersonnel Employee Greene UPersonnel Employee Greene I

View Name User Type Columns Selected

DBC.UserGrantedRights End DatabaseNameTableNameColumnNameGranteeAccessRightGrantAuthorityAllnessFlagCreatorNameCreateTimeStamp

Teradata RDBMS Data Dictionary 3 – 75

Page 188: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesUserRights

UserRights

The UserRights view provides information about objects on which the user has explicitly or automatically been granted privileges including the following: tables, views, join indexes, columns, stored procedures, or macros.

Corresponding system tables for this view include the following:

• DBC.AccessRights• DBC.TVM• DBC.TVFields• DBC.DBase

This view also references the userdb view.

Usage Notes

To display the privileges that the user has been granted on database D, the SELECT statement must specify:

WHERE DatabaseName = ’D’ AND TableName = ’All’ ;

If privileges have been granted on the database, a row is returned for each privilege.

The UserRights view does not return information about implicit privileges for a user (for example, the GRANT privilege on each database owned by the user).

Example

The following SELECT statement displays information about all tables in the Personnel database on which rights were granted to the requesting user.

==> SELECT * FROM DBC.UserRightsWHERE DatabaseName=’Personnel’AND TableName = ’All’ ;

View Name User Type Columns Selected

DBC.UserRights End DatabaseNameTableNameColumnNameAccessRightGrantAuthorityGrantorNameCreatorNameCreateTimeStamp

Teradata RDBMS Data Dictionary3 – 76

Page 189: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesUserRights

DatabaseName TableName AccessRight GrantorNamePersonnel Employee R DBCPersonnel Employee U DBCPersonnel Employee I DBC

Teradata RDBMS Data Dictionary 3 – 77

Page 190: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesUsers

Users

The Users view provides information about username space that the requesting user created or owns.

Corresponding system tables for this view include the following:

• DBC.AccessRights• DBC.Owners• DBC.DBase

This view also references the userdb view.

Example

The following SELECT statement displays information about all users owned or created by the current user, Jones.

==> SELECT UserName,CreatorName,PermSpace,SpoolSpaceFROM DBC.Users;

View Name User Type Columns Selected

DBC.Users Supervisory UserNameCreatorNamePasswordLastModDatePasswordLastModTimeOwnerNamePermSpaceSpoolSpaceTempSpaceProtectionTypeJournalFlagStartupStringDefaultAccountDefaultDataBaseCommentStringDefaultCollationPasswordChgDateLockedDateLockedTimeLockedCountTimeZoneHourTimeZoneMinuteDefaultDateFormCreateTimeStampLastAlterNameLastAlterTimeStampDefaultCharType

Teradata RDBMS Data Dictionary3 – 78

Page 191: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesUsers

UserName CreatorName PermSpace SpoolSpace

Jones sysadmin 1,000,000 1,000,000Peterson Jones 100,000 1,000,000Moffit Jones 100,000 1,000,000Chin Jones 100,000 1,000,000Greene Jones 100,000 1,000,000

Additional Information

See Teradata RDBMS Database Design for more information on controlling access, space, and ownership.

Teradata RDBMS Data Dictionary 3 – 79

Page 192: Data Dictionary Views

Chapter 3: System Views: Usage and ExamplesUser_Default_Journals[X]

User_Default_Journals[X]

The User_Default_Journals view provides information on user databases that have a default journal specification.

Corresponding system tables for this view include the following:

• DBC.AccessRights• DBC.Owners• DBC.DBase

Usage Notes

A journal table need not reside in the user space that it serves.

Example

The following SELECT statement selects information on each user database to which the requesting user has access, and for which a default journal table is defined.

==> SELECT * FROM DBC.User_Default_JournalsX;

UserName Journal_DB JournalName

Usr1 Usr1 Usr1JrnlUsr2 Usr2 Usr2JrnlUsr3 Usr3 Usr3Jrnl

View Name User Type Columns Selected

DBC.User_Default_Journals[X] End UserNameJournal_DBJournalName

Teradata RDBMS Data Dictionary3 – 80

Page 193: Data Dictionary Views

Chapter 4:

System Tables

The primary focus of this chapter is to provide a detailed listing of all the fallback protected system tables of the Data Dictionary including: the columns returned, the column data types, and the primary and secondary index columns of each table.

In addition, this chapter explains the use of the DBC.ALL table, the TVM and TVFields tables, describes the non-hashed non-fallback protected tables, stored procedures, and briefly describes the ResUsage tables. For a detailed description of the ResUsage tables, see Teradata RDBMS Resource Usage Macros and Tables.

Teradata RDBMS Data Dictionary 4 – 1

Page 194: Data Dictionary Views

Chapter 4: System TablesCreating System Tables

Creating System Tables

The Data Dictionary System tables are generated during system initialization (SysInit) and/or by the Table Initialization Program. They store information about the DBC database that can be examined directly or through the system views.

Teradata RDBMS Data Dictionary4 – 2

Page 195: Data Dictionary Views

Chapter 4: System TablesSpecial Table Information

Special Table Information

DBC.ALL Table

The purpose of the DBC.ALL table is provide the user with a table name for a zero table ID. This can occur when a GRANT is performed to give an access right on a database without mention of a table. In this case, DBC.ALL will appear as the table name.

It is necessary for the DBC.ALL table to exist to allow a join between the access rights tables and the TVM table.

DBC.TVM Table

The DBC.TVM table contains one row for each table, view, trigger, stored procedure, join index, or macro in the database.

DBC.TVFields Table

The DBC.TVFields table contains one row for each occurrence of the following in every view and table in the database:

• Column, except when the view contains more than 51 columns• Join index• Macro• Stored procedure

Stored Procedures

The information pertaining to a stored procedure object is stored in the DBC.TVM, DBC.TVFields, DBC.AccessRights, and DBC.AccLogRulesTbl tables of the DD.

The column, SPObjectCodeRows, in the DBC.TVM table references information on the status of the stored procedure. The value of this column indicates the following stored procedure creation-time attributes:

• Session mode• Server platform • Print option• SPL text storage option• Teradata Stored Procedure (TDSP) version number

The column SPParameterType in the DBC.TVFields table contains information on the parameters of the stored procedure. Parameter types for this column include IN, INOUT, or OUT.

Teradata RDBMS Data Dictionary 4 – 3

Page 196: Data Dictionary Views

Chapter 4: System TablesSpecial Table Information

The access rights of CREATE PROCEDURE, EXECUTE PROCEDURE, and DROP PROCEDURE are stored in AccessRights. The corresponding logging rules are stored in AccLogRuleTbl. These respective columns are called AcrCreateProcedure, AcrExecuteProcedure, and AcrDropProcedure.

The Transient Journal (TJ) record holds the host request number for a stored procedure, in addition to the DBS request number. This is required to return a correct response to the “query status” for a request after DBS restarts.

ResUsage Tables

ResUsage tables store data that is gathered from specified data collection and logging phases of Teradata RDBMS sub-systems. This data is then used by ResUsage macros to provide resource usage statistics. User-written queries or macros may also be used to generate reports from this data.

ResUsage tables, primarily of interest to NCR development, support, and field engineers, are described in appendices of Teradata RDBMS Resource Usage Macros and Tables.

Teradata RDBMS Data Dictionary4 – 4

Page 197: Data Dictionary Views

Chapter 4: System TablesNon-Hashed Tables

Non-Hashed Tables

The following table lists and describes the non-hashed and NO FALLBACK Data Dictionary Tables:

Only tables without suffixes are used by the RDBMS (for example, DBC.AcccessRights; therefore, only tables without suffixes are covered in this chapter.

Tables with suffixes (for example, DBC.AcccessRights_V2R2), are not used by the RDBMS and are not covered in this chapter.

Non-Hashed, NO FALLBACK Tables Description

DBC.Acctg Resource usage by Acct/User

DBC.ChangedRowJournal Down -AMP recovery journal

DBC.DatabaseSpace Database and table space accounting

DBC.LocalSessionStatusTable Last request status by AMP

DBC.LocalTransactionStatusTable Last transaction consensus status

DBC.OrdSysChngTable AMP recovery journal

DBC.RecoveryLockTable Recovery session locks

DBC.RecoveryPJTable Permanent journal recovery

DBC.SavedTransactionStatus AMP recovery table

DBC.SysRcvStatJournal Recovery, reconfig, and startup info

DBC.TransientJournal Backout uncommitted transactions

DBC.UtilityLockJournalTable Host utility lock records

Teradata RDBMS Data Dictionary 4 – 5

Page 198: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

Data Dictionary FALLBACK Tables

The following table lists all of the FALLBACK protected tables of the system DBC, except for the ResUsage tables that are explained in detail in the Teradata RDBMS Resource Usage Macros and Tables book.

Unique Primary Indexes (UPIs), Non-Unique Primary Indexes (NUPIs), Unique Secondary Indexes (USIs) and Non-Unique Secondary Indexes (NUSIs) are indicated for each table.

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

DBC.AccessRights

Contains the permissions for a user.

UserId (NUPI) Dbase.DatabaseId BYTE(4), NOT NULL X(8)

DatabaseId (NUPI) Dbase.DatabaseIdTVM.DatabaseId

BYTE(4), NOT NULL X(8)

TVMId (NUSI) TVM.TVMIdTVFields.Tableid

BYTE(6), NOT NULL X(12)

FieldId TVFields.Fieldid SMALLINT, NOT NULL

---,--9

AccessRight None CHAR (2), LATIN, NOT NULL

X(2)

WithGrant None CHAR (1), LATIN, NOT NULL

X(1)

GrantorId Dbase.Databaseid BYTE(4), NOT NULL X(8)

AllnessFlag None CHAR(1), LATIN, NOT NULL

X(1)

CreateUID Dbase.DatabaseId BYTE(4) X(8)

CreateTimeStamp None TIMESTAMP(0) yyyy-mm-ddhh:mm:ss

LastAccessTimeStamp None TIMESTAMP(0) yyyy-mm-ddhh:mm:ss

AccessCount None INTEGER --,---,---,--9

Teradata RDBMS Data Dictionary4 – 6

Page 199: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.AccLogRuleTbl

Controls the logging of access rights checks for the specified users or references to the specified objects.

UserId (UPI) Dbase.DatabaseId BYTE(4), NOT NULL X(8)

DatabaseId (UPI) Dbase.DatabaseId BYTE(4), NOT NULL X(8)

TVMId (UPI) TVM.TVMId BYTE(6), NOT NULL X(12)

ColumnId(UPI) TVFields.FieldId SMALLINT ---,--9

AcrCheckPoint None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

AcrCreateDataBase None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

AcrCreateMacro None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

AcrCreateProcedure None CHAR(3), NULL X(3)

AcrCreateTable None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

AcrCreateUser None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

AcrCreateView None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

AcrDelete None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

AcrDropDatabase None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary 4 – 7

Page 200: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.AcclogRuleTbl(Continued)

AcrDropMacro None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

AcrDropProcedure None CHAR(3), NULL X(3)

AcrDropTable None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

AcrDropUser None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

AcrDropView None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

AcrDump None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

AcrExecute None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

AcrExecuteProcedure None CHAR(3), NULL X(3)

AcrGrant None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

AcrInsert None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

AcrIndex None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

AcrReference None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary4 – 8

Page 201: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.AccLogRuleTbl (Continued)

AcrRestore None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

AcrSelect None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

AcrUpdate None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

AcrCreateTrigger None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

AcrDropTrigger None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

AcrCreateProcedure None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

AcrDropProcedure None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

AcrExecuteProcedure None CHAR(3), LATIN, NOT CASE SPECIFIC, NOT NULL

X(3)

CreateUID Dbase.DatabaseId BYTE(4) X(8)

CreateTimeStamp None TIMESTAMP(0) yyyy-mm-ddhh:mm:ss

LastAccessTimeStamp None TIMESTAMP(0) yyyy-mm-ddhh:mm:ss

AccessCount None INTEGER --,---,---,--9

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary 4 – 9

Page 202: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.AccLogTbl

Contains the result of the logging activity controlled by the AccLogRuleTbl.

LogonDate None DATE, NOT NULL YYYY/MM/DD

LogonTime None FLOAT, NOT NULL 99:99:99

TheDate None DATE, NOT NULL YYYY/MM/DD

TheTime None FLOAT, NOT NULL 99:99:99

LogicalHostId None SMALLINT, NOT NULL

ZZZ9

IFPNo None SMALLINT, NOT NULL

-(5)9

SessionNo None INTEGER, NOT NULL

--,---,---,--9

UserId Dbase.DatabaseId BYTE(4), NOT NULL X(8)

UserName Dbase.DatabaseName VARCHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

AccountName None VARCHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

Result None CHAR(1), LATIN, NOT CASESPECIFIC, NOT NULL

X(1)

SeqInHash None INTEGER, NOT NULL

--,---,---,--9

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary4 – 10

Page 203: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.AccLogTbl(Continued)

AccessType None CHAR(2), LATIN, NOT CASESPECIFIC, NOT NULL

X(2)

Accesskind None BYTEINT, NOT NULL

--9

Frequency None CHAR(1), LATIN, NOT CASESPECIFIC, NOT NULL

X(1)

EventCount None INTEGER --,---,---,--9

OwnerName Dbase.DatabaseName VARCHAR(30), LATIN, NOT CASESPECIFIC,

X(30)

DataBaseName Dbase.DatabaseName VARCHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

TVMName TVM.TVMName VARCHAR(30), LATIN, NOT CASESPECIFIC,

X(30)

ColumnName None VARCHAR(30), LATIN, NOT CASESPECIFIC,

X(30)

ObjectLevel None CHAR(1), LATIN, NOT CASESPECIFIC, NOT NULL

X(1)

ObjectId Dbase.DatabaseIdTVM.TVMId

BYTE(4), NOT NULL X(8)

ColumnId None SMALL INT ---,--9

StatementKind None SMALL INT ---,--9

StatementType None VARCHAR(20), LATIN, NOT CASESPECIFIC,

X(20)

StatementText None VARCHAR(8192), UNICODE, NOT CASE SPECIFIC

X(8192)

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary 4 – 11

Page 204: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.Acctg

Contains a row for each account a user owns on each AMP.

NO FALLBACKNON-HASHED

AccountName (UPI) None CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

UserName (UPI) Dbase.DatabaseName CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

CPU None FLOAT, NOT NULL ---,---,---,--9.99

IO None FLOAT, NOT NULL --,---,---,--9

Vproc None SMALLINT, NOT NULL

-(5)9

VprocType None CHAR(4), LATIN, NOT CASESPECIFIC, NOT NULL

X(4)

Model None CHAR(4), LATIN, NOT CASESPECIFIC, NOT NULL

X(4)

DBC.CollationTbl

Contains user-definable collation definitions.

CollName (UPI) None CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

CollInstall None CHAR(1), LATIN, NOT CASESPECIFIC, NOT NULL

X(1)

CollEqvClass None BYTE(256), NOT NULL

X(512)

CollOrderCS None BYTE(256), NOT NULL

X(512)

CollOrderUC None BYTE(256), NOT NULL

X(512)

LastAccessTimeStamp None TIMESTAMP(0) yyy-mm-ddhh:mm:ss

AccessCount None INTEGER --,---,---,--9

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary4 – 12

Page 205: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.ConstraintNames

Contains a row for each named index or referential constraint defined on a table in the system.

DatabaseId (NUPI) Dbase.DatabaseId BYTE(4), NOT NULL X(8)

TableId (NUPI) TVM.TVMId BYTE(6), NOT NULL X(12)

Name None CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

NameI None CHAR(30), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(30)

ConstraintType None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

IndexId None SMALLINT ---,--9

CreateUID Dbase.DatabaseId BYTE(4) X(8)

CreateTimeStamp None TIMESTAMP(0) yyyy-mm-ddhh:mm:ss

LastAccessTimeStamp None TIMESTAMP(0) yyyy-mm-ddhh:mm:ss

AccessCount None INTEGER --,---,---,--9

DBC.DatabaseSpace

Does space accounting for each database and each table in a database.

NO FALLBACKNON-HASHED

DatabaseId (UPI) Dbase.DatabaseId BYTE(4), NOT NULL X(8)

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary 4 – 13

Page 206: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.Dbase

Contains a row for each database in the system.

DatabaseNameI (UPI) None CHAR(30), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(30)

DatabaseId (USI) Accounts.UserId

Databasespace.Databaseid

Accessrights.UserId

Owners.ownerid

TVM.databaseId

ReferencingTbls.ReferencingDbId

DBCAssociation.DatabaseId

Owners.owneeid

ReferencedTbls.ReferencedDbId

TableConstraints.DbaseId

Triggerstbl.DatabaseId

BYTE(4), NOT NULL X(8)

OwnerId Dbase.DatabaseId BYTE(4), NOT NULL X(8)

PasswordString None CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

ProtectionType None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

JournalFlag None CHAR(2), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(2)

PermSpace None FLOAT, NOT NULL ----,---,---,---,--9

SpoolSpace None FLOAT, NOT NULL ----,---,---,---,--9

StartupString None VARCHAR(255), UNICODE, NOT CASESPECIFIC

X(255)

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary4 – 14

Page 207: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.Dbase(Continued)

CommentString None VARCHAR(255), UNICODE, NOT CASESPECIFIC

X(255

AccountName None CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

CreatorName Dbase.DatabaseName CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

DatabaseName RCEvent.DatabaseName

AcclogTbl.UserName

CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

JournalId None BYTE(6) X(12)

Version None SMALLINT ---,--9

OwnerName Dbase.DatabaseName CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

NumFallBackTables None SMALLINT, NOT NULL

---,--9

NumLogProtTables None SMALLINT, NOT NULL

---,--9

DefaultDatabase Dbase.DatabaseName CHAR(30), LATIN, NOT CASESPECIFIC

X(30)

LogonRules None SMALLINT, NOT NULL

---,--9

AccLogRules None SMALLINT, NOT NULL

---,--9

AccLogUsrRules None SMALLINT, NOT NULL

---,--9

DefaultCollation None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

RowType None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

PasswordChgDate None INTEGER --,---,---,--9

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary 4 – 15

Page 208: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.Dbase(Continued)

LockedDate None INTEGER --,---,---,--9

LockedTime None SMALLINT ---,--9

LockedCount None BYTEINT ---9

UnResolvedRICount None SMALLINT, NOT NULL

---,--9

TimeZoneHour None BYTEINT ---9

TimeZoneMinute None BYTEINT ---9

DefaultDateForm None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC

X(1)

CreateUID Dbase.DatabaseId BYTE(4) X(8)

CreateTimeStamp None TIMESTAMP(0) X(20)

LastAlterUID Dbase.DatabaseId BYTE(4) X(8)

LastAlterTimeStamp None TIMESTAMP(0) yyyy-mm-ddhh:mm:ss

TempSpace None FLOAT, NOT NULL ----,---,---,---,--9

LastAccessTimeStamp None TIMESTAMP(0) yyyy-mm-ddhh:mm:ss

AccessCount None INTEGER --,---,---,--9

DefaultCharType None SMALLINT ---,--9

DBC.DBCAssociation

Contains the results of the porting of a data table between DBCs by Archive/Recovery software.

TVMId (UPI) TVM.TVMId BYTE(6), NOT NULL X(12)

DatabaseId Dbase.DatabaseId BYTE(4), NOT NULL X(8)

JournalId None BYTE(6) X(12)

EventNum None INTEGER, NOT NULL

--,---,---,--9

Original_DatabaseName

None CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

Original_DataBaseId None BYTE(4), NOT NULL X(12)

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary4 – 16

Page 209: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.DBCAssociation(Continued)

Original_TVMNameI None CHAR(30), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(30)

Original_LogicalHostId

None SMALLINT ZZZ9

Original_SessionNo None INTEGER --,---,---,--9

Original_TVMId None BYTE(6), NOT NULL X(12)

Original_TableKind None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

Original_ProtectionType

None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

Original_TempFlag None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC

X(1)

Original_HashFlag None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

Original_NextIndexId None SMALLINT, NOT NULL

---,--9

Original_NextFieldId None SMALLINT, NOT NULL

---,--9

Original_Version None SMALLINT, NOT NULL

---,--9

Original_RequestText None VARCHAR(12500), UNICODE,

NOT CASESPECIFIC

X(255)

Original_CommentString

None VARCHAR(255), UNICODE,

NOT CASESPECIFIC

X(255)

Original_CreatorName None CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary 4 – 17

Page 210: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.DBCAssociation(Continued)

Original_TVMName None CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

Original_JournalFlag None CHAR(2), LATIN, NOT CASESPECIFIC, NOT NULL

X(2)

Original_JournalID None BYTE(6) X(12)

Original_UtilVersion None SMALLINT ---,--9

DBC.DBCInfoTbl

Contains current information such as, the DBC version and release.

InfoKey (UPI) None VARCHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

InfoData None VARCHAR(16384), LATIN, NOT CASESPECIFIC

X(16384)

DBC.ErrorMsgs

Stores all error messages returned to the user.

ErrorCode (UPI) None SMALLINT, NOT NULL

---,--9

ErrorText None VARCHAR(255), LATIN, NOT CASESPECIFIC, NOT NULL

X(255)

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary4 – 18

Page 211: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.EventLog

Contains a row for every session event.

DateFld (NUPI) None DATE, NOT NULL YYYY/MM/DD

TimeFld (NUPI) None FLOAT, NOT NULL 99:99:99.99

UserName Dbase.DatabaseName CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

AccountName Dbase.AccountName CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

Event None CHAR(12), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

LogicalHostId None SMALLINT, NOT NULL

ZZZ9

IFPNo None SMALLINT, NOT NULL

-(5)9

SessionNo None INTEGER, NOT NULL

--,---,---,--9

LogonDate None DATE, NOT NULL YYYY/MM/DD

LogonTime None FLOAT, NOT NULL 99:99:99.99

LogonSource None VARCHAR(128), LATIN, NOT CASESPECIFIC

X(128)

DBC.Global

This table is only used internally to the DBC. It contains information such as, whether logons to the DBC are enabled or disabled. This table is used by session control during start up.

Key (UPI) None CHAR(2), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(2)

Blob None VARBYTE(2048), NOT NULL

X(4096)

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary 4 – 19

Page 212: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.Hosts

Contains one row per host that defines the default character set for that host.

LogicalHostId (UPI) None SMALLINT, NOT NULL

ZZZ9

HostName (USI) None CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

DefaultCharSet None CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

DBC.HW_Event_Log

This table contains the information of system errors for Teradata RDBMS Field Engineers. Rows are inserted by the system in response to hardware error conditions.

TheDate (NUPI) None DATE, NOT NULL YYYY/MM/DD

TheTime (NUPI) None FLOAT 99:99:99.999999

Event_Tag None INTEGER, NOT NULL

Z99-99999-99

Category None CHAR(1), LATIN, NOT CASESPECIFIC

X(1)

Severity None CHAR(1), LATIN, NOT CASESPECIFIC

X(1)

Primary_Part_Number None VARCHAR(11), LATIN, NOT CASESPECIFIC

X(11)

Revision_Level None VARCHAR(2), LATIN, NOT CASESPECIFIC

X(2)

Secondary_Part_Number

None VARCHAR(11), LATIN, NOT CASESPECIFIC

X(1)

Serial_Number None VARCHAR(10), LATIN, NOT CASESPECIFIC

X(10)

PMA None INTEGER, NOT NULL

ZZ9-99

Module_Type None BYTEINT Z9

Slot None BYTEINT Z9

Slot_Type None BYTEINT Z9

Subslot None BYTEINT 9

Subslot_Type None BYTEINT 9

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary4 – 20

Page 213: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.HW_Event_Log(Continued)

FW_Version None VARCHAR(11), LATIN, NOT CASESPECIFIC

X(11)

Vcc_Margin None VARCHAR(1), LATIN, NOT CASESPECIFIC

X(1)

Frequency_Margin None VARCHAR(1), LATIN, NOT CASESPECIFIC

X(1)

Vcc_Volts None DECIMAL(3,2) -9.99

Vcc_Amps None DECIMAL(4,2) -Z9.99

Temperature None DECIMAL(4,1) -ZZ9.9

Line None BYTEINT, NOT NULL

ZZ9

Text None VARCHAR(255) LATIN, NOT CASESPECIFIC

X(255)

Error_Data None VARBYTE(128) X(256)

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary 4 – 21

Page 214: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.Indexes

Contains a row for each column that is an index.

Table_Id (NUPI) TVM.TVMId BYTE(6), NOT NULL X(12)

Index_Type None CHAR(1), LATIN, UPPERCASE,

NOT CASESPECIFIC, NOT NULL

X(1)

IndexNumber None SMALLINT, NOT NULL

---,--9

UniqueFlag None CHAR(1), LATIN, UPPERCASE,

NOT CASESPECIFIC, NOT NULL

X(1)

FieldId TVFields.FieldId SMALLINT, NOT NULL

---,--9

FieldPosition None SMALLINT, NOT NULL

---,--9

IndexMode

For a unique index, the value for IndexMode is H (index is hashed).

For a nonunique index, the value for IndexMode is L (index is local to the base table - index rows are on the same AMP as the data they reference).

For a primary index, the value is NULL.

None CHAR(1), LATIN, NOT CASESPECIFIC

X(1)

DatabaseId Dbase.DatabaseId BYTE(4), NOT NULL X(8)

IndexStatistics None VARBYTE(16383) X(255)

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary4 – 22

Page 215: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.Indexes(Continued)

Name None CHAR(30), LATIN, NOT CASESPECIFIC

X(30)

CreateUID Dbase.DatabaseId BYTE(4) X(8)

CreateTimeStamp None TIMESTAMP(0) yyyy-mm-ddhh:mm:ss

LastAlterUID Dbase.DatabaseId BYTE(4) X(8)

LastAlterTimeStamp None TIMESTAMP(0) yyyy-mm-ddhh:mm:ss

LastAccessTimeStamp None TIMESTAMP(0) yyyy-mm-ddhh:mm:ss

AccessCount None INTEGER --,---,---,--9

DBC.IndexName

This table is unused.

DatabaseId (UPI) None BYTE(4), NOT NULL X(8)

Name (UPI) None CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

TableId None BYTE(6), NOT NULL X(12)

IndexNumber None SMALLINT, NOT NULL

---,--9

DBC.InDoubtResLog

Contains a row for each transaction that had been in doubt.

LogicalHostId (NUPI) None SMALLINT, NOT NULL

---,--9

SessionNumber (NUPI)

None SMALLINT, NOT NULL

---,--9

CoordTaskId (NUPI) None VARBYTE(30), NOT NULL

X(60)

RunUnitId (NUPI) None VARBYTE(30), NOT NULL

X(60)

LogonUserName Dbase.DatabaseName VARCHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

ResolvingUserLogonName

Dbase.DatabaseName VARCHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

CommitOrRollback None CHAR(1), LATIN, NOT CASESPECIFIC, NOT NULL

X(1)

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary 4 – 23

Page 216: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.InDoubtResLog(Continued)

UserLogonDate None DATE, NOT NULL YYYY/MM/DD

UserLogonTime None FLOAT, NOT NULL 99:99:99

CompletionDate None DATE, NOT NULL YYYY/MM/DD

CompletionTime None FLOAT, NOT NULL 99:99:99

Options None CHAR(1), LATIN, NOT CASESPECIFIC

X(1)

DBC.LogonRuleTbl

Indicates what users can legally logon from what host, and whether a password is necessary.

UserId (UPI) Dbase.DatabaseId BYTE(4), NOT NULL X(12)

LogicalHostId (UPI) None SMALLINT, NOT NULL

ZZZ9

LogonStatus None CHAR(1), LATIN, NOT CASESPECIFIC, NOT NULL

X(1)

NullPassWord None CHAR(1), LATIN, NOT CASESPECIFIC, NOT NULL

X(1)

CreateUID Dbase.DatabaseId BYTE(4) X(8)

CreateTimeStamp None TIMESTAMP(0) yyyy-mm-ddhh:mm:ss

LastAccessTimeStamp None TIMESTAMP(0) yyyy-mm-ddhh:mm:ss

AccessCount None INTEGER --,---,---,--9

DBC.MigrationInternal table only.

Field1 (NUPI) None BYTEINT, NOT NULL

---9

DBC.Next

Contains the next internal identifiers the DBC uses for processing.

RowNum (UPI) None CHAR(1), LATIN, NOT CASESPECIFIC, NOT NULL

X(1)

DatabaseId None BYTE(4), NOT NULL X(8)

TableId None BYTE(4), NOT NULL X(8)

ProcsRowLoc None BYTE(4), NOT NULL X(8)

EventNum None BYTE(4), NOT NULL X(8)

LogonSequenceNo None BYTE(4), NOT NULL X(8)

TempTable None BYTE(4), NOT NULL X(8)

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary4 – 24

Page 217: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.OldPasswords

Contains a history of passwords used by a user in the system.

UserName (NUPI) Dbase.DatabaseName CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

PasswordDate None INTEGER, NOT NULL

--,---,---,--9

PasswordSeed None BYTE(2), NOT NULL X(4)

PasswordString None BYTE(8), NOT NULL X(16)

DBC.Owners

Shows information for each database in the system.

OwnerId (NUPI) Dbase.DatabaseId BYTE(4), NOT NULL X(8)

OwneeId Dbase.DatabaseId

TVM.DatabaseId

BYTE(4), NOT NULL X(8)

DBC.Parents

Represents the parentage of for each database in the system. Is actually the inverse of Owners.

DbId Dbase.DatabaseId BYTE(4), NOT NULL X(8)

ParentId Dbase.DatabaseId BYTE(4), NOT NULL X(8)

DBC.RCConfigu-ration

Contains information about the AMPs configuration for an event in the RCEvent table.

EventNum (NUPI) RCEvent.EventNum INTEGER --,---,---,--9

LogProcessor None SMALLINT -(5)9

PhyProcessor None SMALLINT ZZZZ9

ProcessorState None CHAR(1), LATIN, NOT CASESPECIFIC, NOT NULL

X(1)

RestartSeqNum None SMALLINT ---,--9

Vproc None SMALLINT -(5)9

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary 4 – 25

Page 218: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.RCEvent

Contains a row for each event executed by the Host Utilities.

EventNum (NUPI) RCConfiguration.EventNum

RCMedia.EventNumber

INTEGER, NOT NULL

--,---,---,--9

CreateDate None DATE, NOT NULL YYYY/MM/DD

CreateTime None FLOAT, NOT NULL 99:99:99.99

EventType None CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

UserName Dbase.DatabaseName CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

DatabaseName Dbase.DatabaseName CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

ObjectId None BYTE(4), NOT NULL X(8)

ObjectType None CHAR(1), LATIN, NOT CASESPECIFIC

X(1)

AllAmpsFlag None CHAR(1), LATIN, NOT CASESPECIFIC, NOT NULL

X(1)

RestartSeqNum RCConfiguration.RestartSeqNum

SMALLINT ---,--9

TableName TVM.TVMName CHAR(30), LATIN, NOT CASESPECIFIC

X(30)

CheckPointName None CHAR(30), LATIN, NOT CASESPECIFIC

X(30)

LinkingEventNum None INTEGER --,---,---,--9

OperationInProcess None CHAR(1), LATIN, NOT CASESPECIFIC, NOT NULL

X(1)

DataSetName None CHAR(44), LATIN, NOT CASESPECIFIC

X(44)

LockMode None CHAR(1), LATIN, NOT CASESPECIFIC

X(1)

JournalUsed None CHAR(1), LATIN, NOT CASESPECIFIC

X(1)

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary4 – 26

Page 219: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.RCEvent(Continued)

JournalSaved None CHAR(1), LATIN, NOT CASESPECIFIC

X(1)

IndexPresent None CHAR(1), LATIN, NOT CASESPECIFIC

X(1)

DupeDumpSet RCMedia.DupeDumpSet

CHAR(1), LATIN, NOT CASESPECIFIC

X(1)

DBC.RCMedia

Contains identification of storage media for events.

EventNumber (NUPI) RCMediaEventNumber

INTEGER, NOT NULL

--,---,---,--9

VolSerialId None CHAR(6), LATIN, NOT CASESPECIFIC, NOT NULL

X(6)

VolSequenceNum None SMALLINT ---,--9

DupeDumpSet None CHAR(1), LATIN, NOT CASESPECIFIC, NOT NULL

X(1)

DBC.ReferencedTbls

Contains information about the parent table of a referential constraint.

ReferencedDbID (NUPI)

Dbase.DatabaseId BYTE(4), NOT NULL X(8)

ReferencedTblID (NUPI)

TVM.TVMId

TVFields.TableId

BYTE(6), NOT NULL X(12)

ReferenceIdx None SMALLINT, NOT NULL

---,--9

ParentKeyFID TVFields.FieldId SMALLINT, NOT NULL

---,--9

ReferencingDbID Dbase.DatabaseId BYTE(4), NOT NULL X(8)

ReferencingTblID TVM.TVMId

TVFields.TableId

BYTE(6), NOT NULL X(12)

ForeignKeyFID TVFields.FieldId SMALLINT, NOT NULL

---,--9

InconsistentFlag None CHAR(1), LATIN, NOT CASESPECIFIC, NOT NULL

X(1)

ReferenceIdxName None CHAR(30), LATIN, NOT CASESPECIFIC

X(30)

CreateUID Dbase.DatabaseId BYTE(4) X(8)

CreateTimeStamp None TIMESTAMP(0) yyyy-mm-ddhh:mm:ss

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary 4 – 27

Page 220: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.ReferencedTbls(Continued)

LastAccessTimeStamp None TIMESTAMP(0) yyyy-mm-ddhh:mm:ss

AccessCount None INTEGER --,---,---,--9

DBC.ReferencingTbls

Contains information about the child table of a referential constraint.

ReferencingDbID (NUPI)

Dbase.DatabaseId BYTE(4), NOT NULL X(8)

ReferencingTblID (NUPI)

TVM.TVMId

TVFields.TableId

BYTE(6), NOT NULL X(12)

ReferenceIdx None SMALLINT, NOT NULL

---.--9

ForeignKeyFID TVFields.FieldId SMALLINT, NOT NULL

---.--9

ReferencedDbID Dbase.DatabaseId BYTE(4), NOT NULL X(8)

ReferencedTblID TVM.TVMId

TVMFields.TableId

BYTE(6), NOT NULL X(12)

ParentKeyFID TVfields.FieldId SMALLINT, NOT NULL

---,--9

InconsistentFlag None CHAR(1), LATIN, NOT CASESPECIFIC, NOT NULL

X(1)

ReferenceIdxName None CHAR(30), LATIN, NOT CASESPECIFIC

X(30)

CreateUID Dbase.DatabaseId BYTE(4) X(8)

CreateTimeStamp None TIMESTAMP(0) yyyy-mm-ddhh:mm:ss

LastAccessTimeStamp None TIMESTAMP(0) yyyy-mm-ddhh:mm:ss

AccessCount None INTEGER --,---,---,--9

DBC.RepBatchStatus

Internal table only.

RSQualifier (UPI) None INTEGER, NOT NULL

--,---,---,--9

BatchNum None BYTEINT, NOT NULL

--9

CompletionStatus None CHAR(1), LATIN, NOT CASESPECIFIC

X(1)

CommitSeqNumber None INTEGER --,---,---,--9

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary4 – 28

Page 221: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.SessionTbl

Contains current user logon information.

HostNo (UPI) TempTables.HostNo SMALLINT, NOT NULL

---,--9

SessionNo (UPI) Temptables.SessionNo

INTEGER, NOT NULL

--,---,---,--9

IFPNo None SMALLINT, NOT NULL

-(5)9

LogonDate None DATE, NOT NULL YYYY/MM/DD

LogonTime None FLOAT, NOT NULL 99:99:99.99

LogonCollation None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

LogonDatabase Dbase.DatabaseName CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

CurrentCollation None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

CurrentDatabase Dbase.DatabaseName CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

UserName Dbase.DatabaseName CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

UserId Dbase.DatabaseId BYTE(4), NOT NULL X(8)

AccountName Dbase.AccountName CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

StartMBox None BYTE(10) X(20)

ContMBox None BYTE(10) X(20)

AbortMBox None BYTE(10) X(20)

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary 4 – 29

Page 222: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.SessionTbl(Continued)

Partition None CHAR(16), LATIN, NOT CASESPECIFIC,

X(20)

PartCode None BYTEINT --9

LogonSource None VARCHAR(128), LATIN, NOT CASESPECIFIC

X(128)

LogonSequenceNo None BYTE(4) X(12)

LogicalHostId None SMALLINT, NOT NULL

ZZZ9

ConnectFunction None SMALLINT, NOT NULL

---,--9

Options None CHAR(10), LATIN, NOT CASESPECIFIC, NOT NULL

X(10)

ExpiredPassword None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC

X(1)

TimeZoneHour None BYTEINT ---9

TimeZoneMinute None BYTEINT ---9

CurrentDateForm None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC

X(1)

DefaultCharType None SMALLINT, NOT NULL

---,--9

RepSesOverride None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

RFU None VARBYTE(1024) X(2056)

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary4 – 30

Page 223: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.SW_Event_Log

This table contains the information of system errors for Teradata RDBMS Field Engineers. Rows are inserted by the system in response to software error conditions.

TheDate (NUPI) None DATE, NOT NULL YYYY/MM/DD

TheTime (NUPI) None FLOAT, NOT NULL 99:99:99.999999

Event_Tag None INTEGER, NOT NULL

Z99-99999-99

Category None BYTEINT Z9

Severity None SMALLINT ZZ9

PMA None INTEGER ZZ9-99

Vproc None INTEGER -(5)9

Partition None BYTEINT Z9

Task None SMALLINT ZZZZ9

Function None VARCHAR(32), LATIN, NOT CASESPECIFIC

X(32)

SW_Version None VARCHAR(64), LATIN, NOT CASESPECIFIC

X(64)

Line None BYTEINT, NOT NULL

ZZ9

Text None VARCHAR(255), LATIN, NOT CASESPECIFIC, NOT NULL

X(255)

Stacktrace None VARBYTE(320) X(640)

Error_Data None VARBYTE(256) X(512)

DBC.SysSecDefaults

Provides system default information.

PrimeIndex (UPI) None BYTEINT, NOT NULL

--9

ExpirePassword None SMALLINT, NOT NULL

---,--9

PasswordMinChar None BYTEINT, NOT NULL

--9

PasswordMaxChar None BYTEINT, NOT NULL

--9

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary 4 – 31

Page 224: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.SysSecDefaults(Continued)

PasswordDigits None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

PasswordSpecChar None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

MaxLogonAttempts None BYTEINT, NOT NULL

---9

LockedUserExpire None SMALLINT, NOT NULL

---,--9

PasswordReuse None SMALLINT, NOT NULL

---,--9

DBC.TableConstraints

Contains a row for each table-level constraint defined in the system.

TVMId (NUPI) TVM.TVMId BYTE(6), NOT NULL X(12)

Name None CHAR(30), LATIN, NOT CASESPECIFIC

X(30)

DBaseId Dbase.DatabaseId BYTE(4), NOT NULL X(8)

TableCheck None VARCHAR(8192), LATIN, CASESPECIFIC

X(255)

CreateUID Dbase.DatabaseId BYTE(4) X(8)

CreateTimeStamp None TIMESTAMP(0) yyyy-mm-ddhh:mm:ss

AccessCount None INTEGER --,---,---,--9

DBC.TempStatistics

Contains statistical information collected on a materialized temporary table in the system.

HostNo (NUPI) None SMALLINT, NOT NULL

---,--9

SessionNo (NUPI) SessionTbl.SessionNo INTEGER, NOT NULL

--,---,---,--9

BaseDbId Dbase.DatabaseId BYTE(4), NOT NULL X(8)

BaseTableId TVM.TVMId BYTE(6), NOT NULL X(12)

TableId TVM.TVMId BYTE(6), NOT NULL X(12)

StatId None SMALLINT, NOT NULL

---,--9

StatInfo None VARBYTE(16383) X(255)

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary4 – 32

Page 225: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.TempTables

Contains a row for each materialized temporary table in the system.

HostNo (NUPI) SessionTbl.HostNo SMALLINT, NOT NULL

---,--9

SessionNo (NUPI) SessionTbl.SessionNo INTEGER, NOT NULL

--,---,---,--9

TableId TVM.TVMId BYTE(6), NOT NULL X(12)

BaseDbId Dbase.DatabaseId BYTE(4), NOT NULL X(8)

BaseTableId TVM.TVMId BYTE(6), NOT NULL X(12)

AccountDbId Dbase.DatabaseId BYTE(4), NOT NULL X(8)

StatisticsCnt None SMALLINT, NOT NULL

---,--9

DBC.TextTblFor internal use only

TextId (NUPI) None BYTE(6), NOT NULL X(12)

TextType (NUPI) None CHAR(1), LATIN, NOT CASESPECIFIC, NOT NULL

X(1)

LineNo None SMALLINT, NOT NULL

---,--9

TextString None VARCHAR(32000), UNICODE, NOT CASESPECIFIC, NOT NULL

X(255)

DBC.Translation

Contains information about the character translation tables used.

TranslateName (UPI) None CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

TranslateID (USI) None BYTEINT, NOT NULL

ZZ9

Install None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

TranslateIn None BYTE(256), NOT NULL

X(512)

TranslateInUp None BYTE(256), NOT NULL

X(512)

TranslateOut None BYTE(256), NOT NULL

X(512)

TranslateOutUp None BYTE(256), NOT NULL

X(512)

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary 4 – 33

Page 226: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.TriggersTbl

Contains a row for each trigger in the system.

TableId (NUPI) TVM.TVMId BYTE(6), NOT NULL X(12)

TriggerId (NUSI) TVM.TVMId BYTE(6), NOT NULL X(12)

DatabaseID Dbase.DatabaseId BYTE(4), NOT NULL X(8)

TriggerName None CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

TriggerEnabled None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

ActionTime None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

TriggerEvent None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

Kind None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

TriggerOrder None SMALLINT ---,--9

CommentString None VARCHAR(255), UNICODE, NOT CASESPECIFIC

X(255)

CreateText None VARCHAR(20480), LATIN, NOT CASESPECIFIC, NOT NULL

X(255)

CreateUID Dbase.DatabaseId BYTE(4) X(8)

CreateTimeStamp None TIMESTAMP (0) yyyy-mm-ddhh:mm:ss

LastAlterUID Dbase.DatabaseId BYTE(4) X(8)

LastAlterTimeStamp None TIMESTAMP (0) yyyy-mm-ddhh:mm:ss

LastAccessTimeStamp None TIMESTAMP (0) yyyy-mm-ddhh:mm:ss

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary4 – 34

Page 227: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.TriggersTbl(Continued)

AccessCount None INTEGER --,---,---,--9

DBC.TVFields

Contains a row for each column of every table and view, except when the view has more than 51 columns.

TableId (NUPI) Accessrights.TVMId

ReferencingTbls.ReferencingTblId

ReferencedTbls.ReferencedTblId

TVM.TVMId

BYTE(6), NOT NULL X(12)

FieldName None CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

FieldId (USI) Accessrights.FieldId

ReferencingTbls.ForeignKeyFID

ReferencedTbls.ParentKeyFID

Indexes.FieldId

SMALLINT, NOT NULL

---,--9

Nullable None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC

X(1)

FieldType None CHAR(2), LATIN, UPPERCASE, NOT CASESPECIFIC

X(2)

MaxLength None INTEGER --,---,---,--9

DefaultValue None VARCHAR(1024), UNICODE, NOT CASESPECIFIC

X(1024)

DefaultValueI None VARCHAR(1024) X(1024)

TotalDigits None SMALLINT ---,--9

ImpliedPoint None SMALLINT ---,--9

FieldFormat None CHAR(30), UNICODE, NOT CASESPECIFIC

X(30)

FieldTitle None VARCHAR(60), UNICODE, NOT

CASESPECIFIC

X(60)

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary 4 – 35

Page 228: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.TVFields(Continued)

CommentString None VARCHAR(255), UNICODE, NOT

CASESPECIFIC

X(255)

CollationFlag None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC

X(1)

UpperCaseFlag None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC

X(1)

DatabaseId Dbase.DatabaseId BYTE(4), NOT NULL X(8)

Compressible None CHAR(1), LATIN, NOT CASESPECIFIC

X(1)

CompressValue None VARCHAR(255), UNICODE, NOTCASESPECIFIC

X(255)

FieldStatistics None VARBYTE(16383) X(55)

ColumnCheck None VARCHAR(8192), LATIN, NOT CASESPECIFIC

X(255)

CheckCount None SMALLINT, NOT NULL

---,--9

CreateUID Dbase.DatabaseId BYTE(4), NOT NULL X(8)

CreateTimeStamp None TIMESTAMP(0) yyyy-mm-ddhh:mm:ss

LastAlterUID Dbase.DatabaseId BYTE(4) X(8)

LastAlterTimeStamp None TIMESTAMP(0) yyyy-mm-ddhh:mm:ss

LastAccessTimeStamp None TIMESTAMP(0) yyyy-mm-ddhh:mm:ss

AccessCount None INTEGER --,---,---,--9

CharType None SMALLINT ---,--9

SPParameterType None CHAR(1), LATIN, NOT CASESPECIFIC, NOT NULL

X(1)

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary4 – 36

Page 229: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.TVM

Contains a row for each table, view, macro, trigger, join index, hash index, or procedure in the system.

DatabaseId (UPI) Accessrights.DatabaseId

Owners.owneeId

Dbase.DatabaseId

BYTE(4), NOT NULL X(8)

TVMNameI (UPI) None CHAR(30), LATIN, UPPERCASE,NOT CASESPECIFIC, NOT NULL

X(30)

Logical HostId None SMALLINT ZZZ9

SessionNo None INTEGER --,---,---,--9

TVMId (USI) AccLogRuleTbl.TVMId

DatabaseSpace.tableId

Accessrights.TVMId

Temptables.BaseTableId

ReferencingTbls.ReferencingTblId

ReferencedTbls.ReferencedTblId

DBCAssociation.TVMId

TVFields.TableId

Dbase.JournalId

Indexes.TableId

Tableconstraints.TVMId

BYTE(6), NOT NULL X(12)

TableKind None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

ProtectionType None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary 4 – 37

Page 230: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.TVM(Continued)

TempFlag None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC

X(1)

HashFlag None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

NextIndexId None SMALLINT, NOT NULL

---,--9

NextFieIdId None SMALLINT, NOT NULL

---,--9

Version None SMALLINT, NOT NULL

---,--9

RequestText None VARCHAR(12500), UNICODE, NOT CASESPECIFIC

X(255)

CreateText None VARCHAR(26000), UNICODE, NOT CASESPECIFIC

X(255)

CommentString None VARCHAR(255), UNICODE, NOT CASESPECIFIC

X(255)

CreatorName Dbase.DatabaseName CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

TVMName (NUSI) None CHAR(30), LATIN, NOT CASESPECIFIC, NOT NULL

X(30)

JournalFlag None CHAR(2), LATIN, NOT CASESPECIFIC, NOT NULL

X(2)

JournalId None BYTE(6) X(12)

UtilVersion None SMALLINT ---,--9

AccLogRules None CHAR(1), LATIN, NOT CASESPECIFIC, NOT NULL

X(1)

ColumnAccRules None CHAR(1), LATIN, NOT CASESPECIFIC, NOT NULL

X(1)

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary4 – 38

Page 231: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.TVM(Continued)

CheckOpt None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

ParentCount None SMALLINT, NOT NULL

---,--9

ChildCount None SMALLINT, NOT NULL

---,--9

NamedTblCheckCount None SMALLINT, NOT NULL

---,--9

UnnamedTblCheckExist None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

PrimaryKeyIndexId None SMALLINT ---,--9

CreateUID Dbase.DatabaseId BYTE(4) X(8)

CreateTimeStamp None TIMESTAMP(0) yyyy-mm-ddhh:mm:ss

LastAlterUID Dbase.DatabaseId BYTE(4) X(8)

LastAlterTimeStamp None TIMESTAMP(0) yyyy-mm-ddhh:mm:ss

AccessCount None INTEGER --,---,---,--9

SPObjectCodeRows None SMALLINT, NOT NULL

---,--9

RSGroupID None SMALLINT ---,--9

DirtyFlag None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

XactionFlag None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

TblRole None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary 4 – 39

Page 232: Data Dictionary Views

Chapter 4: System TablesData Dictionary FALLBACK Tables

DBC.TVM(Continued)

TblStatus None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

RequestTxtOverflow None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

CreateTextOverflow None CHAR(1), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(1)

DBC.UnResolvedReferences

Contains information about all the unresolved referential constraints that currently exist in the system.

DatabaseID (NUPI) Dbase.DatabaseId BYTE(4), NOT NULL X(8)

ParentTblName (NUPI)

TVM.TVMNameI CHAR(30), LATIN, UPPERCASE, NOT CASESPECIFIC, NOT NULL

X(30)

UserID Dbase.DatabaseId BYTE(4), NOT NULL X(8)

ReferenceIdx None SMALLINT, NOT NULL

---,--9

ChildTblID TVM.TVMId BYTE(6), NOT NULL X(12)

ForeignKeyFID None SMALLINT, NOT NULL

---,--9

FKPosition None SMALLINT, NOT NULL

---,--9

ParentKeyName None CHAR(30), LATIN, UPPERCASE, NOT CASESPECIFIC

X(30)

ReferenceIdxName None CHAR(30), LATIN, NOT CASESPECIFIC

X(30)

Table Name and Description

Columns Referenced Column(s) Data Type Default Format

Teradata RDBMS Data Dictionary4 – 40

Page 233: Data Dictionary Views

Chapter 5:

Macros

In order to load macros and other views, specific SQL scripts must be executed using the DIP utility. Examples of these include the DIPSYSFE utility for SQL scripts for System FE Macros and the DIPRUM utility for SQL scripts for ResUsage macros.

In order to load all the views, tables, and macros, the DIPALL script must be run.

This chapter contains information about the following system macros:

• TwoPCRule macro• ResUsage macros• DIPVIEW macros

The following macros are not covered in this manual:

Macro(s) PurposeFor more information, see the

publication entitled ...

SystemFE Track system health • Teradata RDBMS SystemFE Macros

AccLogRule Enables access logging • Teradata RDBMS Database Administration

• Teradata RDBMS Security Administration

Query Capture Mostly used with VEComp application

• Teradata RDBMS Database Design

ECompare Mostly used with VEComp application

• Teradata RDBMS Database Design

Teradata RDBMS Data Dictionary 5 – 1

Page 234: Data Dictionary Views

Chapter 5: MacrosTwoPCRule Macro

TwoPCRule Macro

The TwoPCRule is an empty macro. Its purpose is to determine the privilege the user holds.

Creating the TwoPCRule Macro

You use the following CREATE statement for this macro:

CREATE MACRO DBC.TwoPCRule AS (;);

TwoPCRule and the Resolver Base Module

If the user has the EXECUTE privilege on this macro, the system allows him to logon to the Resolver Base Module.

Without the privilege, the user cannot logon to the module.

Resolving Indoubt Transactions

You must have the EXECUTE privilege on this macro to use the Resolver Base Module to resolve indoubt transactions.

To resolve indoubt transactions, the TDP must have access to DBC.InDoubtResLog, and must be allowed to logon to the Resolver Base Module. The following SQL statements define a TDP userid and attributes, and establish the necessary privileges for the access and logon:

CREATE USER TDPUSERAS PERM=0 PASSWORD=passwd ACCOUNT=’$H’;GRANT LOGON ON ALL TO TDPUSER WITH NULL PASSWORD;GRANT SELECT, DELETE ON DBC.InDoubtLog TO TDPUSER;GRANT EXECUTE ON DBC.TwoPCRule TO TDPUSER;

Note: The TDP userid in the preceding CREATE and GRANT statements can be changed with the INITIAL USER clause in the TDP parameter dataset.

Note: The CREATE USER statement for the TDP userid must include the ACCOUNT=$H priority attribute.

Teradata RDBMS Data Dictionary5 – 2

Page 235: Data Dictionary Views

Chapter 5: MacrosResUsage Macros

ResUsage Macros

Like other Teradata RDBMS macros, ResUsage macros consist of one or more Teradata Structured Query Language (SQL) statements stored in the Teradata RDBMS and executed by a single EXECUTE statement.

Usage Notes

ResUsage macros allow you to analyze key operational statistics, ResUsage data, that you can use to evaluate the performance of your system. You must have the EXECUTE privilege to use this macro.

In addition to the name of the macro, the EXECUTE statement for ResUsage macros can include optional parameters to specify the following:

• Starting and ending dates and times• Starting and ending nodes of a range of nodes• A specific single node

Example

The following statement executes the ResCPUByAMP macro, producing a report for the period beginning 8:00 a.m. on December 25, 1997, and ending 12:00 p.m., midnight, on December 31, 1997. It includes data for nodes 123-02 through 125-04.

EXECUTE ResCPUByAmp('1997-12-25', '1997-12-31', '08:00:00','24:00:00', '123-02', '125-04');

where:

For More Information

See Teradata RDBMS Resource Usage Macros and Tables for information on using these macros.

Statement Element … Description

ResCPUByAmp Name of the ResUsage macro

‘1997-12-25’ Starting date of December 25, 1997

‘1997-12-31‘ Ending date of December 31, 1997

080000 Starting time of 8:00 a.m.

240000 Ending time of 12:00 midnight

'123-02' Starting node of a range of nodes

'125-04' Ending node of a range of nodes

Teradata RDBMS Data Dictionary 5 – 3

Page 236: Data Dictionary Views

Chapter 5: MacrosDIPVIEW Macros

DIPVIEW Macros

The DIPVIEW script contains several macros, including the following:

This section provides a brief description of each of the above macros including any necessary parameters. If you need to see the macro itself, refer to the DIPVIEW script.

ARC_NonEmpty_List Macro

This macro returns the names of the databases or users, owned by the indicated database, that contain the specified objects.

Macro Name Function

ARC_NonEmpty_List Returns the names of the databases or users, owned by the indicated database, that contain the specified objects.

ClearAccounting Resets the CPU and IO columns of the DBC.Acctg table.

ClearPeakDisk Resets the PEAKPERM, PEAKSPOOL, and PEAKTEMP columns for the DISKSPACE information.

CollAddStandard Defines the standard collation sequences supplied with the Teradata RDBMS and places them into the DBC.CollationTbl.

CollInstallMulti Allows database administration to install an NCR-supplied standard collation (Swedish or Norwegian) or a user-defined collation from the DBC.CollationTbl as the definition for Multinational collation.

DIPMarkNSIO Acts as a release marker to indicate a valid dictionary.

LogonRule Allows database administrator to determine who has execute privileges for the GRANT/REVOKE LOGON statements.

Teradata RDBMS Data Dictionary5 – 4

Page 237: Data Dictionary Views

Chapter 5: MacrosDIPVIEW Macros

This macro uses the following parameter:

Usage Notes

Although this macro is designed for the person responsible for archiving data, its access rights are PUBLIC.

The macro can return database names for which the executing user does not have access rights.

Example

The following statement returns the names of the tables, journals, join indexes, views, and macros in the NewEmp2 database:

EXEC DBC.ARC_NonEmpty_List (NewEmp2, ‘TJIVM’);

ClearAccounting Macro

This macro resets the CPU and IO columns of the DBC.Acctg table.

Usage Notes

This macro resets resource usage counters back to zero.

Parameter Description

ParentDb This parameter is the name of the database containing the objects returned by this macro.

TKinds (VARCHAR(100), UPPERCASE) )

This parameter indicates the types of tables returned.

The possible values include the following:

Value Meaning

T Table

V View

M Macro

J Journal

I Join Index

P Stored Procedure

G Trigger

Teradata RDBMS Data Dictionary 5 – 5

Page 238: Data Dictionary Views

Chapter 5: MacrosDIPVIEW Macros

Examples

The following example shows the definition of the ClearAccounting macro:

REPLACE MACRO DBC.ClearAccountingAS ( UPDATE Acctg SET CPU = 0, IO = 0 ALL;

UPDATE Acctg SET CPU = 0, IO = 0 ALL; );

The following scenarios illustrate how the ClearAccounting macro can be used:

1 A systems administrator uses the CPU usage information in DBC.Acctg to bill users every month. At the beginning of each month, the systems administrator runs ClearAccounting to reset the resource usage counters back to zero.

2 A person diagnosing system performance problems needs to look at DBC.Acctg when certain jobs are run. He first runs ClearAccounting to reset the resource usage counters.

ClearPeakDisk Macro

This macro resets to zero the following columns of the DISKSPACE information:

• PEAKPERM• PEAKSPOOL• PEAKTEMP

Usage Notes

You are able to determine the maximum amount of permanent space, the maximum amount of spool space, and the maximum amount of temporary space used at any one time by the database for a specified AMP (or all AMPs if the SUM aggregate is specified) since the last time the ClearPeakDisk macro was run.

Example

To run the ClearPeakDisk macro, issue the following:

EXEC DBC.ClearPeakDisk();

CollAddStandard Macro

This macro defines the standard collation sequences supplied with the Teradata RDBMS and places them into the DBC.CollationTbl.

Usage

If the existing standard collations in the DBC.TranslationTbl have been corrupted or removed, this macro replaces them. Also, when we provide additional standard collations, you can add them using this macro.

Teradata RDBMS Data Dictionary5 – 6

Page 239: Data Dictionary Views

Chapter 5: MacrosDIPVIEW Macros

Example

The following macro places the supplied collations into DBC.CollationTbl:

EXEC DBC.CollAddStandard();

CollInstallMulti Macro

This macro installs an NCR-supplied standard collation or a user-defined collation from the DBC.CollationTbl as the definition for Multinational collation.

This macro has the following parameter.

Usage Notes

The name assigned to the collation can be any valid name except “MULTINATIONAL.”

To install the supplied standard collation, you must run the macro DBC.CollAddStandard before you run the CollInstallMulti macro.

You must run this macro before any users have logged onto the system. The redefinition of Multinational collation takes effect after a full Teradata RDBMS restart.

Example

The following statement redefines the Multinational collation sequence as the SWEDISH_STANDARD collation:

EXEC DBC.CollInstallMulti (‘SWEDISH_STANDARD’);

This next statement redefines the Multinational collation sequence as the user-defined collation, “MULTINATIONAL_USER”:

EXEC CollInstallMulti (‘MULTINATIONAL_USER’);

DIPMarkNS10 Macro

The DIPMarkNS10 macro is an empty, parameterless macro in database DBC which acts as a release marker to indicate a valid dictionary.

The Teradata RDBMS uses the presence or absence of this macro to determine whether a conversion originates from an NCR System 3600 or DBC/1012 to the Teradata RDBMS.

Parameter Description

CollationName The CollationName parameter identifies the collation defined in the DBC.CollationTbl.

Data type is CHAR.

FORMAT is ‘X(30)’.

Teradata RDBMS Data Dictionary 5 – 7

Page 240: Data Dictionary Views

Chapter 5: MacrosDIPVIEW Macros

Usage Notes

When you restore database DBC from an NCR System 3600 or DBC/1012 to the Teradata RDBMS, the DIPMarkNS10 macro is deleted before the conversion begins and is recreated at the end of the conversion process.

If the conversion was not successful, the macro is not created, and you see a message instructing you to run the necessary conversion script.

LogonRule Macro

This macro determines who has execute privileges for the GRANT/REVOKE LOGON statements.

When database administration grants the execute privilege on this macro to a user, that user can then use the GRANT/REVOKE logon statements.

See Teradata RDBMS Security Administration for complete information on using this macro.

Teradata RDBMS Data Dictionary5 – 8

Page 241: Data Dictionary Views

Chapter 5: MacrosDIPVIEW Macros

For More Information

Many additional macros exist for determining system efficiency. These resource usage macros are described in Teradata RDBMS Resource Usage Macros and Tables.

Teradata RDBMS Data Dictionary 5 – 9

Page 242: Data Dictionary Views

Chapter 5: MacrosDIPVIEW Macros

Teradata RDBMS Data Dictionary5 – 10

Page 243: Data Dictionary Views

Index

A

ABORT SESSION command, PMDBC.sw_event_log table 1–18

Accessauditing, DBC.AccLogRule macro 1–9

AccessLog view 2–4, 3–2AccessRight column 2–22AccessRights table 4–6AccLogRule table 4–7AccLogRules view 2–5, 3–4AccLogTbl table 4–10, 4–11Account String Expansion

using to measure SQL 1–23AccountInfo view 2–5, 3–7Accounting

system views used for 1–21, 1–22AccountName column 2–24Acctg 4–5Acctg table 4–5, 4–12AcessLogRule table 4–9AcrCheckPoint column 2–24AcrCreate Trigger column 2–24AcrCreateDatabase column 2–24AcrCreateMacro column 2–24AcrCreateProcedure column 2–24AcrCreateTable column 2–24AcrCreateUser column 2–25AcrCreateView column 2–25AcrDelete column 2–25AcrDropDatabase column 2–25AcrDropMacro column 2–25AcrDropProcedure column 2–25AcrDropTable column 2–25AcrDropTrigger column 2–25AcrDropUser column 2–25AcrDropView column 2–26AcrDump column 2–26AcrExecute column 2–26AcrExecute Procedure column 2–26AcrExecuteProcedure column 2–26AcrGrant column 2–26AcrIndex column 2–26AcrInsert column 2–26AcrReference column 2–26AcrRestore column 2–26AcrSelect column 2–26

Teradata RDBMS Data Dictiona

AcrUpdate column 2–27ActionTime column 2–27Administrator views 1–10, 1–11ALL

special database name in system views 1–14All_RI_Children view 2–6, 3–14All_RI_Parents view 2–7, 3–15AllAMPsFlag column 2–27AllnessFlag column 2–27AllRights view 2–6, 3–8AllSpace view 2–6, 3–10AllTempTables view 2–6, 3–12AMP usage view 1–21AmpUsage view 2–7, 3–16ARC_NonEmpty_List macro 5–4Association view 2–7, 3–17

B

B_DatabaseName column 2–27B_TableName column 2–27BTEQ

scriptusing to archive data 1–23

C

Category column 2–28ChangedRowJournal table 4–5CharSetName column 2–28CharSets view 2–7, 3–19CharTranslations view 2–8, 3–20CharType column 2–28CheckName column 2–29CheckpointName column 2–29Child column 2–29ChildCount column 2–29ChildDb column 2–29ChildDbId column 2–29ChildKeyColumn column 2–29ChildKeyFID column 2–29Children view 2–8, 3–22ChildTable column 2–29ChildTID column 2–29

ry Index –1

Page 244: Data Dictionary Views

Index

Index –2

ClearAccounting macro 5–5ClearPeakDisk macro 5–4, 5–6ColCheck column 2–29CollAddStandard macro 5–4, 5–6Collations view 2–8, 3–23CollationTbl table 4–12CollEqvClass column 2–29CollInstall column 2–30CollInstallMulti macro 5–4, 5–7CollName column 2–30CollOrderCS column 2–30CollOrderUC column 2–30ColumnConstraint column 2–30ColumnFormat column 2–30ColumnId column 2–30ColumnLength column 2–30ColumnName column 2–31ColumnPosition column 2–31Columns

system views, table of 2–1Columns view 2–9, 3–24ColumnStats view 2–9, 3–26ColumnTitle column 2–31ColumnType column 2–32COMMENT

query a Data Dictionary view 1–16COMMENT ON

system views 1–16CommentString column 2–33CommitOrRollback column 2–33CompletionDate column 2–33CompletionTime column 2–33Compressible column 2–33CompressValue column 2–33Constraint Names table 4–13ConstraintCount column 2–33ConstraintName column 2–33ConstraintText column 2–33CoordTaskId column 2–33CpuTime column 2–33CreateDate column 2–34CreateTime column 2–34CreateTimeStamp column 2–34CreatorName column 2–35CSPSessionInfo view 2–9CurrentCollation column 2–35CurrentPerm column 2–35CurrentSpool column 2–35CurrentTemp column 2–35

Teradata RDBMS D

D

Data Dictionarycolumns. See alphabetical list and definitions,

Table 2-1COMMENT statement 1–16defined 1–2definition of 1–2generating tables for 4–2HELP 1–16keywords 1–14organization of 1–5query, view 1–16system use of 1–4system views, access to 1–14Teradata DBS and 1–4update 1–3updating 1–3users, types of 2–2views

end user 1–12, 2–2Field Engineer 1–8for resource usage 1–20operation and recovery control 1–11operations control 2–2security administrator 1–9, 2–2Security Logging 1–8special users 1–8supervisory user 1–12, 2–2SYSADMIN 1–8system administrator 2–2SYSTEMFE 1–8table distribution 1–20Teradata administrator 1–10

X suffix, system views 1–7Data Dictionary tables, affected by PM

DBC.AccessRights 1–18DBC.Dbase 1–18DBC.SessionTbl 1–18DBC.sw_event_log 1–18

Data Dictionary views, affected by PMAllRights 1–18AllSpace(X) 1–18Databases(X) 1–18DiskSpace(X) 1–18LogOnOff 1–18SessionInfo 1–18Software_Event_Log 1–18UserGrantedRights 1–18UserRights 1–18

Database Query Manager 2–42, 2–64, 3–66Database_ Default_Journals view 2–10Database_Default_Journals view 3–30DatabaseId column 2–36

ata Dictionary

Page 245: Data Dictionary Views

Index

DatabaseName column 2–36Databases view 2–10, 3–26, 3–28, 3–47Databases2 view 2–10, 3–29DataBaseSpace 4–5DatabaseSpace table 4–13DataSetName column 2–37Dbase table 4–14DBC.AccountInfo view 2–3DBC.Acctg system table

impact of system restart 1–22view for 1–21

DBC.ALL tablepurpose of 4–3

DBC.AMPUsage 1–21DBC.Fields table

use of 4–3DBC.SessionTbl table

logging 1–18DBC.sw_event_log table

logging system eventsABORT SESSION 1–18SET RESOURCE 1–18SET SESSION 1–18

DBC.TVM tableuse of 4–3

DBCAssociation table 4–16, 4–17DBCInfo view 2–11, 3–31DBCInfoTbl table 4–18DBKind column 2–37DBQM 2–42, 2–48, 2–64, 3–66DecimalFractionalDigits column 2–38DecimalTotalDigits column 2–38DEFAULT

special database name in system views 1–14DefaultAccount column 2–38DefaultCharSet column 2–38DefaultCharType column 2–38DefaultCollation column 2–38DefaultDataBase column 2–39DefaultDateForm column 2–39DefaultValue column 2–39DeleteAccessLog view 2–11, 3–32DeleteOldInDoubt view 2–11, 3–33DIP utility 1–6, 5–1DIPMarkNS10 macro 5–7DIPMarkNSIO macro 5–4DiskIO column 2–39DiskSpace view 2–11, 3–34DupeDumpSet column 2–39

Teradata RDBMS Data Dictiona

E

e 4–40E_TableId column 2–40E2I column 2–40E2IUp column 2–40EnabledFlag column 2–40End user views 1–12Error_Data column 2–40ErrorMsgs table 4–18Event column 2–41Event_Tag column 2–42EventCount column 2–41EventLog table 4–19EventNum column 2–41Events view 2–12, 3–37Events_Configuration view 2–12, 3–39Events_Media view 2–12, 3–41EventType column 2–42ExpiredPassword column 2–43ExpirePassword column 2–43

F

Fields. See Data Dictionary, columnsFrequency column 2–43Frequency_Margin column 2–43Function column 2–43FW_Version column 2–43

G

Global table 4–19GRANT privilege 1–6GrantAuthority column 2–44Grantee column 2–44GrantorName column 2–44

H

Hardware_Event_Log view 2–13, 3–43Hash index 4–37HELP

system views 1–16HELP statement 3–1

querying with 1–16HostName column 2–44

ry Index –3

Page 246: Data Dictionary Views

Index

Index –4

Hosts table 4–20HostsInfo view 2–13, 3–44HW_Event_Log table 4–20

I

I2E column 2–44I2EU column 2–44IFPNo column 2–44Indexes table 4–22IndexId column 2–45IndexName column 2–45IndexName table 4–23IndexNumber column 2–45IndexPresent column 2–45IndexStats view 2–13, 3–47IndexType column 2–46Indices view 2–14, 3–45Indoubt transactions

resolving and TwoPCRule macro 5–2InDoubtLog view 2–14, 3–49InDoubtResLog table 4–23InfoData column 2–46InfoKey column 2–46InstallFlag column 2–46

J

Journal_DB column 2–46JournalFlag column 2–47JournalName column 2–47Journals view 2–14, 3–50Journals_DB column 2–47JournalSaved column 2–47JournalUsed column 2–47

K

Keywordsspecial Data Dictionary

ALL 1–14DEFAULT 1–14PUBLIC 1–14

Kind column 2–47

Teradata RDBMS D

L

LastAlterName column 2–48LastAlterTimeStamp column 2–48Line column 2–48LinkingEventNum column 2–48LocalSessionStatusTable 4–5LocalTransactionStatusTable 4–5LockedCount column 2–48LockedDate column 2–48LockedTime column 2–49LockedUserExpire column 2–49LockMode column 2–49LogDate column 2–49LogicalHostId column 2–49, 2–50Logon rules

tracking 1–26LogonDate column 2–50LogOnOff view 2–14, 3–51LogonRule macro 5–4, 5–8LogonRules view 2–15, 3–53LogonRuleTbl table 4–24LogonSequenceNo column 2–50LogonSource column 2–51

channel-attached values 2–51example with LogOnOff view 3–51example with SessionInfo view 3–63internal session values 2–51network-attached values 2–51

LogonSource column, affected by PMDBC.SessionTbl table 1–18DBC.sw_event_log table 1–18

LogonStatus column 2–52LogonTime column 2–52LogonUserName column 2–52LogProcessor column 2–52LogTime column 2–52LogType column 2–52

M

MacroDBC.AccLogRule

auditing access 1–9Macros

ARC_NonEmpty_List 5–4ClearAccounting 5–5ClearPeakDisk 5–6CollAddStandard 5–6CollInstallMulti 5–7

ata Dictionary

Page 247: Data Dictionary Views

Index

defined 5–3DIPMarkNS10 5–7LogonRule 5–8TwoPCRule 5–2

MaxLogonAttempts column 2–52MaxPerm column 2–53MaxSpool column 2–53MaxTemp column 2–53Migration table 4–24Model column 2–53Module_Type column 2–53MONITOR option

SELECT queries 1–19

N

NamedTblCheckCount column 2–53Next table 4–24Non-X query 1–15Nullable column 2–53NullPassword column 2–53

O

ObjectType column 2–54OldPasswords table 4–25OperationInProcess column 2–54Options column 2–54OrderNumber column 2–54OrdSysChngTable 4–5Original_CommentString column 2–54Original_CreatorName column 2–54Original_Database column 2–54Original_JournalFlag column 2–54Original_ProtectionType column 2–55Original_TableKind column 2–55Original_TableName column 2–55Original_Version column 2–55OwnerName column 2–55Owners table 4–25

P

Parent column 2–55ParentCount column 2–55ParentDb column 2–55ParentDbId column 2–56

Teradata RDBMS Data Dictiona

ParentKeyColumn column 2–56ParentKeyFID column 2–56Parents table 4–25ParentTable column 2–56ParentTID column 2–56Partition column 2–56PasswordChgDate column 2–56PasswordDigits column 2–56PasswordLastModDate column 2–57PasswordLastModTime column 2–57PasswordMaxChar column 2–57PasswordMinChar column 2–57PasswordReuse column 2–57PasswordSpecChar column 2–57PeakPerm column 2–57PeakSpool column 2–58PeakTemp column 2–58Performance Monitor

determining capacity with 1–24purpose 1–18

PermSpace column 2–58PhyProcessor column 2–58PM/API

queries, MONITOR-related 1–19PMA column 2–58Primary_Part_Number column 2–58PrimaryKeyIndexId column 2–58Privileges

tracking 1–26ProcessorState column 2–58ProtectionType column 2–59PUBLIC

special database name in system views 1–14

Q

QueryData Dictionary 1–16keywords, use of 1–14system monitor 1–19

R

RCC_Configuration view 2–15, 3–54RCC_Media view 2–15, 3–55RCConfiguration table 4–25RCEvent table 4–26RCMedia table 4–27

ry Index –5

Page 248: Data Dictionary Views

Index

Index –6

RecoveryLockTable 4–5RecoveryPJTable 4–5ReferencedTbls table 4–27, 4–28RepBatchStatus table 4–28RequestText column 2–59ResNode macro

using to evaluate system capacity 1–24ResolvingUserLogonName column 2–59Resource usage

AMP 1–21AMPs 1–21example 1–21monitoring 1–20system views 1–20

Resource utilizationtracking 1–20

RestartSeqNum column 2–59Result column 2–59ResUsage macros

executing, example 5–3Revision_Level column 2–59RI_Child_Tables view 2–15, 3–56RI_Distinct_Children view 2–16, 3–57RI_Distinct_Parents view 2–16, 3–58RI_Parent_Tables view 2–16, 3–59Rights

granting system 1–6RunUnitId column 2–59

S

SavedTransactionStatus 4–5Secondary_Part_Number column 2–60Security

violation error 3–1Security Logging views 1–8SecurityDefaults view 2–16, 3–60SecurityLog view 2–17, 3–61SELECT privelege 1–6SELECT privilege 1–16SELECT statement

querying with 1–14Serial_Number column 2–60SessionInfo view 2–17, 3–62SessionNo column 2–60SessionNumber column 2–60SessionTbl table 4–29, 4–30SET RESOURCE command, PM

DBC.sw_event_log table 1–18Severity column 2–60, 2–61

Teradata RDBMS D

SHOWCOLCHECKS view 2–17, 3–64SHOWTBLCHECKS view 2–17, 3–65Single Sign On 3–53Slot column 2–61Slot_Type column 2–61Software_Event_Log view 2–18, 3–66SpoolSpace column 2–61Stacktrace column 2–61StartMBox column 2–61StartupString column 2–61StatementText column 2–62StatementType column 2–62Stored Procedure

access rights 4–4cross-platform incompatibility 1–17Data Dictionary tables containing 1–17definition 1–17details in Data Dictionary 1–3how the system uses information about 1–4logging rules 4–4request number 4–4status 4–3

Stored procedureData Dictionary information 4–3

SubSlot column 2–62SubSlot_Type column 2–62Supervisory views 1–12SW_Event_Log table 4–31SW_Version column 2–62Sys_Calendar 1–27SYSADMIN views 1–8SysRcvStatJournal 4–5SysSecDefaults table 4–31, 4–32System events

tracking 1–26System logs

maintaining 1–28System monitor query 1–19System monitoring

end user views, using 1–12operation and recovery control views, using 1–11security administrator view, using 1–9supervisory user views, using 1–12Teradata administrator views, using 1–10

System rights 1–6System table

droppingeffect on Data Dictionary 1–13

System tablesDBC.SessionTbl 1–18DBC.sw_event_log 1–18

System user DBC 1–6

ata Dictionary

Page 249: Data Dictionary Views

Index

SYSTEMFE views 1–8

T

Table_LevelConstraints view 2–18, 3–68TableConstraints table 4–32TableKind column 2–62TableName column 2–63Tables view 2–18, 3–69Tables_DB column 2–63Tables2 view 2–19, 3–71TableSize view 2–19, 3–72Task column 2–64TblCheck column 2–64Temperature column 2–64TempSpace column 2–64TempStatistics table 4–32TempTables table 4–33Text column 2–64TextTbl table 4–33The 1–19TheDate column 2–64TheTime column 2–64TimeZoneHour column 2–64TimeZoneMinute column 2–64Transaction_Mode column 2–65TransientJournal table 4–5Translation table 4–33TriggerComment column 2–65TriggerName column 2–65Triggers view 2–19, 3–73TriggersTbl table 4–34TVFields table 4–35, 4–36TVM table 4–37TVMId column 2–65TVMName column 2–65TwoPCMode column 2–65TwoPCRule macro 5–2

U

UniqueFlag column 2–65UnnamedTblCheckExist column 2–65UnResolvedReferences tabl 4–40UnResolvedRICount column 2–66UpperCaseFlag column 2–66Usage statistics

compiling 1–22

Teradata RDBMS Data Dictiona

User_Default_Journals view 2–21, 3–80UserGrantedRights view 2–20, 3–75UserLogonDate column 2–66UserLogonTime column 2–66UserName column 2–66UserRights view 2–20, 3–76Users view 2–21, 3–78Users, types. See Data Dictionary, usersUtilityLockJournalTable 4–5

V

Vcc_Amps column 2–67Vcc_Margin column 2–67Vcc_Volts column 2–67Version column 2–67View privileges 1–6Views

availability of 1–5definition of 1–5how determined 1–6

Views. See also Data DictionaryVolSerialId column 2–68Vproc column 2–68Vproctype column 2–68

W

WHERE clause in sytem views 1–7

X

X query 1–14

ry Index –7

Page 250: Data Dictionary Views

Index

Index –8

Teradata RDBMS D ata Dictionary