Teradata Database Data Dictionary - …dbmanagement.info/Books/MIX/1092_TeraData.pdfData Dictionary...
Transcript of Teradata Database Data Dictionary - …dbmanagement.info/Books/MIX/1092_TeraData.pdfData Dictionary...
The product or products described in this book are licensed products of Teradata Corporation or its affiliates.
Teradata, BYNET, DBC/1012, DecisionCast, DecisionFlow, DecisionPoint, Eye logo design, InfoWise, Meta Warehouse, MyCommerce, SeeChain, SeeCommerce, SeeRisk, Teradata Decision Experts, Teradata Source Experts, WebAnalyst, and You’ve Never Seen Your Business Like This Before are trademarks or registered trademarks of Teradata Corporation or its affiliates.
Adaptec and SCSISelect are trademarks or registered trademarks of Adaptec, Inc.
AMD Opteron and Opteron are trademarks of Advanced Micro Devices, Inc.
BakBone and NetVault are trademarks or registered trademarks of BakBone Software, Inc.
EMC, PowerPath, SRDF, and Symmetrix are registered trademarks of EMC Corporation.
GoldenGate is a trademark of GoldenGate Software, Inc.
Hewlett-Packard and HP are registered trademarks of Hewlett-Packard Company.
Intel, Pentium, and XEON are registered trademarks of Intel Corporation.
IBM, CICS, DB2, MVS, RACF, Tivoli, and VM are registered trademarks of International Business Machines Corporation.
Linux is a registered trademark of Linus Torvalds.
LSI and Engenio are registered trademarks of LSI Corporation.
Microsoft, Active Directory, Windows, Windows NT, and Windows Server are registered trademarks of Microsoft Corporation in the United States and other countries.
Novell and SUSE are registered trademarks of Novell, Inc., in the United States and other countries.
QLogic and SANbox trademarks or registered trademarks of QLogic Corporation.
SAS and SAS/C are trademarks or registered trademarks of SAS Institute Inc.
SPARC is a registered trademarks of SPARC International, Inc.
Sun Microsystems, Solaris, Sun, and Sun Java are trademarks or registered trademarks of Sun Microsystems, Inc., in the United States and other countries.
Symantec, NetBackup, and VERITAS are trademarks or registered trademarks of Symantec Corporation or its affiliates in the United States and other countries.
Unicode is a collective membership mark and a service mark of Unicode, Inc.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Other product and company names mentioned herein may be the trademarks of their respective owners.
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 TERADATA CORPORATION 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 Teradata Corporation intends to announce such features, functions, products, or services in your country. Please consult your local Teradata Corporation 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. Teradata Corporation 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]
Any comments or materials (collectively referred to as “Feedback”) sent to Teradata Corporation will be deemed non-confidential. Teradata Corporation 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, Teradata Corporation 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 © 2002–2007 by Teradata Corporation. All Rights Reserved.
Data Dictionary 3
Preface
Purpose
This book describes the Teradata Database Data Dictionary and contains information about system views that allow different types of users to access underlying table information stored in Teradata Database.
This includes specific information about the following:
• Database objects
• Sessions
• Resource usage
Audience
This book is intended for database administrators and other technical personnel responsible for maintaining the Teradata Database. More specifically, the manual provides information for the following types of users:
• End users
• Teradata database administrators
• Teradata database security administrators
• Operations control users
Supported Software Release
This book supports Teradata® Database 12.0.
Prerequisites
You should be familiar with relational databases in general and the Teradata Database in particular.
It may be helpful to review the following books:
• Introduction to Teradata Warehouse
• Database Design
PrefaceChanges to This Book
4 Data Dictionary
• SQL Reference
• Database Administration
Changes to This Book
This book includes the following changes to support the current release:
Date Description
October 2007 • Added the following tables:
• ErrorTbls
• PasswordRestrictions
• TDWMEventHistory
• SystemQTbl
• JAR_JAR_USAGE
• ROUTINE_JAR_USAGE
• JARS
• ColumnCorrelation
• ReconfigJournal
• ReconfigOrder
• ReconfigTableStats
• ReconfigInfo
• ArchiveLoggingObjsTbl
• Added the following views:
• ErrorTblsV[X]
• RestrictedWords
• QryLogEventHis
• ArchiveLoggingObjsV[X]
• Added the following macros:
• InsertConstantString
• ARC_NonEmpty_ListM
• Added the following columns:
• Indexes.JoinIndexTableID
• SysSecDefaults.PasswordRestrictWords
• SecurityDefaults.PasswordRestrictWords
• Profiles.PasswordRestrictWords
• Dbase.EncryptionFlag
• Dbase.PasswordSalt
• Dbase.EncryptedPassword
• Dbase.PasswordModTime
PrefaceChanges to This Book
Data Dictionary 5
October 2007 (Continued)
• Added the following columns (cont.):
• Oldpasswords.UserName
• Oldpasswords.EncryptionFlag
• Oldpasswords.PasswordSalt
• Oldpasswords.EncryptedPassword
• SessionTbl.QueryBand
• SessionInfo.QueryBand
• AccLogTbl.QueryBand
• UDFInfo.MaxOutParameters
• Functions.MaxOutParameters
• DBase.AppCat1Revision
• DBase.AppCat2Revision
• DBase.AppCat3Revision
• DBase.AppCat4Revision
• UDFInfo.AppCategory
• ExternalSPs[X].AppCategory
• TDWMSummaryLog.Abortcount
• TDWMSummaryLog.Errorcount
• TDWMSummaryLog.Othercount
• QryLogTDWMSum.Abortcount
• QryLogTDWMSum.Errorcount
• QryLogTDWMSum.Othercount
• DBQLogTbl.OpEnvID
• DBQLogTbl.SysConID
• TDWMEventLog.OpEnvID
• TDWMEventLog.SysConID
• TDWMExceptionLog.OpEnvID
• TDWMExceptionLog.SysConID
• TDWMSummaryLog.OpEnvID
• TDWMSummaryLog.SysConID
• QryLog.OpEnvID
• QryLog.SysConID
• QryLogEvents.OpEnvID
• QryLogEvents.SysConID
• QryLogExceptions.OpEnvID
• QryLogExceptions.SysConID
• QryLogTDWMSum.OpEnvID
• QryLogTDWMSum.SysConID
• Dbase.JarLibRevision
• AMPUsage.CPUTimeNorm
• Acctg.CPUNorm
• Profiles.CostProfName
Date Description
PrefaceChanges to This Book
6 Data Dictionary
October 2007 (Continued)
• Added the following columns (cont.):
• TVM.SecInfo
• TVM.AuthName
• MDSRecoveryTbl.TVMId
• QryLogSteps.RowCount3
• Removed table HW_Event_Log
• Removed view Hardware_Event_Log
• Removed SW_Event_Log.Stacktrace and SW_Event_Log.Error_Data
• Removed Software_Event_Log.Stacktrace and Software_Event_Log.Error_Data
• Removed Dbase.PasswordString
• Updated tables, views, and macros to support UNICODE Data Dictionary
• Updated the example for QryLogTDWM
• Added SQLJ database and the following views:
• JAR_JAR_USAGE
• JARS
• ROUTINE_JAR_USAGE
• DBQLogTbl table and QryLog view:
• Removed LastRespTime
• Changed TotalCPUTime to AMPCPUTime
• Added ParserCPUTime, LogonSource, and LastStateChange
• Changed HotAmp1CPU to MaxAmpCPUTime
• Changed HotCPUAmpNumber too MaxCPUAmpNumber
• Changed LowAmp1CPU to MinAmpCPU
• Changed HotAmp1IO to MaxAmpIO
• Changed HotIOAmpNumber to MaxIOAmpNumber
• Changed LowAmp1IO to MinAmpIO
• Changed WDPeriodID to OpEnvID and SysConID
September 2006 • Updated the codes for QryLogObjects.ObjectType
• Added new column StatementType to QryLog view
• Added new column SpoolUsage to QryLogSteps view
Date Description
PrefaceAdditional Information
Data Dictionary 7
Additional Information
Additional information that supports this product and the Teradata Database is available at the following Web sites.
November 2005 • Updated DBC.SessionTbl.IsolationLevel
• Updated DBC.QryLogObjects.ObjectColumnName
• Added type “D” to DBC.Indexes
• Added possible single character values to:
• DBC.SysSecDefaults.PasswordDigits
• DBC.SysSecDefaults.PasswordSpecChar
• Updated column DBC.QryLogObjects.ObjectColumnName
• Removed view DBC.AllRoleRightsX
• Updated QueryID
• Added view DBC.RepTables[X]
• Added column AuthIdUsed to DBC.ExternalSPs[X]
• Added views DBC.Authorizations and DBC.Authorizations[X]
Date Description
Type of Information Description Source
Overview of the release
Information too late for the manuals
The Release Definition provides the following information:
• Overview of all the products in the release
• Information received too late to be included in the manuals
• Operating systems and Teradata Database versions that are certified to work with each product
• Version numbers of each product and the documentation for each product
• Information about available training and support center
http://www.info.teradata.com/
Click General Search. In the Publication Product ID field, enter 1725 and click Search to bring up the following Release Definition:
• Base System Release DefinitionB035-1725-067K
Additional information related to this product
Use the Teradata Information Products web site to view or download the most recent versions of all manuals.
Specific manuals that supply related or additional information to this manual are listed.
http://www.info.teradata.com/
Click General Search. In the Product Line field, select Software - Teradata Database for a list of all of the publications for this release,
PrefaceReferences to Microsoft Windows and Linux
8 Data Dictionary
References to Microsoft Windows and Linux
This book refers to “Microsoft Windows” and “Linux.” For Teradata Database 12.0, these references mean the following:
• “Windows” is Microsoft Windows Server 2003 32-bit and Microsoft Windows Server 2003 64-bit.
• “Linux” is SUSE Linux Enterprise Server 9 and SUSE Linux Enterprise Server 10.
Teradata plans to release Teradata Database support for SUSE Linux Enterprise Server 10 before the next major or minor release of the database. Therefore, information about this SUSE release is included in this document. The announcement regarding availability of SUSE Linux Enterprise Server 10 will be made after Teradata Database 12.0 GCA. Please check with your account representative regarding SUSE Linux Enterprise Server 10 availability in your location.
CD-ROM images This site contains a link to a downloadable CD-ROM image of all customer documentation for this release. Customers are authorized to create CD-ROMs for their use from this image.
http://www.info.teradata.com/
Click General Search. In the Title or Keyword field, enter CD-ROM, and click Search.
Ordering information for manuals
Use the Teradata Information Products web site to order printed versions of manuals.
http://www.info.teradata.com/
Click How to Order under Print & CD Publications.
General information about Teradata
The Teradata home page provides links to numerous sources of information about Teradata. Links include:
• Executive reports, case studies of customer experiences with Teradata, and thought leadership
• Technical information, solutions, and expert advice
• Press releases, mentions and media resources
Teradata.com
Type of Information Description Source
Data Dictionary 9
Table of Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Supported Software Release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Changes to This Book. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
References to Microsoft Windows and Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
Chapter 1: Teradata Database Data Dictionary Overview . . . 17
What is the Data Dictionary? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Data Dictionary Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Accessing the Data Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Updating the Data Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
How the System Uses Data Dictionary Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Organization of the Data Dictionary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
What Are System Views? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Granted Rights on System Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Extending View Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
System View Versions Non-X and X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Views for Special Users. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Security Logging Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Administrator Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Operations and Recovery Control Views. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Database Administrator Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
End User Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Querying the Data Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Special Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Querying X Versus Non-X Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Dictionary Information Using HELP and COMMENT. . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Stored Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Relationship with Data Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Table of Contents
10 Data Dictionary
External Stored Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34
Related Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35
User-Defined Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35
User-Defined Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35
Relationship with Data Dictionary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36
JARs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36
Related Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37
Java External Stored Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37
Related Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38
PM/API Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38
MONITOR-Related Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39
Monitoring Usage with Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40
AllSpace and TableSize Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40
AMPUsage View. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
Compiling AMPUsage Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42
Account String Expansion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43
DIPVIEW Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44
Tracking Miscellaneous System Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44
Tracking System Events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44
Tracking Logon Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44
Tracking Privileges. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44
CALENDAR System View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45
CALENDAR Definition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45
SQLJ System Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .46
JAR_JAR_USAGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47
Corresponding System Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .47
JARS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48
Corresponding System Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48
ROUTINE_JAR_USAGE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49
Corresponding System Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49
Maintaining System Logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50
Other System Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51
Columns with Hex Unicode Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51
Chapter 2: System Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53
Users of System Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53
Character Data in the Data Dictionary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54
Object Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54
Text Strings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54
Table of Contents
Data Dictionary 11
Other Character Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Compatibility System Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Unicode System Views. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Updatable Views. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
X Version Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
System Views Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
System Views Columns Reference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Chapter 3: System Views: Usage and Examples . . . . . . . . . . . . . . 291
AccessLog[V]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
AccLogRules[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
AccountInfo[V][X]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
AllRights[V][X]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
AllRoleRights[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
AllSpace[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
AllTempTables[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
All_RI_Children[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
All_RI_Parents[V][X]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
AMPUsage[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
ArchiveLoggingObjsV[X]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Association[V][X]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
Authorizations[V][X]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
CharSets[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
CharTranslations[V]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
Children[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
Collations[V]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Columns[V][X]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
ColumnStats[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
CostProfiles_v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
CostProfileTypes_v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
CostProfileValues_v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
Databases[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
Databases2[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
Database_Default_Journals[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
DBCInfo[V]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
DBQLRules[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
DeleteAccessLog[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
Table of Contents
12 Data Dictionary
DeleteOldInDoubt[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .342
DiskSpace[V][X]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .343
ErrorTblsV[X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .346
Events[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .348
Events_Configuration[V][X]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .351
Events_Media[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .353
ExternalSPs[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .355
Functions[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .357
HostsInfo[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .359
IndexConstraints[V][X]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .360
IndexStats[V]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .362
Indices[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .364
InDoubtLog[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .366
Journals[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .367
LogOnOff[V][X]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .368
LogonRules[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .370
MultiColumnStats[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .371
ProfileInfo[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .373
QryLog[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .375
QryLogEventHis[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .378
QryLogEvents[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .380
QryLogExceptions[V]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .381
QryLogExplain[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .383
QryLogObjects[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .385
QryLogSQL[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .387
QryLogSteps[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .388
QryLogSummary[V]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .390
QryLogTDWM[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .392
QryLogTDWMSum[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .394
RCC_Configuration[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .396
RCC_Media[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .398
RepTables[V][X]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .399
RestrictedWords[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .400
RI_Child_Tables[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .401
RI_Distinct_Children[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .402
RI_Distinct_Parents[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .403
RI_Parent_Tables[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .404
RoleInfo[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .405
Table of Contents
Data Dictionary 13
RoleMembers[V][X]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406
SecurityDefaults[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
SecurityLog[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
SessionInfo[V][X]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
ShowColChecks[V][X]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
ShowTblChecks[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412
Software_Event_Log[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
Table_LevelConstraints[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
Tables[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416
Tables2[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419
TableSize[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
TableText[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422
Triggers[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
UserGrantedRights[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
UserRights[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
UserRoleRights[V] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
Users[V]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
User_Default_Journals[V][X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
Chapter 4: System Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
Creating System Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
Special Table Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
DBC.ALL Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
DBC.TVM Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
DBC.TVFields Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
ResUsage Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
Non-Hashed Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
Data Dictionary Fallback and Non-Fallback Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
DBC.AccessRights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
DBC.AccLogRuleTbl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
DBC.AccLogTbl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443
DBC.Accounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
DBC.Acctg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
DBC.ArchiveLoggingObjsTbl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
DBC.CollationTbl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
DBC.ColumnCorrelation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
DBC.ConstantDefs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450
DBC.ConstantValues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
Table of Contents
14 Data Dictionary
DBC.ConstraintNames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .451
DBC.CostProfiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .453
DBC.CostProfileTypes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .453
DBC.DataBaseSpace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .454
DBC.Dbase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .455
DBC.DBCAssociation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .459
DBC.DBCInfoTbl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .461
DBC.DBQLExplainTbl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .462
DBC.DBQLObjTbl. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .462
DBC.DBQLogTbl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .464
DBC.DBQLRuleCountTbl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .468
DBC.DBQLRuleTbl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .468
DBC.DBQLSqlTbl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .469
DBC.DBQLStepTbl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .470
DBC.DBQLSummaryTbl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .472
DBC.Dependency. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .473
DBC.ErrorMsgs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .475
DBC.ErrorTbls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .475
DBC.EventLog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .476
DBC.Global. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .477
DBC.Hosts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .477
DBC.IdCol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .478
DBC.Indexes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .478
DBC.InDoubtResLog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .480
DBC.JARS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .481
DBC.JAR_JAR_Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .482
DBC.LogonRuleTbl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .483
DBC.MDSRecoveryTbl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .484
DBC.Migration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .484
DBC.Next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .484
DBC.OldPasswords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .485
DBC.Owners. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .485
DBC.ParentChildCorrelation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .486
DBC.Parents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .486
DBC.PasswordRestrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .487
DBC.Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .487
DBC.RCConfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .489
DBC.RCEvent. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .490
DBC.RCMedia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .492
DBC.ReconfigInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .492
DBC.ReconfigOrder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .494
DBC.ReconfigTableStats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .495
DBC.ReferencedTbls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .498
Table of Contents
Data Dictionary 15
DBC.ReferencingTbls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498
DBC.RepBatchStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499
DBC.Repgroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500
DBC.Repgrouptables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501
DBC.Roles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
DBC.RoleGrants. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502
DBC.Routine_JAR_Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
DBC.SessionTbl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504
DBC.SW_Event_Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508
DBC.SysSecDefaults. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509
DBC.SystemQTbl. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511
DBC.TableConstraints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512
DBC.TDWMEventHistory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513
DBC.TDWMEventlog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514
DBC.TDWMExceptionLog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515
DBC.TDWMSummaryLog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516
DBC.TempStatistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 517
DBC.TempTables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518
DBC.TextTbl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518
DBC.Translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
DBC.TriggersTbl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519
DBC.TSETQueryText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521
DBC.TVFields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522
DBC.TVM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526
DBC.UDFInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534
DBC.UnResolvedReferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537
DBC.UDTCast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538
DBC.UDTInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541
DBC.UDTTransform. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544
Chapter 5: Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545
TwoPCRule Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545
ResUsage Macros. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 546
DIPVIEW Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547
ARC_NonEmpty_List[M] Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548
ClearAccounting Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550
ClearAllDatabaseUseCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550
ClearDatabaseUseCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551
ClearPeakDisk Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551
ClearTVMUseCount. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552
Table of Contents
16 Data Dictionary
CollAddStandard Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .552
CollInstallMulti Macro. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .553
CopyCostProfile Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .553
CreateNewCostProfile Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .554
DBQLAccessMacro Macro. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .555
DeleteConstantValue Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .555
DeleteCostProfile Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .556
DIPMarkNSIO Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .556
InsertConstantString Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .557
InsertConstantValue Macro. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .557
ListCostProfiles Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .558
ListCostProfiles1 Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .558
ListCostProfiles2 Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .559
LogonRule Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .560
MergeCostProfile Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .561
ShowCostProfile Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .561
ShowCostProfileAs Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .562
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .563
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .567
Data Dictionary 17
CHAPTER 1 Teradata Database DataDictionary Overview
This chapter describes the Teradata Database 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
What is the Data Dictionary?
The Teradata Database 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 associated data of the system. Data Dictionary system tables include current definitions, control information, and general information about the following:
• Databases
• Character Sets
• End Users
• Roles
• Profiles
• Accounts
• Tables
• Views
• Columns
Chapter 1: Teradata Database Data Dictionary OverviewWhat is the Data Dictionary?
18 Data Dictionary
• Indexes
• Constraints
• Sessions and Session Attributes
• Triggers
• Access Rights
• Journal Tables
• Disk space
• Events
• Resource Usage
• Macros
• Stored Procedures
• Logs
• Rules
• Translations
• Character Sets
• Statistics
• User-Defined Functions
• External Stored Procedures
• Authorization
• User-defined Types
• User-defined Methods
Data Dictionary Users
Users typically use views to obtain information on objects, and database 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 and permanent journaling status).
• 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.
Chapter 1: Teradata Database Data Dictionary OverviewWhat is the Data Dictionary?
Data Dictionary 19
• 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.
When a user creates a user-defined function, the following details are automatically entered in the Data Dictionary:
• Text used to create the user-defined function
• Attributes of the user-defined function
• User and creator access privileges on the user-defined function
• Object code of the user-defined function
When a user creates an external stored procedure, the following details are automatically entered in the Data Dictionary:
• Text used to create the external stored procedure
• Object code of the external stored procedure
• Attributes of the external stored procedure
• User and creator access privileges on the external stored procedure
• User-defined types and methods
Accessing the Data Dictionary
For security and data integrity reasons, only the SELECT privilege is granted by default 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.
SELECT privileges have not been granted to the PUBLIC on the following system views:
• DBC.AccessLog
• DBC.AccLogRules
• DBC.CSPSessionInfo
• DBC.DBQLRules
• DBC.DeleteAccessLog
• DBC.DeleteOldInDoubt
• DBC.InDoubtLog
• DBC.LogonRules
• DBC.QryLog
• DBC.QryLogExceptions
• DBC.QryLogExplain
Chapter 1: Teradata Database Data Dictionary OverviewWhat is the Data Dictionary?
20 Data Dictionary
• DBC.QryLogEvents
• DBC.QryLogObjects
• DBC.QryLogSQL
• DBC.QryLogSteps
• DBC.QryLogSummary
• DBC.QryLogTDWM
• DBC.QryLogTDWMSum
• DBC.SecurityLog
• DBC.SecurityLogX
• DBC.Software_Event_Log
Updating the Data Dictionary
When a data definition statement is processed, the system tables are updated automatically.
When a table is changed by an ALTER, CREATE, DROP, or RENAME statement, the Teradata Database automatically increments the version count for that table. For more information about creating, changing, and dropping tables, see Chapter 4: “System Tables.”
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 Data Dictionary to ensure that the requestor has the appropriate access privileges.
approved query uses the Data Dictionary 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 Data Dictionary.
approved request that references a view name
assembles the view according to the definition stored in the Data Dictionary and integrates the underlying tables and views into a query to create the best method of accessing the data.
approved request that references a stored procedure name
obtains the stored procedure creation-time attributes from the Data Dictionary and validates the usage of the submitted request.
approved request that references a user-defined function
obtains the user-defined function attributes from the Data Dictionary and validates the usage of the submitted request.
Chapter 1: Teradata Database Data Dictionary OverviewOrganization of the Data Dictionary
Data Dictionary 21
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 Database administrator. Specialized views are designed to meet the needs of the following individuals:
• Teradata Database security administrator
• Teradata Database administrator
• A user who supervises other Teradata Database users and accounts
• An end user or client logged on to a Teradata Database session
• An operator using the database window of the Administration Workstation (AWS) or responsible for running client utilities
References to specific views for certain users are described in detail later in this chapter.
What Are System Views?
System views are part of the Teradata Database 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 Database 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 Utilities. DIP is used to execute one or more of the standard DIP SQL scripts packaged with the Teradata Database.
Supplied views allow the database administrator to provide a consistent image of the data stored in the Data Dictionary. In most instances, only the Teradata Database administrator is allowed to directly update or delete a Data Dictionary view or its underlying system tables.
Granted Rights on System Views
The database 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.
Chapter 1: Teradata Database Data Dictionary OverviewWhat Are System Views?
22 Data Dictionary
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 Database version and release by submitting the following query from any client:
SELECT * FROM DBC.DBCInfo;
Extending View Privileges
In some cases, the database 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 Database, a security administrator user may need to be created and granted the privileges necessary to execute BEGIN/END LOGGING statements.
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 database 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.
An X version of a view limits the return from a view to only those rows associated with the requesting user, such as the following:
• Databases
• Users
• Objects owned or created by the user
• Objects on which the user has been granted privileges
In addition to the rows associated with the requesting user, the following X views return rows associated with the requesting the current role of the user and any nested roles of that current role.
• DBC.All_RI_ChildrenX
• DBC.All_RI_ParentsX
• DBC.AllRightsX
• DBC.AssociationX
Chapter 1: Teradata Database Data Dictionary OverviewWhat Are System Views?
Data Dictionary 23
• DBC.ColumnsX
• DBC.DatabasesX
• DBC.Databases2X
• DBC.Database_Default_JournalsX
• DBC.DiskSpaceX
• DBC.EventsX
• DBC.Events_MediaX
• DBC.Events_ConfigurationX
• DBC.FunctionsX
• DBC.IndexConstraintsX
• DBC.IndicesX
• DBC.JournalsX
• DBC.RCC_MediaX
• DBC.RCC_ConfigurationX
• DBC.RepTablesX
• DBC.RI_Child_TablesX
• DBC.RI_Distinct_ChildrenX
• DBC.RI_Distinct_ParentsX
• DBC.RI_Parent_TablesX
• DBC.ShowColChecksX
• DBC.ShowTblChecksX
• DBC.Table_LevelConstraintsX
• DBC.TablesX
• DBC.Tables2X
• DBC.TableSizeX
• DBC.TableTextX
• DBC.TriggersX
• DBC.User_Default_JournalsX
For example, the DBC.TablesX view provides the following information for each table to which the role of the user has access.
• If the Role has privilege on all in TVMs
• If the Role has privilege on this specific TVM
It also depends on the current session role of the user to determine what role(s) is used to verify privileges.
Chapter 1: Teradata Database Data Dictionary OverviewViews for Special Users
24 Data Dictionary
X views run slower than non-X views because the X views have security checks.
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 Database.
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.
For security, Jones may be permitted to use only the X version.
Views for Special Users
Some views are 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 (either directly or via PUBLIC). The following table describes who typically uses certain types of views:
If the current role is . . . Then . . .
not NULL or ALL the current role and its nested role are used for security checks.
ALL all the role(s) directly granted to the user and all their nested role(s) are used for security checks.
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 Database server.
The database 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 Security Administration.
Chapter 1: Teradata Database Data Dictionary OverviewViews for Special Users
Data Dictionary 25
The following sections describe the particular views that can be valuable to different types of users.
Security Logging Views
The following Data Dictionary views are of interest to the user responsible for security of the data on the Teradata Database.
A user responsible for security may also have an interest in views listed in the next section, for example, the ones that deal with access rights.
System Administrator These views are generally available only to SYSADMIN. They provide information about Parser Engine (PE) vprocs (virtual processors) on the Teradata Database, which are of interest to database administrators of Teradata Database server systems that communicate with PC or workstation clients.
System Field Engineer 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.
View Type Description
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] Removes AccessLog records that are more than 30 days old.
SecurityLog[X] Provides a subset of the information in the AccessLog view.
LogOnOff Reports logon/logoff activity for a user, including account, date, time of day, and unsuccessful logon attempts.
LogonRules Reports logon rules that have been generated for username/hostid pairs as a result of successfully executed GRANT LOGON and REVOKE LOGON statements.
SecurityDefaults Reports password parameters, such as length, valid characters, number of logon attempts, and elapsed time for password expiration and re-use defined for your site.
Chapter 1: Teradata Database Data Dictionary OverviewViews for Special Users
26 Data Dictionary
Statements related to access logging may be executed only if the DBC.AccLogRule security macro has been created in database DBC. Otherwise, logging of Teradata SQL access requests is not performed. See Security Administration for more information on creating this macro and further information on access logging and security.
If access logging is specified for a data object (for example, a table), log entries are 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 does 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 Database Version 2.0. In prior releases, if underlying tables had logging rules, then rows were added even if access was through a view or macro.
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 Teradata Database administrators could include but are not limited to the following:
View Description
AllRights What privileges on databases/users, tables, views, triggers, stored procedures, macros, user-defined functions, user-defined types, and user-defined methods 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 Database resources (AMP usage, I/Os) are generated by a given user/account string?
CharSets What names of any user-defined character sets are installed and can be used in a session.
Chapter 1: Teradata Database Data Dictionary OverviewViews for Special Users
Data Dictionary 27
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 What is the statistical information on the columns in a table for which statistics have been collected?
DBCInfo What Teradata Database 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 What is the statistical information on the indexes defined on a table for which statistics have been collected?
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?
ProfileInfo[X] What is the profile and its parameter settings for users or the current user?
RoleInfo[X] What are the names of the role creators corresponding to each role?
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 Database 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?
TableText[X] What data tables, views, macros have been created with the create/request text overflow in DBC.TVM table?
View Description
Chapter 1: Teradata Database Data Dictionary OverviewViews for Special Users
28 Data Dictionary
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:
Database Administrator Views
The following views are useful to a database administrator:
End User Views
The following views are useful to an end user:
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.
Association Retrieves information about an object that was imported from another Teradata Database.
View Description
AccountInfo[X] What accounts are available to a given user?
ProfileInfo[X] What are the profile and its parameter settings for the current user?
RoleInfo[X] What are the names of the role creators corresponding to each role?
Users What users are owned, or have been created, by a user?
View Description
AccountInfo[X] What are the accounts the user can control?
Association What are the ported and original definitions of databases, users, and objects that were moved to a different Teradata Database server via the Portable Dump/Restore utility?
Chapter 1: Teradata Database Data Dictionary OverviewViews for Special Users
Data Dictionary 29
CharSets What user-defined International character sets are currently installed on the Teradata Database 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, user-defined function, user-defined types, user-defined methods, 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?
Database_Default_Journals[X] What databases are defined as having a default journal table, and what are the journal table names?
Functions[X] What is all the information available for a particular function?
HostsInfo What character sets have been assigned as the default to each Teradata Database client connection in the Teradata Database 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.
IndexConstraints What index constraints derived from partitioning expressions have been defined for a table?
Indices[X] What kinds of indexes have been defined for a table?
Journals[X] What data tables use what journal tables, and in which database does each table reside?
View Description
Chapter 1: Teradata Database Data Dictionary OverviewQuerying the Data Dictionary
30 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.
ProfileInfo[X] What are all the profiles and their parameter settings?
RoleInfo{X] What are the names of role creators corresponding to each role?
RoleMembers[X] What is each role and all of its members?
ShowTblChecks What table constraints have been defined for a database?
This view selects the uppercase databasename and tablename.
Table_LevelConstraints What table constraints have been defined for a database?
This view selects the databasename and tablename as they were entered by the user.
Tables[X] What data tables, triggers, stored procedures, views, join indexes, macros, user-defined types, user-defined methods, and user defined functions 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 on databases, tables, triggers, stored procedures, views, join indexes, macros, user-defined types, user-defined methods, and user-defined functions?
UserRoleRights What are all the rights granted to each role for the user?
View Description
Chapter 1: Teradata Database Data Dictionary OverviewQuerying the Data Dictionary
Data Dictionary 31
Special Keywords
Three special names are used in queries of dictionary views. Although they appear as user or database names in information returned from a view, these names are not names of actual users or databases. Rather, they are character strings that serve as placeholders, appearing only as special “user names” or “database names” in the queries of certain views.
The three special names are:
• ALL
• DEFAULT
• PUBLIC
These names must be enclosed in quotation marks as do actual user or database names when they are used in certain views.
For example, the following query uses ALL as a name and returns the logging rules that apply to all users:
SELECT * FROM DBC.AccLogRules WHERE UserName = ’ALL’;
Note: In general, users never reference these names in queries or other SQL commands. These names, although appearing as user or database names, actually have no content, no tables, no views, and cannot be logged on to.
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”
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:
A view specified as … Returns information about …
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
• has access to via current role and the current nested roles of the role
Chapter 1: Teradata Database Data Dictionary OverviewQuerying the Data Dictionary
32 Data Dictionary
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 Database would be listed, as shown below:
DatabaseName CreatorName OwnerName PermSpacepers 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:
DatabaseName CreatorName OwnerName PermSpaceSQLDBA 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 for which the user has access.
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 access rights that the current user has granted to other users. The column names are:
Chapter 1: Teradata Database Data Dictionary OverviewStored Procedures
Data Dictionary 33
DatabaseName, TableName, ColumnName, AccessRight, Grantee, Grant Authority, and Allnessflag.
Stored Procedures
A stored procedure is defined and stored as a database object. Unlike objects such as views and macros whose DDL statement text is stored in the Data Dictionary, a stored procedure also has information stored in the database of the user space.
The stored procedure object in the server contains the following information:
• Source text (definition) used for creating the stored procedure
• Corresponding object code (the compiled stored procedure)
• Character set of the creator, character data type, collation sequence, and default database name
Relationship with Data Dictionary
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
• Stored procedure text storage option
• Teradata Stored Procedure (TDSP) version number
• Warning option
• Hardware architecture
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.
The access rights of CREATE PROCEDURE, ALTER PROCEDURE, EXECUTE PROCEDURE, and DROP PROCEDURE are stored in AccessRights. The corresponding logging rules are stored in AccLogRuleTbl. These respective columns are called AcrCreateProcedure, AcrAlterProcedure, 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.
Chapter 1: Teradata Database Data Dictionary OverviewExternal Stored Procedures
34 Data Dictionary
Related Information
See Chapter 4: “System Tables” for more specific information on tables affected by stored procedures.
See “SQL Stored Procedures” in SQL Reference: Stored Procedures and Embedded SQL for complete details and rules for the usage of stored procedures.
External Stored Procedures
An external stored procedure is defined and stored as a database object. The External Stored Procedures (XSP) attributes are stored in the DBC.TVM data dictionary table. Similar to the user-defined function objects, the source code and the object code of external stored procedures are stored in the database of the user space.
The external stored procedure object contains the following information:
• C/C++ source code and object code for the external stored procedure
• External stored procedure name
• External name
• Data types of the parameters
• Source file language
• Data accessing characteristic
• Parameter passing convention
• Execution protection mode
• Character type
• Platform type
Relationship with Data Dictionary
Information pertaining to external stored procedures is included in the following Data Dictionary tables:
• DBC.TVM
• DBC.TVFields
• DBC.AccLogRuleTbl
• DBC.DBase
• DBC.AccessRights
The privileges relating to external stored procedures are:
• CREATE PROCEDURE
• ALTER PROCEDURE
• DROP PROCEDURE
• EXECUTE PROCEDURE
Chapter 1: Teradata Database Data Dictionary OverviewUser-Defined Methods
Data Dictionary 35
Related Information
For more information on External Stored Procedures, see SQL Reference: UDF, UDM, and External Stored Procedure Programming.
User-Defined Methods
A user-defined method is defined and stored as a database object. The function attributes are stored in a data dictionary table called DBC.UDFInfo. Similar to stored procedure objects, the source code and the object code of the user-defined methods are stored in the database of the user space.
The user-defined method object contains the following information:
• C source code and object code for the user defined method
• Function call name
• Specific name
• External name
• Data types of the parameters
• Function class
• Source file language
• Data accessing characteristic
• Parameter passing convention
• Deterministic characteristic
• Null-call characteristic
• Execution protection mode
• Character type
• Platform type
User-Defined Functions
A user-defined function is defined and stored as a database object. The function attributes are stored in a data dictionary table called DBC.UDFInfo. Similar to stored procedure objects, the source code and the object code of the user-defined functions are stored in the database of the user space.
The user-defined function object contains the following information:
• C source code and object code for the user defined function
• Function call name
• Specific name
• External name
Chapter 1: Teradata Database Data Dictionary OverviewJARs
36 Data Dictionary
• Data types of the parameters
• Function class
• Source file language
• Data accessing characteristic
• Parameter passing convention
• Deterministic characteristic
• Null-call characteristic
• Execution protection mode
• Character type
• Platform type
Relationship with Data Dictionary
The information pertaining to user-defined functions is included in the following Data Dictionary tables:
• DBC.TVM
• DBC.UDFInfo
• DBC.TVFIelds
• DBC.AccLogRuleTbl
• DBC.DBase
• DBC.AccessRights
The privileges relating to user-defined functions are the following:
• ALTER FUNCTION
• CREATE FUNCTION
• DROP FUNCTION
• EXECUTE FUNCTION
Related Information
For more specific information on tables affected by user-defined functions, see Chapter 4: “System Tables.”
For more information on user-defined functions, see SQL Reference: UDF, UDM, and External Stored Procedure Programming and SQL Reference: Data Definition Statements.
JARs
A JAR is created externally to the database but is defined and stored as a database object when installed on the system. The attributes of JAR are stored in the DBC.TVM and DBC.JARS data dictionary tables. Similar to the user-defined function objects, the object code of the externally created JAR file is stored in the database of the user space.
Chapter 1: Teradata Database Data Dictionary OverviewJava External Stored Procedures
Data Dictionary 37
The JAR object contains the following information:
• Java object code for the JAR
• JAR name
• External name
• Platform type
• Revision number
Relationship with Data Dictionary
Information pertaining to JARs is included in the following Data Dictionary tables:
• DBC.TVM
• DBC.JARS
• DBC.DBase
• DBC.AccessRights
The privileges relating to JARs are:
• CREATE EXTERNAL PROCEDURE
• DROP PROCEDURE
Related Information
For more information on JARs, see SQL Reference: UDF, UDM, and External Stored Procedure Programming.
Java External Stored Procedures
A Java external stored procedure is defined and stored as a database object. The Java External Stored Procedures attributes are stored in the DBC.TVM and DBC.Routine_Jar_Usage data dictionary tables. Similar to the user-defined function objects, the source code and the object code of Java external stored procedures are stored in the database of the user space.
The Java external stored procedure object contains the following information:
• C++ source code and object code for the preamble file for the Java external stored procedure
• Java external stored procedure name
• External file reference
• Data types of the parameters
• Source file language
• Data accessing characteristic
• Parameter passing convention
• Execution protection mode
Chapter 1: Teradata Database Data Dictionary OverviewPM/API Queries
38 Data Dictionary
• Character type
• Platform type
Relationship with Data Dictionary
Information pertaining to Java external stored procedures is included in the following Data Dictionary tables:
• DBC.TVM
• DBC.TVFields
• DBC.AccLogRuleTbl
• DBC.DBase
• DBC.AccessRights
• DBC.Routine_Jar_Usage
• DBC.UDFInfo
The privileges relating to Java external stored procedures are:
• CREATE EXTERNAL PROCEDURE
• ALTER PROCEDURE
• DROP PROCEDURE
• EXECUTE PROCEDURE
Related Information
For more information on Java External Stored Procedures, see SQL Reference: UDF, UDM, and External Stored Procedure Programming.
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
Chapter 1: Teradata Database Data Dictionary OverviewPM/API Queries
Data Dictionary 39
• 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 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 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
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.
Chapter 1: Teradata Database Data Dictionary OverviewMonitoring Usage with Views
40 Data Dictionary
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 ;
Monitoring Usage with Views
Information on the usage of the Teradata Database is collected by user and by account number. Control is determined by the definition of each CREATE USER statement.
An account is associated with a group of users whose usage charges are maintained by the Teradata Database. Account IDs 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 ID of the immediate owner of the user. If the owner has multiple account IDs, then the first account ID is taken for the user as the default.
The following sections describe the accounting information available for any Teradata Database 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 Database 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.
Chapter 1: Teradata Database Data Dictionary OverviewMonitoring Usage with Views
Data Dictionary 41
AMPUsage View
The AMPUsage view supplies information about AMP CPU time consumed, and the number of AMP to disk 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
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.
• 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.)
Chapter 1: Teradata Database Data Dictionary OverviewMonitoring Usage with Views
42 Data Dictionary
• 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 is lost completely and does 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 I/O 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:
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.
This procedure may be carried out using the following BTEQ script:
.LOGON username, password
INSERT INTO AMPUseHistSELECT AccountName, UserName,SUM(CPUtime), SUM(DiskIO), DATE, TIME
FROM DBC.AMPUsageGROUP BY AccountName, UserName, DATE, TIME;UPDATE DBC.AMPUsageSET CPUTime = 0, DiskIO = 0 ALL;
.QUIT
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 to query the data or to archive the data on a client system. You can use the selected data in sequential data sets on the host computer for subsequent analysis.
For example, you can use a BTEQ script to achieve the following:
• Create a client-resident file (in this case, the client is MVS)
• Use the BTEQ .EXPORT command to save the data being selected into that file
• Select 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:
Chapter 1: Teradata Database Data Dictionary OverviewMonitoring Usage with Views
Data Dictionary 43
//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.
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
Workload Management API: PM/API and Open API
Other Performance Monitoring Tools
AMPUsage View
Resource Usage Macros and Tables
Resource Usage Macros
• ResUsage Macro Names
• ResUsage Macro Functions
• ResNode Macros
Chapter 1: Teradata Database Data Dictionary OverviewDIPVIEW Script
44 Data Dictionary
DIPVIEW Script
The DIPVIEW script allows database administration to install the data dictionary and system views. It is provided on the Teradata Database CD-ROM or release tape.
For more information on the Database Initialization Program (DIP) utility, see Utilities.
Note: DIPVIEW is run as part of running DIPALL from the utility.
Tracking Miscellaneous System Actions
Tracking System Events
The Software_Event_Log view displays, by date and time, any events that have affected processing, such as a memory parity error, a disabling of logons, a Teradata Database 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 Database.
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 SQL Reference: Data Definition Statements, 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 Security Administration.
Chapter 1: Teradata Database Data Dictionary OverviewCALENDAR System View
Data Dictionary 45
CALENDAR System View
Introduction
The SYS_CALENDAR.CALENDAR system view helps to extend the properties of a DATE data type column by means of a join.
The DIPCAL SQL script must be run from the DIP utility by the administrator to create the SYS_CALENDAR database and CALENDAR view.
The calendar dates range from 1900 to 2100 and are stored in a table in the SYS_CALENDAR database.
Authorization
The Sys_Calendar.Calendar view has SELECT privilege granted to PUBLIC.
CALENDAR Definition
The following table describes the columns of the SYS_CALENDAR.CALENDAR view. In addition, the table includes information on the data type and format of the column.
View Column Name Description Data Type Format
Calendar_date Returns the default date format. DATE YY-MM-DD
day_of_week Returns the day of the week (1-7) where Sunday = 1 and Saturday = 7.
INTEGER -(10)9
day_of_month Returns the day of the month (1-31). INTEGER -(10)9
day_of_year Returns the day of the year (1-366). INTEGER -(10)9
day_of_calendar Returns the number of days since and including 01/01/1900.
INTEGER -(10)9
weekday_of_month Returns the nth occurrence of the weekday in the month (1-5).
INTEGER -(10)9
week_of_month Returns the nth full week of the month, first partial week is 0 (0-5).
INTEGER -(10)9
week_of_year Returns the nth full week of the year, first partial week is 0 (0-53).
INTEGER -(10)9
week_of_calendar Returns the nth full week of the calendar, the first partial week is 0.
INTEGER -(10)9
month_of_year Returns the month of the year (1-12). INTEGER -(10)9
month_of_quarter Returns the month of the quarter (1-4). INTEGER -(10)9
month_of_calendar Returns the number of the months since and including 01/01/1900.
INTEGER -(10)9
Chapter 1: Teradata Database Data Dictionary OverviewSQLJ System Views
46 Data Dictionary
Example
You are encouraged to define views on the CALENDAR system view because of its convenience.
A useful view to define on CALENDAR is TODAY:
CREATE VIEW Today AS (SELECT * FROM SYS_CALENDAR.Calendar
WHERE SYS_CALENDAR.Calendar.calendar_date = DATE);
CALENDAR permits easy specification of arithmetic expressions and aggregation. This is particularly used in OLAP environments where it is common to request values aggregated by weeks, months, year-to-date, years, and so on. The following is a good example.
What are the dollar sales for this week, last week, and the same weeks last year for all items in the sportswear class for women?
SELECT a2.week_of_calendar, SUM(a1.price)FROM Sales a1, CALENDAR a2, Item a3, Class a4, Today a5WHERE a1.calendar_date=a2.calendar_dateAND (a2.week_of_calendar=a5.week_of_calendarOR a2.week_of_calendar=a5.week_of_calendar - 1OR a2.week_of_calendar=a5.week_of_calendar - 52OR a2.week_of_calendar=a5.week_of_calendar - 53)AND a1.itemID=a3.itemIDAND a3.classID=a4.classIDAND a4.classDesc=’Women’s Sportswear’GROUP BY a2.week_of_calendarORDER BY a2.week_of_calendar;
SQLJ System Views
Introduction
The SQLJ database and its views are used by the system to manage JAR files that implement Java external stored procedures.
The SQLJ database is created via a DIP script. The DIP script used to create the SQLJ database and its objects is called DIPSQLJ. This script is run as part of DIPALL. It requires sufficient space for all required components to be defined within it, and the initial space allocation for
quarter_of_year Returns the quarter of the year. 1 (Jan/Feb/Mar) - 4 (Oct/Nov/Dec).
INTEGER -(10)9
quarter_of_calendar Returns the number of quarters since and including Q1/1900.
INTEGER -(10)9
year_of_calendar Returns the number of calendar years in 4 digit format.
INTEGER -(10)9
View Column Name Description Data Type Format
Chapter 1: Teradata Database Data Dictionary OverviewSQLJ System Views
Data Dictionary 47
this database is determined based upon that fact. The best practice is to avoid the placement of additional items into this database, as the SQLJ database could be considered an extension to the Teradata Data Dictionary defined in the DBC database. The DIP script which creates SQLJ and its components follows the pattern set by the DBC Data Dictionary initialization process, and revokes all privileges which could result in modification of SQLJ's views and external stored procedures.
The SQLJ system database contains the following views:
• JAR_JAR_USAGE
• JARS
• ROUTINE_JAR_USAGE
JAR_JAR_USAGE
The JAR_JAR_USAGE view identifies each JAR owned by a given user or database on which other JARs defined on the system are dependent.
The following table describes the columns of the JAR_JAR_USAGE view.
Corresponding System Tables
The corresponding system tables for SQLJ.JAR_JAR_USAGE are:
• DBC.JAR_JAR_USAGE
• DBC.DBase
• DBC.TVM
View Column Name Description Data Type Format
DatabaseId The identifier of the database or user in which the JAR identified by JarName is defined.
BYTE(4)NOT NULL
X(8)
JarName The name designator for a JAR that depends on code from another JAR.
VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFICNOT NULL
X(128)
PathJarName The name designator for a JAR, which is in the SQL-Java path of the JAR identified by JarName
The SQL-Java path is the search path defined for a particular JAR. With a SQL-Java path defined, a method defined in a particular JAR (JAR A, for example) may invoke a method which is actually defined in another JAR (JAR B), if JAR B (and all its classes) is contained in JAR A's SQL-Java path. A SQL-Java path for a JAR can only be created, altered, or dropped via a call to SQLJ.Alter_Java_Path.
VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFICNOT NULL
X(128)
Chapter 1: Teradata Database Data Dictionary OverviewSQLJ System Views
48 Data Dictionary
Example
The following SELECT statement retrieves information about each JAR owned by a given user or database on which other JARs are dependent.
==> SELECT * FROM sqlj.jar_jar_usage;
*** Query completed. 2 rows found. 3 columns returned. *** Total elapsed time was 1 second.
DatabaseId JarName PathJarName---------- ------- -----------0000B905 JAR1 JAR40000B905 JAR2 JAR3
JARS
The JARS view identifies the installed JARs defined on the system that are accessible to the current user or database.
The following table describes the columns of the JARS view.
Corresponding System Tables
The corresponding system tables for SQLJ.JARS are:
• DBC.DBase
• DBC.JARS
Example
The following SELECT statement retrieves information about all of the JAR objects that are accessible to the current user or database.
==> SELECT * FROM sqlj.jars;
*** Query completed. 3 rows found. 3 columns returned. *** Total elapsed time was 1 second.
View Column Name Description Data Type Format
DatabaseId The identifier of the database or user in which the JAR identified by JarName is defined.
BYTE(4)NOT NULL
X(8)
JarName The name designator for an installed JAR. VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFICNOT NULL
X(128)
JarId The unique identifier for the JAR identified by JarName.
BYTE(6)NOT NULL
X(12)
Chapter 1: Teradata Database Data Dictionary OverviewSQLJ System Views
Data Dictionary 49
DatabaseId JarName JarId---------- ------- ------------0000B905 JAR1 0000612800000000B905 JAR2 0000622800000000B905 JAR3 000063280000
ROUTINE_JAR_USAGE
The ROUTINE_JAR_USAGE view identifies the JARs owned by a given user or database on which external Java routines defined on the system are dependent.
Corresponding System Tables
The corresponding system tables for SQLJ.ROUTINE_JAR_USAGE are:
• DBC.ROUTINE_JAR_USAGE
• DBC.DBase
• DBC.TVM
Example
The following SELECT statement retrieves information about all of the JARs owned by a given user or database on which dependent external Java routines are defined. Information about these routines is also returned.
==> SELECT * FROM sqlj.routine_jar_usage;
*** Query completed. 3 rows found. 4 columns returned. *** Total elapsed time was 1 second.
DatabaseId 0000B905 JarName JAR1RoutineName MYINT
View Column Name Description Data Type Format
DatabaseId The identifier of the database or user in which the JAR identified by JarName is defined.
BYTE(4)NOT NULL
X(8)
RoutineName The name designator for a Java external stored procedure that depends on the JAR identified by JarName.
VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFICNOT NULL
X(128)
JarName The name designator for a JAR that contains code that the RoutineName external stored procedure depends on.
VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFICNOT NULL
X(128)
Signature The signature defined for Java external stored procedure identified by RoutineName.
VARCHAR(6400)LATINCASESPECIFIC
X(255)
Chapter 1: Teradata Database Data Dictionary OverviewMaintaining System Logs
50 Data Dictionary
Signature (I[I)V DatabaseId 0000B905 JarName JAR2RoutineName MYDEC Signature (Ljava/math/BigDecimal;[Ljava/math/BigDecimal;)V DatabaseId 0000B905 JarName JAR3RoutineName MYVARBYTE Signature ([B[Ljava/lang/String;)V
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 administrator, or by Teradata 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 Teradata field support personnel.
Purging Outdated Information
You must purge outdated AMPUsage information using the Teradata SQL DELETE statement. You may also use the Teradata SQL DELETE statement to purge outdated DBQL information from:
• DBQLogTbl
• DBQLObjTbl
• DBQLExplainTbl
• DBQLStepTbl
• DBQLSqlTbl
• DBQLSummaryTbl
• TDWMEventLog
• TDWMExceptionLog
• TDWMSummaryLog
• TDWMEventHistory
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.
Chapter 1: Teradata Database Data Dictionary OverviewOther System Objects
Data Dictionary 51
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 DeleteAccessLog view in the FROM clause of the DELETE statement, as follows.
DELETE FROM DBC.DeleteAccessLog ALL ;
If preferred, you can periodically archive the contents of system tables to backup storage such as tape. This can be done, for example, using the BTEQ .EXPORT command, FastExport, or an Open Teradata Backup solution.
For information on how to copy the data to user tables and do the copying and purging, see Database Administration.
Other System Objects
The following system objects are not covered in detail in this manual:
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 Utilities).
Constants are converted to the _Unicode’..’XC format if they would otherwise not be sharable (see SQL Reference: Data Types and Literals).
Object Reference for More Information
SysAdmin.Fastlog table This internal table containing FastLoad information does not need to be accessed directly by the user.
SystemFE database SystemFE Macros
Resource Usage tables Resource Usage Macros and Tables
Sys_Calendar database SQL Reference: Data Types and Literals
Database Name Table Name Column Name
DBC TableConstraints TableCheck
DBC TriggersTbl CreateText
Chapter 1: Teradata Database Data Dictionary OverviewColumns with Hex Unicode Constants
52 Data Dictionary
DBC TVFields ColumnCheck
DBC TVM CreateText
Database Name Table Name Column Name
Data Dictionary 53
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 who have access to the system views that resides in database DBC. These system views are also sometimes referred to as the data dictionary views.
• An explanation of the kinds of system views - compatibility and UNICODE system views and their X forms.
• A reference table describing the system 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.
Users of System Views
Many of the views in the Teradata Database Data Dictionary may be restricted to special types of users, while others are accessible by all users. The ability to access system views is controlled by granting of access rights by the database administrator. The following table defines the information needs of various types of users:
This type of user … Needs to know this information …
End user • Objects to which the user has access
• Types of access available to the user
• Privileges 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 privileges
• How to create indexes
• How to perform archiving operations
Teradata Database administrator
• Performance
• Status and statistics
• Errors
• Accounting
Chapter 2: System ViewsCharacter Data in the Data Dictionary
54 Data Dictionary
Character Data in the Data Dictionary
Character data in the data dictionary affects the following kinds of columns in system views:
• Object Name
• Text Strings
• Other Character Data
Object Names
To make the data dictionary field definitions consistent across all Teradata platforms, the following attributes apply to each object name:
• All object name columns are VARCHAR(128) CHARACTER SET UNICODE.
• The system limit for the length of object names remains 30 bytes. Other restrictions on object names, such as the characters allowed, apply.
• The default format for the object names is defined as X (128).
Text Strings
In the data dictionary, some character columns contain object names and other single-byte or multibyte characters. These columns are Unicode.
Other Character Data
The server character set of non-object name character fields in the data dictionary is Latin. These fields can only contain single-byte characters from U+0020 to U+007F.
Compatibility System Views
The compatibility system views return the same result sets as they did in releases prior to Teradata Database 12.0.
The compatibility system views export character data with the same properties. Object name columns that are defined as VARCHAR (128) CHARACTER SET UNICODE in the underlying system table need a conversion to be displayed as CHAR (30) CHARACTER SET LATIN/KANJI1 for backwards compatibility. A SQL translate function (UNICODE_TO_LOCALE) and a cast function are used to convert the modified Unicode
Teradata Database 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 and Recovery Control
Archive and recovery activities.
This type of user … Needs to know this information …
Chapter 2: System ViewsCharacter Data in the Data Dictionary
Data Dictionary 55
fields to Kanji1/Latin based on the session character set and the current language support mode (Japanese/Standard).
The size, type, and format of the object name columns are the same except for the following:
• The data type is VARCHAR for the following columns:
• DBQLogTbl.ErrorText
• TDWMExceptionLog.ErrorText
• TVFields.FieldFormat
• The size of the following fields is as follows:
• TVM.CreateText: 13000 characters
• TVFields.FieldTitle: 256 characters
• SW_Event_Log.Text: 1024 characters
• SessionTbl.ExternalRoles: 1934 characters
• DBQLogTbl.ErrorText: 1024 characters
• TDWMExceptionLog.ErrorText: 1024 characters
• The size of TVFields.FieldFormat is 128 characters.
• The display format for the following columns is as follows:
• SessionTbl.ExternalRoles: X(255)
• TVFields.FieldFormat: X(128)
• TVFields.FieldTitle: X(256)
Unicode System Views
Unicode system views access the dictionary table information without any conversion. Unlike the compatibility system views, in the Unicode system views, object name fields are selected as Unicode strings without translation to Kanji1/Latin.
A Unicode view exists for each compatibility view in database DBC. This means that there is a Unicode system view corresponding to each compatibility system view that does not access object name columns from the dictionary tables. These views have the same definition for both the compatibility and Unicode system views and produce the same results.
All Unicode system views end with a suffix V or VX.
ExampleREPLACE VIEW DBC.CSPSESSIONINFOVAS SELECT SESSIONNO, HOSTNO, SESSIONVPROC (NAMED STARTMBOX), LOGONSOURCEFROM DBC.SESSIONTBL;
Chapter 2: System ViewsX Version Views
56 Data Dictionary
Updatable Views
Based on the language support mode, a compatibility system view casts the object name to 30 fixed characters in the Latin or Kanji1 server character set. System tables cannot be updated via the compatibility system views are now supported using the Unicode system views; users have to change their processes previously referenced as compatibility system views to now reference to corresponding Unicode views.
Privileges for the compatibility system views have been changed to read only and Insert/Update/Delete/ Select privileges are granted under the following Unicode system views:
• CollationsV
• CharTranslationsV
• HostsInfoV
DROP VIEW privilege is granted to DBC for the following Unicode system views:
• SessionInfoV
• ChildrenV
• Database_Default_JournalsVX
X Version Views
In system views that include an X version, the additional tables that are referenced by the X version of the same system view are preceded by an X as the example on this page shows.
A specific user type preceded by an X indicates that the user type would usually be given only the X version of the system view.
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.
View Name and Description Referenced Tables User Type Columns Selected
DBC.AccountInfo[X]
Provides information about valid accounts.
AccountsDbase[X]AccessRights [X]Userdb[X]Owners
Supervisory
Teradata Databaseadministrator
[X]End user
UserNameUserOrProfileAccountName
Chapter 2: System ViewsSystem Views Reference
Data Dictionary 57
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.
The referenced columns in the table do not mean necessarily that the view definition references the column (though sometimes it does), but rather that the value in the column selected should correspond to a value in the column referenced in the table. It would be meaningful to join the view and the referenced table based on the selected column and the referenced column.
The "Columns Selected" in the table refers to the column names defined in the view definition.
The DBC.UserDB and DBC.OwnerDB system views are not 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 DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
DBC.AccessLog[V]
Displays, by row, the results of a privilege check performed in response to a request.
AccLogTbl Teradata Databasesecurity administrator
LogDate
LogTime
LogonDate
LogonTime
LogicalHostId
IFPNo
SessionNo
UserName
AccountName
OwnerName
AccessType
Frequency
EventCount
AccLogResult
DatabaseName
TVMName
ColumnName
StatementType
StatementText
QueryBand
None
None
None
None
None
None
None
AccLogTbl.UserName
AccLogTbl.AccountName
AccLogTbl.OwnerName
None
None
None
None
AccLogTbl.DatabaseName
AccLogTbl.TVMName
AccLogTbl.ColumnName
None
None
None
Chapter 2: System ViewsSystem Views Reference
58 Data Dictionary
DBC.AccLogRules[V]
Provides information about logging rules that are currently in effect on the system.
AccLogRuleTbl
Dbase
TVM
Teradata Databasesecurity administrator
UserName
DatabaseName
TVMName
AcrAlterFunction
AcrCheckpoint
AcrCreateDatabase
AcrCreateFunction
AcrCreateMacro
AcrCreateTable
AcrCreateUser
AcrCreateView
AcrCreateProcedure
AcrCreExtProcedure
AcrDelete
AcrDropDatabase
AcrDropFunction
AcrDropMacro
AcrDropTable
AcrDropUser
AcrDropView
AcrDropProcedure
AcrDump
AcrExecute
AcrExecuteFunction
AcrExecuteProcedure
AcrGrant
AcrIndex
AcrInsert
AcrReference
AcrRestore
AcrSelect
AcrUpdate
AcrCreateTrigger
AcrDropTrigger
Dbase.DatabaseName
Dbase.DatabaseName
TVM.TVMName
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
Data Dictionary 59
DBC.AccLogRules[V](Continued)
AccLogRuleTbl
Dbase
TVM
Teradata Databasesecurity administrator
AcrCreateRole
AcrDropRole
AcrCreateProfile
AcrDropProfile
AcrAlterProcedure
AcrRepControl
AcrAlterExtProcedure
AcrUDTUsage
AcrUDTType
AcrUDTMethod
AcrCreAuthorization
AcrDropAuthorization
CreatorName
CreateTimeStamp
None
None
None
None
None
None
None
None
None
None
None
None
Dbase.DatabaseName
None
DBC.AccountInfo[V][X]
Provides information about valid accounts.
Accounts
Dbase
Profiles
[X]AccessRights
[X]Userdb
[X]Owners
Supervisory
Teradata Database administrator
[X]End user
UserName
AccountName
UserOrProfile
Dbase.DatabaseName
Accounts.AccountName
None
DBC.AllRights[V][X]
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, macros, user-defined types, user-defined methods, and user-defined functions.
The AllRights view also returns PUBLIC rights.
AccessRights
Dbase
TVM
TVFields
[X]Roles
[X]RoleGrants
Teradata Databaseadministrator
UserName
DatabaseName
TableName
ColumnName
AccessRight
GrantAuthority
GrantorName
AllnessFlag
CreatorName
CreateTimeStamp
Dbase.DatabaseName
Dbase.DatabaseName
TVM.TVMName
TVFields.FieldName
None
None
Dbase.DatabaseName
None
Dbase.DatabaseName
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
60 Data Dictionary
DBC.AllRoleRights[V]
Lists all rights granted to each role.
Dbase
TVM
TVFields
Roles
AccessRights
Teradata Databasesecurityadministrator
Teradata Databaseadministrator
Supervisory
RoleName
DatabaseName
TableName
ColumnName
AccessRight
GrantorName
CreateTimeStamp
Roles.RoleName
Dbase.DatabaseName
TVM.TVMName
TVFields.FieldName
None
Dbase. DatabaseName
None
DBC.AllSpace[V][X]
Gives both database and table space utilization.
DatabaseSpace
Dbase
TVM
[X]Roles
[X]RoleGrants
[X]AccessRights
[X]Owners
Teradata Databaseadministrator
[X]End user
Supervisory
Vproc
DatabaseName
AccountName
TableName
MaxPerm
MaxSpool
MaxTemp
CurrentPerm
CurrentSpool
CurrentTemp
PeakPerm
PeakSpool
PeakTemp
MaxProfileSpool
MaxProfileTemp
None
Dbase.DatabaseName
Accounts.AccountName
TVM.TVMName
None
None
None
None
None
None
None
None
None
None
None
DBC.AllTempTables[V][X]
Provides information about the local temporary tables materialized from the base global temporary tables.
TempTables
Dbase
TVM
SessionTbl
Teradata Databaseadministrator
[X]End user
HostNo
SessionNo
UserName
B_DatabaseName
B_TableName
E_TableId
SessionTbl.HostNo
SessionTbl.SessionNo
SessionTbl.DatabaseName
Dbase.DatabaseName
TVM.TVMNameI
TVM.TVMId
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
Data Dictionary 61
DBC.All_RI_Children[V][X]
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.
ReferencingTbls
Dbase
TVM
TVFields
[X]Roles
[X]RoleGrants
All users IndexID
IndexName
ChildDB
ChildTable
ChildKeyColumn
ParentDB
ParentTable
ParentKeyColumn
InconsistencyFlag
CreatorName
CreateTimeStamp
None
ReferencingTbls.ReferenceIdxName
Dbase.DatabaseName
TVM.TVMName
TVFields.FieldName
Dbase.DatabaseName
TVM.TVMName
TVFields.FieldName
None
Dbase.DatabaseName
None
DBC.All_RI_Parents[V][X]
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.
ReferencedTbls
Dbase
TVM
TVFields
[X]Roles
[X]RoleGrants
All users IndexID
IndexName
ParentDB
ParentTable
ParentKeyColumn
ChildDB
ChildTable
ChildKeyColumn
InconsistencyFlag
CreatorName
CreateTimeStamp
None
ReferencedTbls.ReferenceIdxName
Dbase.DatabaseName
TVM.TVMName
TVFields.FieldName
Dbase.DatabaseName
TVM.TVMName
TVFields.FieldName
None
Dbase.DatabaseName
None
DBC.AMPUsage[V][X]
Gives CPU and I/O accounting information saved by the DBC.
Acctg Teradata Databaseadministrator
AccountName
UserName
CPUTime
DiskIO
CPUTimeNorm
Vproc
VprocType
Model
Acctg.AccountName
Acctg.DatabaseName
None
None
None
None
None
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
62 Data Dictionary
DBC.ArchiveLoggingObjsV[X]
Provides information about tables that have online archive active logs and their online archive logging levels.
Dbase
TVM
ArchiveLoggingObjsTbl
All users DatabaseName
TVMName
LogLevel
CreatorName
CreateTimeStamp
Dbase.DatabaseName
TVM.TVMName
None
None
None
DBC.Association[V][X]
Retrieves information about tables that have been ported using the Dump/Restore facility.
DBCAssociation
Dbase
TVM
[X]Roles
[X]RoleGrants
Operations and Recovery Control
DatabaseName
TableName
EventNum
Original_DatabaseName
Original_TableName
Original_TableKind
Original_Version
Original_ProtectionType
Original_JournalFlag
Original_CreatorName
Original_CommentString
Dbase.DatabaseName
TVM.TVMName
None
DBCAssociation.Original_DatabaseName
DBCAssociation.Original_TVMName
None
None
None
None
DBCAssociation.Original_CreatorName
None
DBC.Authorizations[V][X]
Provides information about an authorization.
Dbase
TVM
AccessRights
Owners
Teradata Database Administrator
DatabaseName
AuthorizationName
AuthorizationId
TableKind
Version
AuthorizationType
AuthorizationSubType
OSDomainName
OSUserName
DBC.DatabaseName
TVM.TVMName
TVM.TVMId
None
None
None
None
None
None
DBC.CharSets[V]
Returns the names assigned to user-defined character sets currently installed on the database.
Translation End user CharSetName Translation.TranslateName
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
Data Dictionary 63
DBC.CharTranslations[V]
Shows hexadecimal codes inserted by the Teradata Database system administrator to form translation tables that enable the Teradata Database to store and manipulate non-English character sets.
Translation End user CharSetName
CharSetId
InstallFlag
E2I
E2IUp
I2E
I2EUp
Translation.TranslateName
None
None
None
None
None
None
DBC.Children[V][X]
Provides the names of all the databases and users with the names of their parent.
Owners
Dbase
[X]AccessRights
[X]Userdb
Supervisory Child
Parent
Dbase.DatabaseName
Dbase.DatabaseName
DBC.Collations[V]
Provides definitions for standard Swedish and Norwegian collations as well as custom collation sequence definitions.
CollationTbl End user CollName
CollInstall
CollEqvClass
CollOrderCS
CollOrderUC
CollationTbl.CollName
None
None
None
None
DBC.Columns[V][X]
Provides information about the columns of tables or views, the parameters of stored procedures, the attributes of user-defined types, the parameters of user-defined methods, macros, and user defined functions that the user can access.
TVFields
Dbase
TVM
[X]Roles
[X]RoleGrants
[X]AccessRights
[X]Owners
[X]End user
Teradata Database administrator
DatabaseName
TableName
ColumnName
ColumnFormat
ColumnTitle
SPParameterType
ColumnType
ColumnUDTName
ColumnLength
DefaultValue
Nullable
CommentString
DecimalTotalDigits
DecimalFractionalDigits
Dbase.DatabaseName
TVM.TVMName
TVFields.FieldName
TVFields.FieldName
None
None
None
TVFields.UDTName
None
None
None
None
None
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
64 Data Dictionary
DBC.Columns[V][X](Continued)
TVFields
Dbase
TVM
[X]Roles
[X]RoleGrants
[X]AccessRights
[X]Owners
[X]End user
Teradata Database administrator
ColumnId
UpperCaseFlag
Compressible
CompressValue
ColumnConstraint
ConstraintCount
CreatorName
CreateTimeStamp
LastAlterName
LastAlterTimeStamp
CharType
IdColType
AccessCount
LastAccessTimeStamp
CompressValueList
Accessrights.FieldId
ReferencingTbls.ForeignKeyFID
ReferencedTbls.ParentKeyFID
Indexes.FieldId
None
None
None
TVFelds.ColumnCheck
None
Dbase.DatabaseName
None
Dbase.DatabaseName
None
None
None
None
None
None
DBC.ColumnStats[V]
Displays statistics for the columns in a table for which statistics have been collected.
TVFields
Dbase
TVM
All users DatabaseName
TableName
ColumnName
ColumnType
ColumnLength
ColumnFormat
DecimalTotalDigits
DecimalFractionalDigits
FieldStatistics
SeqNumber
Dbase.DatabaseNameI
TVM.TVMNameI
TVFields.FieldName
None
None
TVFields.FieldFormat
None
None
None
None
DBC.CostProfiles_v
Provides the cost profile instances available for use by the Optimizer.
CostProfileTypes
CostProfiles
All users ProfileTypeName
ProfileName
ProfileId
ProfileCat
ProfileDesc
None
None
None
None
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
Data Dictionary 65
DBC.CostProfileTypes_v
Provides the name and description for each cost profile type.
CostProfileTypes All users ProfileTypeName
ProfileTypeDesc
None
None
DBC.CostProfileValues_v
Provides values for constants in a cost profile instance.
CostProfiles
ConstantDefs
ConstantValues
All users ProfileName
ProfileId
ConstName
ConstId
ConstCat
ConstVal
ConstDesc
None
None
None
None
None
None
None
DBC.CSPSessionInfo[V](Reserved for internal use.)
Returns information on crashdumps.
SessionTbl Operations and Recovery Control
SessionNo
HostNo
StartMBox
LogonSource
None
None
None
None
DBC.Databases[V][X]
Provides information about the databases that the user can access.
Dbase
[X]Roles
[X]RoleGrants
[X]AccessRights
[X]Userdb
[X]Owners
[X]End user
Teradata Databaseadministrator
DatabaseName
CreatorName
OwnerName
AccountName
ProtectionType
JournalFlag
PermSpace
SpoolSpace
TempSpace
CommentString
CreateTimeStamp
LastAlterName
LastAlterTimeStamp
DBKind
AccessCount
LastAccessTimeStamp
DBase.DatabaseName
DBase.CreatorName
DBase.OwnerName
DBase.AccountName
None
None
None
None
None
None
None
Dbase.DatabaseName
None
None
None
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
66 Data Dictionary
DBC.Databases2[V][X]
Provides ID definition information about databases.
Dbase
[X]Roles
[X]RoleGrants
All users DatabaseName
DatabaseId
UnResolvedRICount
Dbase.DatabaseName
Accounts.UserId
Databasespace.DatabaseId
Accessrights.UserId
Owners.OwnerId
TVM.DatabaseId
ReferencingTbls.Referencing.DbId
DBCAssociation.DatabaseId
Owners.OwneeId
ReferencedTbls.ReferencedDbId
TableConstraints.DbaseId
Triggertbl.DatabaseId
None
DBC.Database_Default_Journals[V][X]
Provides the name for each database that has a default journal table.
Dbase
TVM
[X]Roles
[X]RoleGrants
[X]AccessRights
[X]Owners
[X]End user
Teradata Databaseadministrator
DatabaseName
Journal_DB
JournalName
Dbase.DatabaseName
DBase.DatabaseName
TVM.TVMName
DBC.DBCInfo[V]
Provides information on the current version and release of the DBC. It is updated during each system restart.
DBCInfoTbl All users InfoKey
InfoData
None
DBCInfoTbl.InfoData
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
Data Dictionary 67
DBC.DBQLRules[V]
Displays the DBQL rules in effect for users.
Dbase
DBQRuleTbl
Teradata Databaseadministrator
Supervisory
Username
AccountString
ExplainFlag
ObjFlag
SqlFlag
StepFlag
SummaryFlag
ThresholdFlag
TextSizeLimit
SummaryVal1
SummaryVal2
SummaryVal3
ThreshValue
Dbase.DatabaseName
DBQLRuleTbl.AccountString
None
None
None
None
None
None
None
None
None
None
None
DBC.DeleteAccessLog[V]
Provides a means of controlling deletion of DBC.AccLogTbl. Only rows older than 30 days from the current date can be deleted.
AccLogTbl Teradata Databasesecurity administrator
LogDate
LogTime
None
None
DBC.DeleteOldInDoubt[V]
Displays those rows in the DBC.InDoubtResLog table that are more than 30 days old.
InDoubtResLog Teradata Databaseadministrator
LogicalHostId
SessionNumber
CoordTaskId
RunUnitId
LogonUserName
ResolvingUserLogonName
CommitOrRollback
UserLogonDate
UserLogonTime
CompletionDate
CompletionTime
Options
None
None
Dbase.DatabaseName
None
None
None
None
None
Dbase.DatabaseName
None
None
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
68 Data Dictionary
DBC.DiskSpace[V][X]
Provides AMP-by-AMP information about disk space usage, including spool, for each database or account.
DatabaseSpace
Dbase
[X]Roles
[X]RoleGrants
[X]AccessRights
[X]Userdb
[X]Owners
Teradata Databaseadministrator
[X]End user
Supervisory
Vproc
DatabaseName
AccountName
MaxPerm
MaxSpool
MaxTemp
CurrentPerm
CurrentSpool
CurrentTemp
PeakPerm
PeakSpool
PeakTemp
MaxProfileSpool
MaxProfileTemp
None
Dbase.DatabaseName
DBase.AccountName
None
None
None
None
None
None
None
None
None
None
None
DBC.ErrorTblsV[X]
Provides information on relationships between data and error tables accessible to the current user.
TVM
Dbase
ErrorTbls
Teradata Databaseadministrator
[X]End user
Supervisory
ErrTblDbName
ErrTblName
BaseTblDbName
BaseTblName
CreatorName
CreateTimeStamp
None
None
None
None
None
None
DBC.Events[V][X]
Provides a row for each execution of a Host Utility function or of a DBC/SQL checkpoint statement.
RCEvent
[X]Roles
[X]RoleGrants
[X]Dbase
[X]AccessRights
[X]Userdb
[X]Owners
Operations and Recovery Control
CreateDate
CreateTime
EventNum
EventType
UserName
DatabaseName
ObjectType
AllAmpsFlag
RestartSeqNum
OperationInProcess
TableName
CheckpointName
None
None
RCConfiguration.EventNum
RCMedia.EventNumber
None
RCEvent.UserName
RCEvent.DatabaseName
None
None
RCConfiguration.RestartSeqNum
None
RCEvent.TableName
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
Data Dictionary 69
DBC.Events[V][X}(Continued)
RCEvent
[X]Roles
[X]RoleGrants
[X]Dbase
[X]AccessRights
[X]Userdb
[X]Owners
Operations and Recovery Control
LinkingEventNum
DataSetName
LockMode
JournalUsed
JournalSaved
IndexPresent
DupeDumpSet
None
None
None
None
None
None
RCMedia.DupeDumpSet
DBC.Events_Con-figuration[V][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.
RCEvent
RCConfiguration
[X]Roles
[X]RoleGrants
[X]Dbase
[X]AccessRights
[X]Userdb
[X]Owners
Operations and Recovery Control
CreateDate
CreateTime
EventNum
EventType
UserName
LogProcessor
PhyProcessor
Vproc
ProcessorState
RestartSeqNum
None
None
RCConfiguration.
EventNum
RCMedia.EventNumber
None
RCEvent.UserName
None
None
None
None
None
DBC.Events_Media[V][X]
Provides a row for each execution of a Host Utility dump or restore function, which created or used removable media.
RCEvent
RCMedia
[X]Roles
[X]RoleGrants
[X]Dbase
[X]AccessRights
[X]Userdb
[X]Owners
Operations and Recovery Control
CreateDate
CreateTime
EventNum
EventType
UserName
DataSetName
VolSerialId
VolSequenceNum
DupeDumpSet
None
None
RCConfiguration.EventNum
RCMedia.EventNumber
None
RCEvent.UserName
None
None
None
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
70 Data Dictionary
DBC.ExternalSPs[V][X]
Extracts the External Stored Procedures (XSPs) from DBC.UDFInfo table.
UDFInfo
DBase
TVM
Teradata Database administrator
DatabaseName
ExternalProcedureName
ExternalProcedureId
NumParameters
ExternalName
SrcFileLanguage
NoSQLDataAccess
ParameterStyle
ExecProtectionMode
ExtFileReference
CharacterType
Platform
RoutineKind
ParameterUDTIds
AuthIdUsed
AppCategory
Dbase.DatabaseName
UDFInfo.FunctionName
TVM.TVMId
None
None
None
None
None
None
None
None
None
None
None
TVM.AuthIdUsed
None
DBC.Functions[V][X]
Contains all the function information.
UDFInfo
DBase
TVM
Teradata Databaseadministrator
DatabaseName
FunctionName
SpecificName
FunctionId
NumParameters
ParameterDataTypes
FunctionType
ExternalName
SrcFileLanguage
NoSQLDataAccess
ParameterStyle
DeterministicOpt
NullCall
PrepareCount
ExecProtectionMode
Dbase.DatabaseName
None
TVM.TVMName
TVM.TVMId
None
None
None
UDFInfo.FunctionName
None
None
None
None
None
None
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
Data Dictionary 71
DBC.Functions[V][X](Continued)
UDFInfo
DBase
TVM
Teradata Databaseadministrator
ExtFileReference
CharacterType
Platform
InterimFldSize
RoutineKind
ParameterUDTIds
AuthIdUsed
MaxOutParameters
None
None
None
None
None
None
TVM.AuthIdUsed
None
DBC.HostsInfo[V]
Provides information about any user-defined character sets assigned by the Teradata Database system administrator as the default for the client systems in the Teradata Database configuration.
Hosts End user
Teradata Databaseadministrator
LogicalHostId
HostName
DefaultCharSet
None
None
Hosts.DefaultCharSet
DBC.IndexConstraints[V][X]
Provides information for index constraints (implied by the partitioning expressions for an index).
TableConstraints
[X]Roles
[X]RoleGrants
End user
Teradata Databaseadministrator
DatabaseName
TableName
IndexName
IndexNumber
ConstraintType
ConstraintText
ConstraintCollation
CollationName
CreatorName
CreateTimeStamp
Dbase.DatabaseName
TVM.TVMName
TableConstraints.Name
Indexes.IndexNumber
None
None
None
None
None
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
72 Data Dictionary
DBC.IndexStats[V]
Displays statistics on the indexes defined on a table for which statistics have been collected.
Dbase
Indexes
TVM
End user
Teradata Databaseadministrator
DatabaseName
TableName
IndexNumber
IndexName
IndexType
UniqueFlag
ColumnPosition
ColumnName
ColumnType
ColumnLength
ColumnFormat
DecimalTotalDigits
DecimalFractionalDigits
IndexStatistics
Dbase.DatabaseNameI
TVM.TVMNameI
None
Indexes.Name
None
None
None
TVFields.FieldName
None
None
TVFields.FieldFormat
None
None
None
DBC.Indices[V][X]
Describes each of the indexes on each table.
Indexes
Dbase
TVM
TVFields
[X]Roles
[X]RoleGrants
[X]AccessRights
[X]Owners
[X]End user
Teradata Databaseadministrator
DatabaseName
TableName
IndexNumber
IndexType
UniqueFlag
IndexName
ColumnName
ColumnPosition
CreatorName
CreateTimeStamp
LastAlterName
LastAlterTimeStamp
AccessCount
LastAccessTimeStamp
Dbase.DatabaseName
TVM.TVMName
None
None
None
Indexes.Name
TVFields.FieldName
None
Dbase.DatabaseName
None
Dbase.DatabaseName
None
None
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
Data Dictionary 73
DBC.InDoubtLog[V]
Displays the contents of the DBC.InDoubtResLog table.
InDoubtResLog Teradata Databaseadministrator
LogicalHostId
SessionNumber
CoordTaskId
RunUnitId
LogonUserName
ResolvingUserLogonName
CommitOrRollBack
UserLogonDate
UserLogonTime
CompletionDate
CompletionTime
Options
None
None
None
None
Dbase.DatabaseName
Dbase.DatabaseName
None
None
None
None
None
None
DBC.Journals[V][X]
Provides specific information about journal-to-table mappings for each data table that uses journal protection.
Dbase
TVM
[X]Roles
[X]RoleGrants
[X]AccessRights
[X]Owners
[X]End user
Teradata Databaseadministrator
Tables_DB
TableName
Journals_DB
JournalName
Dbase.DatabaseName
TVM.TVMName
Dbase.DatabaseName
TVM.TVMName
DBC.LogOnOff[V][X]
Gives the DBA access to the session event table that records logon, logoffs, and attempted logons.
EventLog Teradata Databasesecurity administrator
Teradata Databaseadministrator
Supervisory
LogDate
LogTime
UserName
AccountName
Event
LogicalHostId
IFPNo
SessionNo
LogonDate
LogonTime
LogonSource
None
None
EventLog.UserName
EventLog.AccountName
None
None
None
None
None
None
None
DBC.LogonRules[V]
Retrieves information about logon rules generated as a result of successfully processed GRANT/REVOKE LOGON statements.
LogonRuleTbl
Dbase
Teradata Databasesecurity administrator
UserName
LogicalHostID
LogonStatus
NullPassword
CreatorName
CreateTimeStamp
Dbase.DatabaseName
None
None
None
Dbase.DatabaseName
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
74 Data Dictionary
DBC.MultiColumnStats[V]
Provides information about statistics collected on a set of non-indexed columns.
Indexes
TVM
Dbase
TVFields
End user
Teradata Database administrator
DatabaseName
TableName
StatisticsId
ColumnPosition
ColumnName
ColumnType
ColumnLength
ColumnFormat
DecimalTotalDigits
DecimalFractionalDigits
ColumnsStatistics
Dbase.DatabaseNameI
TVM.TVMNameI
None
None
TVFields.FieldName
None
None
TVFields.FieldFormat
None
None
None
DBC.ProfileInfo[V][X]
Lists all profiles and their parameter settings.
[X]Profiles
[X]Dbase
Teradata Databaseadministrator
[X]End user
Supervisory
Teradata Databasesecurity administrator
ProfileName
DefaultAccount
DefaultDB
SpoolSpace
TempSpace
ExpirePassword
PasswordMinChar
PasswordMaxChar
PasswordDigits
PasswordSpecChar
PasswordRestrictWords
MaxLogonAttempts
LockedUserExpire
PasswordReuse
CommentString
CreatorName
CreateTimeStamp
LastAlterName
LastAlterTimeStamp
Profiles.ProfileName
Profiles.DefaultAccount
Profiles.DefaultDatabase
None
None
None
None
None
None
None
None
None
None
None
None
Dbase.DatabaseName
None
Dbase.DatabaseName
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
Data Dictionary 75
DBC.QryLog[V]
Specifies the main view for DBQL.
DBQLogTbl Teradata Databaseadministrator
ProcID
CollectTimeStamp
QueryID
UserID
UserName
DefaultDatabase
AcctString
ExpandAcctString
SessionID
LogicalHostID
RequestNum
InternalRequestNum
LogonDateTime
AcctStringTime
AcctStringHour
AcctStringDate
LogonSource
AppID
ClientID
ClientAddr
QueryBand
ProfileID
StartTime
FirstStepTime
FirstRespTime
ElapsedTime
NumSteps
NumStepswPar
MaxStepsInPar
NumResultRows
TotalIOCount
AMPCPUTime
ParserCPUTime
UtilityRowCount
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
76 Data Dictionary
DBC.QryLog[V](Continued)
DBQLogTbl Teradata Databaseadministrator
ErrorCode
ErrorText
WarningOnly
AbortFlag
CacheFlag
StatementType
QueryText
NumOfActiveAMPs
MaxAmpCPUTime
MaxCPUAmpNumber
MinAmpCPUTime
MaxAmpIO
MaxIOAmpNumber
MinAmpIO
SpoolUsage
LSN
EstResultRows
EstProcTime
EstMaxRowCount
AMPCPUTimeNorm
ParserCPUTimeNorm
MaxAmpCPUTimeNorm
MaxCPUAmpNumberNorm
MinAmpCPUTimeNorm
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
Data Dictionary 77
DBC.QryLogEventHis[V]
Provides a means by which an end user can discover the sequence of states and events that occurred at any point in time.
TDWMEventhistory
Teradata Databaseadministrator
ProcID
CollectTimeStamp
EntryTS
EntryKind
EntryID
EntryName
EventValue
Activity
ActivityId
ActivityName
ConfigId
Spare1
Spare2
None
None
None
None
None
None
None
None
None
None
None
None
None
DBC.QryLogEvents[V]
Contains Teradata Database events that affect TDWM.
TDWMEventLog
Teradata Databaseadministrator
ProcID
CollectTimeStamp
SessionID
LogicalHostID
WDID
OpenvID
SysConID
EventTime
EventCode
EventSubCode
EventInfo
None
None
None
None
None
None
None
None
None
None
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
78 Data Dictionary
DBC.QryLogExceptions[V]
Contains information about logons or queries rejected by TDWM and actions taken by Workload Definition exception handling.
TDWMExceptionLog
Teradata Databaseadministrator
ProcID
CollectTimeStamp
QueryID
UserName
SessionID
RequestNum
LogicalHostID
AcctString
WDID
OpEnvID
SysConID
ClassificationTime
ExceptionTime
ExceptionValue
ExceptionAction
NewWDID
ExceptionCode
ExceptionSubCode
ErrorText
ExtraInfo
RuleID
WarningOnly
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
DBC.QryLogExplain[V]
Contains the "Explain" of the query. Since the "Explain" can be larger than 64KB, it may use multiple rows to hold the data.
DBQLExplainTbl
Teradata Databaseadministrator
ProcID
CollectTimestamp
Query ID
ExpRowNo
ExplainText
None
None
None
None
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
Data Dictionary 79
DBC.QryLogObjects[V]
Populated if object information is requested for the query in addition to the default information row.
A row for each object (database, table, column, or index) is used. If the object is a secondary index, its number and use are logged.
DBQLObjTbl Teradata Databaseadministrator
ProcID
CollectTimeStamp
QueryID
ObjectDatabaseName
ObjectTableName
ObjectColumnName
ObjectID
ObjectNum
ObjectType
FreqofUse
TypeofUse
None
None
None
None
None
None
None
None
None
None
None
DBC.QryLogSQL[V]
Populated if the SQL is requested for the query in addition to the default information row. If the additional SQL text is greater than 64KB, multiple rows are generated.
DBQLSQLTbl Teradata Databaseadministrator
ProcID
CollectTimeStamp
QueryID
SqlRowNo
SqlTextInfo
None
None
None
None
None
DBC.QryLogSteps[V]
Populated by step-level information. If the step- information of the query is requested, a step table is populated with a row for each step.
DBQLStepTbl Teradata Databaseadministrator
ProcID
CollectTimestamp
QueryID
StepLev1Num
StepLev2Num
StepName
StepStartTime
StepStopTime
ElapsedTime
EstProcTime
EstCPUCost
CPUTime
IOcount
EstRowCount
RowCount
RowCount2
RowCount3
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
80 Data Dictionary
DBC.QryLogSteps[V](Continued)
DBQLStepTbl Teradata Databaseadministrator
NumOfActiveAMPs
MaxAmpCPUTime
MaxCPUAmpNumber
MinAmpCPUTime
MaxAmpIO
MaxIOAmpNumber
MinAmpIO
SpoolUsage
MaxAMPSpool
MaxSpoolAmpNumber
MinAMPSpool
StepWD
LSN
UtilityTableID
RowsWComprColumns
EstIOCost
EstNetCost
EstHRCost
CPUTimeNorm
MaxAmpCPUTimeNorm
MaxCPUAmpNumberNorm
MinAmpCPUTimeNorm
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
Data Dictionary 81
DBC.QryLogSummary[V]
Populated only if summary information is requested or a threshold value is used.
For the summary case, a row exists for each collection if the count of queries run in the 10-minute interval (LowHist to HighHist) is greater than 0.
For threshold, one row (with LowHist= ThreshValue and HighHist=0) exists for the collection if there were queries shorter than LowHist seconds.
DBQLSummaryTbl
Teradata Database administrator
ProcID
CollectTimeStamp
UserID
AcctString
LogicalHostID
AppID
ClientID
ClientAddr
ProfileID
SessionID
QueryCount
ValueType
QuerySeconds
AverageTime
TotalIOCount
AverageIO
AMPCPUTime
AverageAmpCPU
ParserCPUTime
AverageParserCPU
AMPCPUTimeNorm
AverageAmpCPUNorm
ParserCPUTimeNorm
AverageParserCPUNorm
LowHist
HighHist
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
82 Data Dictionary
DBC.QryLogTDWM[V]
Contains query data of interest to TDWM.
DBQLogTbl Teradata Databaseadministrator
ProcID
CollectTimeStamp
QueryID
UserID
UserName
DefaultDatabase
AcctString
LastStateChange
DelayTime
WDID
OpEnvID
SysConID
LSN
NoClassification
WDOverride
SLGMet
ExceptionValue
FinalWDID
TDWMEstMaxRows
TDWMEstLastRows
TDWMEstTotalTime
TDWMAllAmpFlag
TDWMConfLevelUsed
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
Data Dictionary 83
DBC.QryLogTDWMSum[V]
Contains a summary of the activity of each workload definition over a user defined interval.
TDWMSummaryLog
Teradata Database administrator
ProcID
CollectTimeStamp
WDID
OpEnvID
SysConID
StartColTime
Arrivals
ActiveCount
Completions
MinRespTime
MaxRespTime
AvgRespTime
MinCPUTime
MaxCPUTime
AvgCPUTime
DelayedCount
AvgDelayTime
ExceptionCount
AbortCount
ErrorCount
OtherCount
MetSLGCount
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
DBC.RCC_Con-figuration[V][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.
RCConfiguration
[X]Roles
[X]RoleGrants
[X]Dbase
[X]AccessRights
[X]Userdb
[X]Owners
Operations and Recovery Control
EventNum
LogProcessor
PhyProcessor
Vproc
ProcessorState
RestartSeqNum
RCEvent.EventNum
None
None
None
None
None
DBC.RCC_Media[V][X]
Provides a row for each execution of a Host Utility dump or restore function that created or used removable media.
RCMedia
[X]Roles
[X]RoleGrants
[X]Dbase
[X]AccessRights
[X]Userdb
[X]Owners
Operations and Recovery Control
EventNum
VolSerialId
VolSequenceNum
DupeDumpSet
RCMediaEventNumber
None
None
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
84 Data Dictionary
DBC.RepTables[V][X]
Returns all the replication groups defined in the system and all their member tables.
RepGroup
TVM
[X]Roles
[X]RoleGrants
All users GroupName
TableName
RepGroup.GroupName
TVM.TVMName
DBC.RestrictedWords[V]
Returns a list of words that can be restricted from being part of a password string.
For a complete list of restricted words, see Security Administration.
PasswordRestrictions
All users RestrictedWord None
DBC.RI_Child_Tables[V][X]
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.
ReferencingTbls
Dbase
[X]Roles
[X]RoleGrants
All users IndexID
IndexName
ChildDbID
ChildTID
ChildKeyFID
ParentDbID
ParentTID
ParentKeyFID
InconsistencyFla
CreatorName
CreateTimeStamp
None
ReferencingTbls.ReferenceIdxName
Dbase.DatabaseId
TVM.TVMId
TVFields.TableId
TVFields.FieldId
Dbase.DatabaseId
TVM.TVMId
TVFields.TableId
TVFields.FieldId
None
Dbase.DatabaseName
None
DBC.RI_Distinct_Children[V][X]
Provides information about tables in child-parent order without the duplication that could result from multi-column foreign keys.
ReferencingTbls
Dbase
TVM
[X]Roles
[X]RoleGrants
All users IndexID
IndexName
ChildDB
ChildTable
ParentDB
ParentTable
InconsistencyFlag
CreatorName
CreateTimeStamp
None
ReferencingTbls.ReferenceIdxName
Dbase.DatabaseName
TVM.TVMName
Dbase.DatabaseName
TVM.TVMName
None
Dbase.DatabaseName
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
Data Dictionary 85
DBC.RI_Distinct_Parents[V][X]
Provides information about tables in parent-child order without the duplication that could result from multi-column foreign keys.
ReferencingTbls
Dbase
TVM
[X]Roles
[X]RoleGrants
All users IndexID
IndexName
ParentDB
ParentTable
ChildDB
ChildTable
InconsistencyFlag
CreatorName
CreateTimeStamp
None
ReferencedTbls.ReferenceIdxName
Dbase.DatabaseName
TVM.TVMName
Dbase.DatabaseName
TVM.TVMName
None
Dbase.DatabaseName
None
DBC.RI_Parent_Tables[V][X]
Provides information about all tables in parent-child order.
ReferencingTbls
Dbase
[X]Roles
[X]RoleGrants
All users IndexID
IndexName
ParentDbID
ParentTID
ParentKeyFID
ChildDbID
ChildTID
ChildKeyFID
InconsistencyFlag
CreatorName
CreateTimeStamp
None
ReferencedTbls.ReferenceIdxName
Dbase.DatabaseId
TVM.TVMId
TVFields.TableId
TVFields.FieldId
Dbase.DatabaseId
TVM.TVMId
TVFields.TableId
TVFields.FieldId
None
Dbase.DatabaseName
None
DBC.RoleInfo[V][X]
Returns the names of role creators corresponding to each role.
DBase
Roles
Teradata Databasesecurityadministrator
[X]End user
RoleName
CreatorName
CommentString
CreateTimeStamp
ExtRole
Roles.RoleName
DBase.DatabaseName
None
None
None
DBC.RoleMembers[V][X]
Lists each role and all of its members.
Note: The RoleMemberX view does not have the Grantee and GranteeKind columns.
[X]Dbase
[X]Roles
[X]RoleGrants
Teradata Databasesecurity administrator
[X]End user
RoleName
Grantee
Granteekind
Grantor
WhenGranted
DefaultRole
WithAdmin
Roles.RoleName
DBase.DatabaseName
None
DBase.DatabaseName
None
None
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
86 Data Dictionary
DBC.SecurityDefaults[V]
Describes the password features selected on the site.
SysSecDefaults Teradata Databasesecurity administrator
ExpirePassword
PasswordMinChar
PasswordMaxChar
PasswordDigits
PasswordSpecChar
PasswordRestrictWords
MaxLogonAttempts
LockedUserExpire
PasswordReuse
None
None
None
None
None
None
None
None
Nome
DBC.SecurityLog[V][X]
Provides access to the DBC.AccLogTbl. Rows are logged as directed by BEGIN/END LOGGING.
AccLogTbl
[X]Dbase
[X]Owners
[X]Userdb
Teradata Databasesecurity administrator
LogDate
LogTime
LogType
UserName
AccountName
DatabaseName
TableName
Text
None
None
None
Dbase.DatabaseName
None
Dbase.DatabaseName
TVM.TVMName
None
DBC.SessionInfo[V][X]
Gives one row for each time the user is logged on; used as a review of accounts set by user.
SessionTbl Teradata Databaseadministrator
Teradata Databasesecurity administrator
Supervisory
[X]End user
UserName
AccountName
SessionNo
DefaultDataBase
IFPNo
Partition
LogicalHostId
HostNo
CurrentCollation
LogonDate
LogonTime
LogonSequenceNo
LogonSource
ExpiredPassword
TwoPCMode
SessionTbl.UserName
SessionTbl.AccountName
Temptables.SessionNo
SessionTbl.CurrentDataBase
None
None
None
TempTables.HostNo
None
None
None
None
None
None
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
Data Dictionary 87
DBC.SessionInfo[V][X](Continued)
SessionTbl Teradata Databaseadministrator
Teradata Databasesecurity administrator
Supervisory
[X]End user
Transaction_Mode
CurrentRole
ProfileName
LogonAcct
LDAP
AuditTrailId
CurIsolationLevel
QueryBand
None
SessionTbl.CurrentRole
SessionTbl.ProfileName
SessionTbl.LogonAcct
None
SessionTbl.AuditTrailId
None
None
DBC.ShowColChecks[V][X]
Provides information about column constraints.
TVFields
Dbase
TVM
[X]Roles
[X]RoleGrants
End user
Teradata Databaseadministrator
DatabaseName
TableName
ColumnName
ColCheck
CreatorName
CreateTimeStamp
Dbase.DatabaseName
TVM.TVMNameI
TVFields.FieldName
TVFields.ColumnCheck
Dbase.DatabaseNameI
None
DBC.ShowTblChecks[V][X]
Provides information about table constraints.
TableConstraints
Dbase
TVM
[X]Roles
[X]RoleGrants
End user
Teradata Databaseadministrator
DatabaseName
TableName
CheckName
TblCheck
CreatorName
CreateTimeStamp
Dbase.DatabaseName
TVM.TVMNameI
TableConstraints.Name
TableConstraints.TableCheck
Dbase.DatabaseNameI
None
DBC.Software_Event_Log[V]
Provides information about logged software events originating in the Parallel Data Extensions (PDE) or the Teradata Database.
SW_Event_Log Operations and Recovery Control
TheDate
TheTime
Event_Tag
Category
Severity
PMA
Vproc
Partition
Task
TheFunction
SW_Version
Line
Text
None
None
None
None
None
None
None
None
None
None
None
None
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
88 Data Dictionary
DBC.Table_Level Constraints[V][X]
Provides information about table constraints.
TableConstraints
Dbase
TVM
[X]Roles
[X]RoleGrants
End user
Teradata Database administrator
DatabaseName
TableName
ConstraintName
ConstraintText
CreatorName
CreateTimeStamp
Dbase.DatabaseName
TVM.TVMName
TableConstraints.Name
None
Dbase.DatabaseName
None
DBC.Tables[V][X]
Provides information about tables, views, stored procedures, join indexes, macros, user-defined types, user-defined methods, or user defined functions.
TVM
Dbase
[X]Roles
[X]RoleGrants
[X]AccessRights
[X]Owners
[X]End user
Teradata Database administrator
DatabaseName
TableName
Version
TableKind
ProtectionType
JournalFlag
CreatorName
RequestText
CommentString
ParentCount
ChildCount
NamedTblCheckCount
UnnamedTblCheckExist
PrimaryKeyIndexId
RepStatus
CreateTimeStamp
LastAlterName
LastAlterTimeStamp
RequestTxtOverFlow
AccessCount
LastAccessTimeStamp
UtilVersion
QueueFlag
CommitOpt
TransLog
Dbase.DatabaseName
TVM.TVMName
None
None
None
None
Dbase.DatabaseNameTVM.CreatorName
None
None
TVM.ParentCount
TVM.ChildCount
None
None
None
TVM.TblStatus
TVM.CreateTimeStamp
None
None
None
None
None
None
None
None
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
Data Dictionary 89
DBC.Tables2[V][X]
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
[X]Roles
[X]RoleGrants
Teradata Databaseadministrator
Supervisory
TVMName
TVMId
DatabaseId
ParentCount
ChildCount
TVM.TVMNameI
AcclogRuleTbl.TVMId
DatabaseSpace.tableId
Accessrights.TVMId
Temptables.BaseTableId
ReferencingTbls.Refer-encingTblId
ReferencedTbls.Refer-encedTblId
DBCAssociation.TVMId
TVFields.TableId
Dbase.JournalId
Indexes.TableId
Tableconstraints.TVMId
Accessrights.DatabaseId
Owners.owneeId
Dbase.DatabaseId
None
None
DBC.TableSize[V][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.
DataBaseSpace
Dbase
TVM
[X]Roles
[X]RoleGrants
[X]AccessRights
[X]Owners
[X]End user
Teradata Databaseadministrator
Vproc
DatabaseName
AccountName
TableName
CurrentPerm
PeakPerm
None
Dbase.DatabaseName
DBase.AccountName
TVM.TVMName
None
None
DBC.TableText[V][X]
Provides complete RequestText for an object.
DBase
TVM
TextTbl
[X]Roles
[X]RoleGrants
[X]AccessRights
[X]Owners
[X]End user
Teradata Databaseadministrator
DatabaseName
TableName
TableKind
RequestText
LineNo
Dbase.DatabaseName
TVM.TVMName
None
None
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
90 Data Dictionary
DBC.Triggers[V][X]
Provides information about event-driven, specialized procedures attached to a single table and stored in the database.
TriggersTbl
Dbase
TVM
[X]Roles
[X]RoleGrants
Teradata Databaseadministrator
DatabaseName
SubjectTableDatabaseName
TableName
TriggerName
EnabledFlag
ActionTime
Event
Kind
OrderNumber
TriggerComment
RequestText
CreatorName
CreateTimeStamp
LastAlterName
LastAlterTimeStamp
AccessCount
LastAccessTimeStamp
CreateTxtOverflow
Dbase.DatabaseName
Dbase.DatabaseName
TVM.TVMName
TriggersTbl.TriggerName
None
None
None
None
None
None
None
Dbase.DatabaseName
None
Dbase.DatabaseName
None
None
None
None
DBC.UserGrantedRights[V]
Describes the explicit rights that the user has granted to other users.
AccessRights
Dbase
TVM
TVFields
Ownerdb
End user DatabaseName
TableName
ColumnName
Grantee
AccessRight
GrantAuthority
AllnessFlag
CreatorName
CreateTimeStamp
Dbase.DatabaseName
TVM.TVMName
TVFields.FieldName
Dbase.DatabaseName
None
None
None
Dbase.DatabaseName
None
DBC.UserRights[V]
Describes the explicit rights of each user for access to tables, views, join indexes, stored procedures, macros, user-defined types, user-defined methods, or user-defined functions.
AccessRights
Dbase
TVM
TVFields
Userdb
End user DatabaseName
TableName
ColumnName
AccessRight
GrantAuthority
GrantorName
CreatorName
CreateTimeStamp
Dbase.DatabaseName
TVM.TVMName
TVFields.FieldName
None
None
Dbase.DatabaseNameI
Dbase.DatabaseName
None
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
Data Dictionary 91
DBC.UserRoleRights[V]
Lists all rights granted to each role for the user.
Dbase
TVM
TVFields
Roles
AccessRights
End user RoleName
DatabaseName
TableName
ColumnName
AccessRight
GrantorName
CreateTimeStamp
Roles.RoleName
Dbase.DatabaseName
TVM.TVMName
TVFields.FieldName
None
Dbase.DatabaseName
None
DBC.Users[V]
Describes in detail all information about users that you control, including passwords.
Dbase
AccessRights
Userdb
Owners
Profiles
End user
Teradata Database administrator
Supervisory
UserName
CreatorName
PasswordLastModDate
PasswordLastModTime
OwnerName
PermSpace
SpoolSpace
TempSpace
ProtectionType
JournalFlag
StartupString
DefaultAccount
DefaultDatabase
CommentString
DefaultCollation
PasswordChgDate
LockedDate
LockedTime
LockedCount
TimeZoneHour
TimeZoneMinute
DefaultDateForm
CreateTimeStamp
LastAlterName
DbaseDatabaseName
DbaseCreatorName
None
None
Dbase.OwnerName
None
Dbase.SpoolSpace
Profiles.SpoolSpace
Dbase.TempSpace
Profiles.TempSpace
None
None
RCEvent.DatabaseName
Dbase.AccountName
Dbase.DefaultDatabase
None
None
Dbase.PasswordChgDate
None
None
None
None
None
None
None
Dbase.DatabaseName
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Reference
92 Data Dictionary
DBC.Users[V](Continued)
Dbase
AccessRights
Userdb
Owners
Profiles
End user
Teradata Database administrator
Supervisory
LastAlterTimeStamp
DefaultCharType
RoleName
ProfileName
AccessCount
LastAccessTimeStamp
None
None
DBase.RoleName
DBase.ProfileName
None
None
DBC.User_Default_Journals[V][X]
Describes the users that have default journal tables, including the name and database for each journal table.
Dbase
TVM
AccessRights
Owners
[X]Roles
[X]RoleGrants
[X]End user
Teradata Databaseadministrator
UserName
Journal_DB
JournalName
Dbase.DatabaseName
Dbase.DatabaseName
TVM.TVMName
View Name and DescriptionReferenced Tables and Views User Type Columns Selected Referenced column(s)
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 93
System Views Columns Reference
The following table describes the columns of each of the system views in the DBC in alphabetical order. In addition, each includes information on which views select that column, and the data type and format of the column.
Some column formats are “explicit”; others are not. The following explains what “explicit” means, and what it means when this term is not specified.
"Explicit" means the format string is explicitly specified during the view creation or from an explicit format of the underlying table. When "explicit" is not specified, the format is taken from the default format for the data type for the underlying table column or default format for the data type of the view column if the format for the view column does not come from a single underlying table column. That is, if “explicit” is specified, the specified format is used; if it is not specified, the format is based on the default format for a data type (which may be configured for a system to have a different default format than the one given in the following).
Using the information included in the view columns table, you can write a SELECT statement that returns the information you want.
Column Name Description
AbortCount Returns the count of queries that were classified into the WD but were subsequently aborted (no DBS error code).
Data Type Compatibility View Unicode View
INTEGERNOT NULL
INTEGERNOT NULL
Format --,---,---,--9 --,---,---,--9
Associated View QryLogTDWMSum QryLogTDWMSumV
AbortFlag Returns an indicator if this query was aborted.
Data Type Compatibility View Unicode View
CHAR(1)LATIN
CHAR(1)LATIN
Format X(1) X(1)
Associated View QryLog QryLogV
Chapter 2: System ViewsSystem Views Columns Reference
94 Data Dictionary
AccessCount Returns the access count for the corresponding database object.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View Columns[X]Databases[X]Indices[X]Tables[X]UsersTriggers[X]
ColumnsV[X]DatabasesV[X]IndicesV[X]TablesV[X]UsersVTriggersV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 95
AccessRight Returns a code that identifies a privilege granted on the object. Possible values for privilege type are as follows:
• AE = ALTER EXTERNAL PROCEDURE• AF = ALTER FUNCTION• AP = ALTER PROCEDURE• AS = ABORT SESSION• CA = CREATE AUTHORIZATION• CD = CREATE DATABASE• CE = CREATE EXTERNAL PROCEDURE• CF = CREATE FUNCTION• CG = CREATE TRIGGER• CM = CREATE MACRO• CO = CREATE PROFILE• CP = CHECKPOINT• CR = CREATE ROLE• CT = CREATE TABLE• CU = CREATE USER• CV = CREATE VIEW• D = DELETE• DA = DROP AUTHORIZATION• DD = DROP DATABASE• DF = DROP FUNCTION• DG = DROP TRIGGER• DM = DROP MACRO• DO = DROP PROFILE• DP = DUMP• DR = DROP ROLE• DT = DROP TABLE• DU = DROP USER• DV = DROP VIEW
• E = EXECUTE(MACRO)• EF = EXECUTE
FUNCTION• I = INSERT• IX = INDEX• MR = MONITOR
RESOURCE• MS = MONITOR
SESSION• PC = CREATE
PROCEDURE• PD = DROP PROCEDURE• PE = EXECUTE
PROCEDURE• R = RETRIEVE/
SELECT• RF = REFERENCE• RO = REPLICATION
OVERRIDE• RS = RESTORE• SS = SET SESSION
RATE• SR = SET RESOURCE
RATE• U = UPDATE• UU = UDT Usage• UT = UDT Type• UM = UDT Method
Data Type Compatibility View Unicode View
CHAR(2)LATINNOT NULL
CHAR(2)LATINNOT NULL
Format X(2) X(2)
Associated View AllRights[X]UserGrantedRightsUserRightsAllRoleRightsUserRoleRights
AllRightsV[X]UserGrantedRightsVUserRightsVAllRoleRightsVUserRoleRightsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
96 Data Dictionary
AccessType(for “Acr”-type columns)
Returns the type of privilege for which the check that generated this log entry was performed.
• AE = ALTER EXTERNAL PROCEDURE• AF = ALTER FUNCTION• AN = ANY PRIVILEGE *
(* Indicates a HELP or SHOW statement for which at least one privilege, but no specific privilege, is required.)
• AP = ALTER PROCEDURE• AS = ABORT SESSION• CA = CREATE AUTHORIZATION• CD = CREATE DATABASE• CE = CREATE EXTERNAL PROCEDURE• CF = CREATE FUNCTION• CG = CREATE TRIGGER• CM = CREATE MACRO• CO = CREATE PROFILE• CP = CHECKPOINT• CR = CREATE ROLE• CT = CREATE TABLE• CU = CREATE USER• CV = CREATE VIEW• D = DELETE• DA = DROP AUTHORIZATION• DD = DROP DATABASE• DF = DROP FUNCTION• DG = DROP TRIGGER• DM = DROP MACRO• DO = DROP PROFILE• DP = DUMP• DR = DROP ROLE• DT = DROP TABLE• DU = DROP USER• DV = DROP VIEW• E = EXECUTE• EF = EXECUTE FUNCTION• 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• RF = REFERENCE• RS = RESTORE• S = RETRIEVE/
SELECT• SS = SET SESSION
RATE• SR = SET RESOURCE
RATE• U = UPDATE• UU = UDT USAGE• UT = UDT TYPE• UM = UDT METHOD• 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.)
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 97
AccessType(Continued) Data Type Compatibility View Unicode View
CHAR(2)LATINNOT NULL
CHAR(2)LATINNOT NULL
Format X(2) X(2)
Associated View AccessLog AccessLogV
AccLogResult 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
Data Type Compatibility View Unicode View
CHAR(1)LATINNOT NULL
CHAR(1)LATINNOT NULL
Format X(1) X(1)
Associated View AccessLog AccessLogV
AccountName Returns the expanded account in effect when the request that generated this log entry was submitted.
Note: The system account name SYSTEMACCOUNTNO tracks console utility activity such as table rebuild, Diskcopy, or Scandisk.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View AccessLogSecurityLog[X]AMPUsage[X]AccountInfo[X]AllSpace[X]Databases[X]DiskSpace[X]LogOnOff[X]SessionInfo[X]TableSize[X]
AccessLogVSecurityLogV[X]AMPUsageV[X]AccountInfoV[X]AllSpaceV[X]DatabasesV[X]DiskSpaceV[X]LogOnOffV[X]SessionInfoV[X]TableSizeV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
98 Data Dictionary
AccountString(Title: Account)
Returns the specific account for the user with a DBQL rule, or blank if all account strings apply.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View DBQLRules DBQLRulesV
AcctString Returns the user unexpanded logon account string.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View QryLogQryLogSummaryQryLogExceptionsQryLogTDWM
QryLogVQryLogSummaryVQryLogExceptionsVQryLogTDWMV
AcctStringDate Returns the result from the &D code when the user has specified Account String Expansion (ASE).
Data Type Compatibility View Unicode View
DATE DATE
Format YY/MM/DD YY/MM/DD
Associated View QryLog QryLogV
AcctStringHour Returns the result from the &H code when the user has specified Account String Expansion (ASE).
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format --9 --9
Associated View QryLog QryLogV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 99
AcctStringTime Returns the result from the &T code when the user has specified Account String Expansion (ASE).
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format 99:99:99 99:99:99
Associated View QryLog QryLogV
AcrAlterExtProcedure(Title: AXP)
Returns the logging in effect for the ALTER EXTERNAL PROCEDURE privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrAlterFunction(Title: AFN)
Returns the logging in effect for the Alter Function privilege on the object(s) and/or users to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
100 Data Dictionary
AcrAlterProcedure(Title: ASP)
Returns the logging in effect for the Alter Procedure privilege on the object(s) and/or users to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrCheckPoint(Title: CPT)
Returns the logging in effect for the CHECKPOINT privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrCreateDatabase(Title: CDB)
Returns the logging in effect for the CREATE DATABASE privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 101
AcrCreateFunction(Title: CFN)
Returns the logging in effect for the CREATE FUNCTION privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrCreateMacro(Title: CMC)
Returns the logging in effect for the CREATE MACRO privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrCreateProcedure(Title: CSP)
Returns the logging in effect for the CREATE PROCEDURE privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
102 Data Dictionary
AcrCreateProfile(Title: CPR)
Returns the logging in effect for the CREATE PROFILE privilege.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrCreateRole(Title: CRO)
Returns the logging in effect for the CREATE ROLE privilege.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrCreateTable(Title: CTB)
Returns the logging in effect for the CREATE TABLE privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 103
AcrCreateTrigger(Title: CTG)
Returns the logging in effect for the CREATE TRIGGER privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrCreateUser(Title: CUS)
Returns the logging in effect for the CREATE USER privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrCreateView(Title: CVW)
Returns the logging in effect for the CREATE VIEW privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
104 Data Dictionary
AcrCreAuthorization(Title: CAU)
Returns the logging in effect for the CREATE AUTHORIZATION privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrCreExtProcedure(Title: CXP)
Returns the logging in effect for the CREATE EXTERNAL PROCEDURE privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrDelete(Title: DEL)
Returns the logging in effect for the DELETE privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 105
AcrDropAuthorization(Title: DAU)
Returns the logging in effect for the DROP AUTHORIZATION privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrDropDatabase(Title: DDB)
Returns the logging in effect for the DROP DATABASE privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrDropFunction(Title: DFN)
Returns the logging in effect for the DROP FUNCTION privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
106 Data Dictionary
AcrDropMacro(Title: DMC)
Returns the logging in effect for the DROP MACRO privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrDropProcedure(Title: DSP)
Returns the logging in effect for the DROP PROCEDURE privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrDropProfile(Title: DPR)
Returns the logging in effect for the DROP PROFILE privilege.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 107
AcrDropRole(Title: DRO)
Returns the logging in effect for the DROP ROLE privilege.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrDropTable(Title: DTB)
Returns the logging in effect for the DROP TABLE privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrDropTrigger(Title: DTG)
Returns the logging in effect for the DROP TRIGGER privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
108 Data Dictionary
AcrDropUser(Title: DUS)
Returns the logging in effect for the DROP USER privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrDropView(Title: DVW)
Returns the logging in effect for the DROP VIEW privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrDump(Title: DMP)
Returns the logging in effect for the DUMP privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 109
AcrExecute(Title: EXE)
Returns the logging in effect for the EXECUTE privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrExecuteFunction(Title: EFN)
Returns the logging in effect for the EXECUTE FUNCTION privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrExecuteProcedure(Title: ESP)
Returns the logging in effect for the EXECUTE PROCEDURE privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
110 Data Dictionary
AcrGrant(Title: GRT)
Returns the logging in effect for the GRANT privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrIndex(Title: IDX)
Returns the logging in effect for the CREATE/DROP INDEX privilege on the object(s) or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrInsert(Title: INS)
Returns the logging in effect for the INSERT privilege on the objects or users (or both) to which the rule applies.
For information on the character code, see “AccLogRules[V]” on page 294.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 111
AcrReference(Title: REF)
Returns the logging in effect for the Reference privilege on the object(s) or users (or both) to which the rule applies.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrRepControl(Title: REP)
Returns the logging in effect for the RepControl privilege on the object(s) and/or users to which the rule applies.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrRestore(Title: RST)
Returns the logging in effect for the RESTORE privilege on the objects or users (or both) to which the rule applies.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
112 Data Dictionary
AcrSelect(Title: SEL)
Returns the logging in effect for the SELECT privilege on the objects or users (or both) to which the rule applies.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrUDTMethod(Title: UDM)
Returns the logging privilege checks corresponding to access rights for UDTMethod.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrUDTType(Title: UDT)
Returns the logging privilege checks corresponding to access rights for UDTType.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
AcrUDTUsage(Title: USG)
Returns the logging privilege checks corresponding to access rights for UDTUsage.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 113
AcrUpdate(Title: UPD)
Returns the logging in effect for the UPDATE privilege on the objects or users (or both) to which the rule applies.
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View AccLogRules AccLogRulesV
ActionTime Returns a code to signify when, in relation to the SQL statement, the trigger is fired:
• B = Before
• A = After
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View Triggers[X] TriggersV[X]
ActiveCount Returns the number of queries that are active in the WD in the collection period.
Data Type Compatibility View Unicode View
INTEGERNOT NULL
INTEGERNOT NULL
Format --,---,---,--9 --,---,---,--9
Associated View QryLogTDWMSum QryLogTDWMSumV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
114 Data Dictionary
Activity Returns the activity being logged. These are the values:
• ACTIVE = The Event…State is becoming active.
• INACTIVE = The Event…State is becoming inactive.
• EXPRESSION = The Event entry was used in determining that an expression is to be made active.
• SYSCON = The Expression entry was used in determining that a SysCon is to be made active.
• OPENV = The Expression entry was used in determining that an OpEnv is to be made active.
Data Type Compatibility View Unicode View
CHAR(10)LATINNOT CASESPECIFIC
CHAR(10)LATINNOT CASESPECIFIC
Format X(10) X(10)
Associated View QryLogEventHis QryLogEventHisV
ActivityID Returns the internal ID of the construct made active when Activity is EXPRESSION, SYSCON, or OPENV; otherwise, it is set to zero.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View QryLogEventHis QryLogEventHisV
ActivityName Returns the name of the construct made active when Activity is EXPRESSION, SYSCON, or OPENV; otherwise, the field is null.
Data Type Compatibility View Unicode View
VARCHAR(128)UNICODENOT CASESPECIFIC
VARCHAR(128)UNICODENOT CASESPECIFIC
Format X(128) X(128)
Associated View QryLogEventHis QryLogEventHisV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 115
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
Data Type Compatibility View Unicode View
CHAR(1)LATINNOT NULL
CHAR(1)LATINNOT NULL
Format X(1) X(1)
Associated View Events[X] EventsV[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.
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View AllRights[X]UserGrantedRights
AllRightsV[X]UserGrantedRightsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
116 Data Dictionary
AMPCPUTime Returns the total AMP CPU time used for query.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ZZ,ZZZ,ZZ9.999 ZZ,ZZZ,ZZ9.999
Associated View QryLog QryLogV
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ZZZ,ZZZ.999 ZZZ,ZZZ.999
Associated View QryLogSummary QryLogSummaryV
AMPCPUTimeNorm Returns the normalized AMP CPU time for co-existence systems.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ZZ,ZZZ,ZZ9.999 ZZ,ZZZ,ZZ9.999
Associated View QryLog QryLogV
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ZZZ,ZZZ.999 ZZZ,ZZZ.999
Associated View QryLogSummary QryLogSummaryV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 117
AppCategory Returns the application category of an external stored procedure.
These are the values:
• C = CLI
• O = ODBC
• J = JAVA
• N = .NET
For standard external stored procedures, UDF, or UDM, character ‘S’ is used.
Data Type Compatibility View Unicode View
CHAR(1)LATINNOT NULL
CHAR(1)LATINNOT NULL
Format X(1) X(1)
Associated View ExternalSPs[X] ExternalSPsV[X]
AppID Returns the application ID.
Data Type Compatibility View Unicode View
CHAR(30)UNICODE
CHAR(30)UNICODE
Format X(30) X(30)
Associated View QryLogQryLogSummary
QryLogVQryLogSummaryV
Arrivals Indicates how many queries were classified in the summary interval for this workload definition.
Data Type Compatibility View Unicode View
INTEGERNOT NULL
INTEGERNOT NULL
Format --,---,---,--9 --,---,---,--9
Associated View QryLogTDWMSum QryLogTDWMSumV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
118 Data Dictionary
AuditTrailId Returns the identifier that is used for access logging.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODEUPPERCASENOT NULL
Format X(30) X(128)
Associated View SessionInfo[X] SessionInfoV[X]
AuthIdUsed Returns the identifier of the authorization being used for the External Stored Procedure or User Defined Function.
Data Type Compatibility View Unicode View
BYTE(6) BYTE(6)
Format X(12)(explicit)
X(12)(explicit)
Associated View ExternalSPs[X]Functions[X]
ExternalSPsV[X]FunctionsV[X]
AuthorizationId Returns the unique ID of the authorization.
Data Type Compatibility View Unicode View
BYTE(6)NOT NULL
BYTE(6)NOT NULL
Format X(12) X(12)
Associated View Authorizations[X] AuthorizationsV[X]
AuthorizationName Returns the name of the authorization.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View Authorizations[X] AuthorizationsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 119
AuthorizationSubType Specifies whether the authorization is a default authorization.
These are the values:
• D - Default
• N - Non-default
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASE
CHAR(1)LATINUPPERCASE
Format X(1) X(1)
Associated View Authorizations[X] AuthorizationsV[X]
AuthorizationType Returns the type of authorization.
The valid types are:
• Definer
• Invoker
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASE
CHAR(1)LATINUPPERCASE
Format X(1) X(1)
Associated View Authorizations[X] AuthorizationsV[X]
AverageAmpCPU Returns the average number of AMP CPU seconds used by QueryCount.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ZZZ,ZZZ.999 (explicit) ZZZ,ZZZ.999 (explicit)
Associated View QryLogSummary QryLogSummaryV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
120 Data Dictionary
AverageIO Returns the average IO time.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format Z(10) Z(10)
Associated View QryLogSummary QryLogSummaryV
AverageParserCPU Returns the average number of CPU seconds used in the parser by QueryCount.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ZZZ,ZZZ.999 ZZZ,ZZZ.999
Associated View QryLogSummary QryLogSummaryV
AverageTime Returns the average elapsed time.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ZZZ,ZZZ,999 (explicit) ZZZ,ZZZ,999 (explicit)
Associated View QryLogSummary QryLogSummaryV
AvgCPUTime Returns the average CPU time for all queries completed in the summary interval for the workload definition.
Data Type Compatibility View Unicode View
FLOATNOT NULL
FLOATNOT NULL
Format ZZZZZZ.99 (explicit) ZZZZZZ.99 (explicit)
Associated View QryLogTDWMSum QryLogTDWMSumV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 121
AvgDelayTime Returns the average delay time for all queries completed in the summary interval for the workload definition.
Data Type Compatibility View Unicode View
FLOATNOT NULL
FLOATNOT NULL
Format ----,---,---,---,--9 ----,---,---,---,--9
Associated View QryLogTDWMSum QryLogTDWMSumV
AvgRespTime Returns the average response time for all queries completed in the summary interval for the workload definition.
Data Type Compatibility View Unicode View
FLOATNOT NULL
FLOATNOT NULL
Format ZZZZZZ.99 (explicit) ZZZZZZ.99 (explicit)
Associated View QryLogTDWMSum QryLogTDWMSumV
BaseTblDbName Returns the name of the database that contains an error table.
Data Type Unicode View
VARCHAR(128)UNICODE
Format X(128)
Associated View ErrorTblsV[X]
BaseTblName Returns the name of the table that contains an error table.
Data Type Unicode View
VARCHAR(128)UNICODE
Format X(128)
Associated View ErrorTblsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
122 Data Dictionary
B_DatabaseName Returns the name of the database in which the base global table resides.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODEUPPERCASENOT NULL
Format X(30) X(128)
Associated View AllTempTables[X] AllTempTablesV[X]
B_TableName Returns the name of the base global temporary table.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODEUPPERCASENOT NULL
Format X(30) X(128)
Associated View AllTempTables[X] AllTempTablesV[X]
CacheFlag This field is blank if the query is not found in step cache. It could also be one of the following:
• "T" if the query is found in step cache.
• "S" if the query is a parameterized query and a SpecificPlan is generated.
• "G" if the query is a parameterized query and a GenericPlan is generated.
• "A" if the query is a parameterized query and a SpecAlways decision is taken. That is, each time a query submitted USING values are peeked at and the query is parsed.
Data Type Compatibility View Unicode View
CHAR(1)LATIN
CHAR(1)LATIN
Format X(1) X(1)
Associated View QryLog QryLogV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 123
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
Data Type Compatibility View Unicode View
BYTEINT BYTEINT
Format Z9 Z9
Associated View Software_Event_Log Software_Event_LogV
CharacterType Returns the character type that was the default when the function or External Stored Procedure was created.
Data Type Compatibility View Unicode View
SMALLINTNOT NULL
SMALLINTNOT NULL
Format ---,--9 ---,--9
Associated View Functions[X]ExternalSPs[X]
FunctionsV[X]ExternalSPsV[X]
CharSetId Returns the number assigned to the character set defined by this row.
Data Type Compatibility View Unicode View
BYTEINTNOT NULL
BYTEINTNOT NULL
Format ZZ9 ZZ9
Associated View CharTranslations CharTranslationsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
124 Data Dictionary
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.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View CharSetsCharTranslations
CharSetsVCharTranslationsV
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.
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ---,--9 ---,--9
Associated View Columns[X] ColumnsV[X]
CheckName Returns the name of the table-level check. This field is NULL if this is an unnamed table check.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View ShowTblChecks[X] ShowTblChecksV[X]
CheckpointName Returns the checkpoint name as specified by the user in the CHECKPOINT statement.
Data Type Compatibility View Unicode View
VARCHAR(30)LATIN
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View Events[X] EventsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 125
Child Returns the name of a referencing database or user.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View Children[X] ChildrenV[X]
ChildCount Returns the count of the referencing tables for the table.
For stored procedures and external stored procedures, this field stores the number of result sets.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ---,--9 ---,--9
Associated View Tables[X]Tables2[X]
TablesV[X]Tables2V[X]
ChildDb Returns the name of the referencing database.
Data Type Compatibility View Unicode View
CHAR(30) LATIN
VARCHAR(128)UNICODE NOT NULL
Format X(30) X(128)
Associated View All_RI_Children[X]All_RI_Parents[X]RI_Distinct_Children[X]RI_Distinct_Parents[X]
All_RI_ChildrenV[X]All_RI_ParentsV[X]RI_Distinct_ChildrenV[X]RI_Distinct_ParentsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
126 Data Dictionary
ChildDbId Returns the database ID of the referencing table.
Data Type Compatibility View Unicode View
BYTE(4) NOT NULL
BYTE(4) NOT NULL
Format X(8) X(8)
Associated View RI_Child_Tables[X]RI_Parent_Tables[X]
RI_Child_TablesV[X]RI_Parent_TablesV[X]
ChildKeyColumn Returns the name of a column in the referencing key.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View All_RI_Children[X]All_RI_Parents[X]
All_RI_ChildrenV[X]All_RI_ParentsV[X]
ChildKeyFID Returns the field ID of a column in the referencing key.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ---,--9 ---,--9
Associated View RI_Child_Tables[X]RI_Parent_Tables[X]
RI_Child_TablesV[X]RI_Parent_TablesV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 127
ChildTable Returns the name of the referencing table.
Data Type Compatibility View Unicode View
CHAR(30) LATIN
VARCHAR(128)UNICODE NOT NULL
Format X(30) X(128)
Associated View All_RI_Children[X]All_RI_Parents[X]RI_Distinct_Children[X]RI_Distinct_Parents[X]
All_RI_ChildrenV[X]All_RI_ParentsV[X]RI_Distinct_ChildrenV[X]RI_Distinct_ParentsV[X]
ChildTID Returns the table ID of the referencing table.
Data Type Compatibility View Unicode View
BYTE(6)NOT NULL
BYTE(6)NOT NULL
Format X(12) X(12)
Associated View RI_Child_Tables[X]RI_Parent_Tables[X]
RI_Child_TablesV[X]RI_Parent_TablesV[X]
ClassificationTime Returns the time when the query was classified.
Data Type Compatibility View Unicode View
TIMESTAMP(2) TIMESTAMP(2)
Format YYYYMMDDBHH:MI:SS.S(F)Z YYYYMMDDBHH:MI:SS.S(F)Z
Associated View QryLogExceptions QryLogExceptionsV
ClientAddr Returns the IP address of the client who submitted the query.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
CHAR(30)LATIN
Format X(30) X(30)
Associated View QryLogQryLogSummary
QryLogVQryLogSummaryV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
128 Data Dictionary
ClientID Returns the client ID.
Data Type Compatibility View Unicode View
CHAR(30)UNICODE
CHAR(30)UNICODE
Format X(30) X(30)
Associated View QryLogQryLogSummary
QryLogVQryLogSummaryV
ColCheck Returns the unresolved text for the column-level check condition.
Data Type Compatibility View Unicode View
VARCHAR(8192)LATIN
VARCHAR(8192)UNICODE
Format X(8192) X(255)
Associated View ShowColChecks[X] ShowColChecksV[X]
CollationName Returns the name of the MULTINATIONAL or CHARSET_COLL collation; otherwise, it is NULL.
Data Type Compatibility View Unicode View
VARCHAR(128)UNICODE
VARCHAR(128)UNICODE
Format X(128) X(128)
Associated View IndexConstraints[X] IndexConstraintsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 129
CollectTimeStamp Returns a timestamp unique to each buffer cache.
Data Type Compatibility View Unicode View
TIMESTAMP(2)NOT NULL
TIMESTAMP(2)NOT NULL
Format YYYY-MM-DDBHH:MI:SS YYYY-MM-DDBHH:MI:SS
Associated View QryLogQryLogObjectsQryLogSummaryQryLogStepsQryLogSQLQryLogExplainQryLogTDWMSumQryLogTDWMQryLogEventsQryLogEventHisQryLogExceptions
QryLogVQryLogObjectsVQryLogSummaryVQryLogStepsVQryLogSQLVQryLogExplainVQryLogTDWMSumVQryLogTDWMVQryLogEventsVQryLogEventHisVQryLogExceptionsV
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.
Data Type Compatibility View Unicode View
BYTE(256) NOT NULL
BYTE(256) NOT NULL
Format X(512) X(512)
Associated View Collations CollationsV
CollInstall Returns the install flag for the collation. The option returns Y (yes) if the collation is installed when the Teradata Database is started and N (no) if the collation is not installed when the Teradata Database is started. This flag applies only to multinational collation. Other collations are never installed.
Data Type Compatibility View Unicode View
CHAR(1)LATINNOT NULL
CHAR(1)LATINNOT NULL
Format X(1) X(1)
Associated View Collations CollationsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
130 Data Dictionary
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 Database.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
CHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View Collations CollationsV
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.
Data Type Compatibility View Unicode View
BYTE(256)NOT NULL
BYTE(256)NOT NULL
Format X(512) X(512)
Associated View Collations CollationsV
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.
Data Type Compatibility View Unicode View
BYTE(256)NOT NULL
BYTE(256)NOT NULL
Format X(512) X(512)
Associated View Collations CollationsV
ColumnConstraint Returns the condition text for column-level check.
Data Type Compatibility View Unicode View
VARCHAR(8192)LATIN
VARCHAR(8192)UNICODE
Format X(8192) X(255)
Associated View Columns[X] ColumnsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 131
ColumnFormat Returns the format of a column or parameter.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View Columns[X]ColumnStatsIndexStatsMultiColumnStats
ColumnsV[X]ColumnStatsVIndexStatsVMultiColumnStatsV
ColumnId Returns a two-byte value specifying the internal identifier for this column.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ---,--9 ---,--9
Associated View Columns[X] ColumnsV[X]
ColumnLength Returns the length of a column as the maximum number of bytes used to physically store a column value in a table row.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format Z,ZZZ,ZZZ,ZZ9 (explicit) Z,ZZZ,ZZZ,ZZ9 (explicit)
Associated View Columns[X]IndexStatsMultiColumnStatsColumnStats
ColumnsV[X]IndexStatsVMultiColumnStatsVColumnStatsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
132 Data Dictionary
ColumnName Returns the column name that was entered on the access log.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View AccessLog AccessLogV
Returns the column name or parameter.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View Columns[X]Indices[X]ColumnStatsIndexStatsAllRoleRightsUserRoleRightsMultiColumnStats
ColumnsV[X]IndicesV[X]ColumnStatsVIndexStatsVAllRoleRightsVUserRoleRightsVMultiColumnStatsV
Returns the column name to which a privilege has been granted.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View AllRights[X]UserGrantedRightsUserRights
AllRightsV[X]UserGrantedRightsVUserRightsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 133
ColumnName(Continued)
Returns the column name having column-level checks.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View ShowColChecks[X] ShowColChecksV[X]
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.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format Z9 (explicit) Z9 (explicit)
Associated View Indices[X]IndexStatsMultiColumnStats
IndicesV[X]IndexStatsVMultiColumnStatsV
ColumnsStatistics Returns the collected statistics on a set of columns.
Data Type Compatibility View Unicode View
VARBYTE(16383) VARBYTE(16383)
Format X(255) X(255)
Associated View MultiColumnStats MultiColumnStatsV
ColumnTitle Returns any column heading.
Data Type Compatibility View Unicode View
VARCHAR(60)UNICODE
VARCHAR(256)UNICODE
Format X(60) X(256)
Associated View Columns[X] ColumnsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
134 Data Dictionary
ColumnType Returns column name or parameter in the following formats:
• AT = TIME
• BF = BYTE
• BO = BLOB
• BV = VARBYTE
• CF = CHAR
• CO = CLOB
• CV = VARCHAR
• D = DECIMAL
• DA = DATE
• DH = INTERVAL DAY TO HOUR
• DM = INTERVAL DAY TO MINUTE
• DS = INTERVAL DAY TO SECOND
• DY = INTERVAL DAY
• F = FLOAT
• GF = GRAPHIC
• GV = VARGRAPHIC
• HM = INTERVAL HOUR TO MINUTE
• HR = INTERVAL HOUR
• HS = INTERVAL HOUR TO SECOND
• I1 = BYTEINT
• I2 = SMALLINT
• I = INTEGER
• MI = INTERVAL MINUTE
• MO = INTERVAL MONTH
• MS = INTERVAL
• MINUTE TO SECOND
• SC = INTERVAL SECOND
• SZ = TIMESTAMP WITH TIME ZONE
• TS = TIMESTAMP
• TZ = TIME WITH TIME ZONE
• YM = INTERVAL YEAR TO MONTH
• YR = INTERVAL YEAR
• UT = UDT Type
Data Type Compatibility View Unicode View
CHAR(2)LATINUPPERCASE
CHAR(2)LATINUPPERCASE
Format X(2) X(2)
Associated View Columns[X]ColumnStatsIndexStatsMultiColumnStats
ColumnsV[X]ColumnStatsVIndexStatsVMultiColumnStatsV
ColumnUDTName Returns the name of a UDT if the column type is UDT.
Data Type Compatibility View Unicode View
CHAR(30)LATINUPPERCASE
VARCHAR(128)UNICODEUPPERCASE
Format X(30) X(128)
Associated View Columns[X] ColumnsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 135
CommentString Returns user-supplied text or commentary on the column, database, table, view, macro, user-defined function, user-defined types, user-defined methods, stored procedure, role, profile, or the user.
Data Type Compatibility View Unicode View
VARCHAR(255)UNICODE
VARCHAR(255)UNICODE
Format X(255) X(255)
Associated View Columns[X]Databases[X]Tables[X]UsersProfileInfo[X]RoleInfo[X]
ColumnsV[X]DatabasesV[X]TablesV[X]UsersVProfileInfoV[X]RoleInfoV[X]
CommitOpt Specifies the ON COMMIT option for a temporary table. These are the values:
• P = ON COMMIT PRESERVE ROWS
• D = ON COMMIT DELETE ROWS
• N = the object is not a temporary table
Data Type Compatibility View Unicode View
CHAR(1)LATINNOT NULL
CHAR(1)LATINNOT NULL
Format X(1) X(1)
Associated View Tables[X] TablesV[X]
CommitOrRollback Returns a code to indicate whether the transaction was committed or rolled back.
• C = Committed
• R = Rolled Back
Data Type Compatibility View Unicode View
CHAR(1)LATINNOT NULL
CHAR(1)LATINNOT NULL
Format X(1) X(1)
Associated View DeleteOldInDoubtInDoubtLog
DeleteOldInDoubtVInDoubtLogV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
136 Data Dictionary
CompletionDate Returns the date the in-doubt transaction was resolved.
Data Type Compatibility View Unicode View
DATENOT NULL
DATENOT NULL
Format YY/MM/DD YY/MM/DD
Associated View DeleteOldInDoubtInDoubtLog
DeleteOldInDoubtVInDoubtLogV
Completions Indicates how many queries were completed in the summary interval for the workload definition.
Data Type Compatibility View Unicode View
INTEGERNOT NULL
INTEGERNOT NULL
Format --,---,---,--9 --,---,---,--9
Associated View QryLogTDWMSum QryLogTDWMSumV
CompletionTime Returns the time the in-doubt transaction was resolved.
Data Type Compatibility View Unicode View
FLOAT NOT NULL
FLOAT NOT NULL
Format 99:99:99 99:99:99
Associated View DeleteOldInDoubtInDoubtLog
DeleteOldInDoubtVInDoubtLogV
Compressible Returns a C (Compress) if the COMPRESS phrase is defined for the column.
Data Type Compatibility View Unicode View
CHAR(1)LATIN
CHAR(1)LATIN
Format X(1) X(1)
Associated View Columns[X] ColumnsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 137
CompressValue Returns the first value in the list of the compress values.
Data Type Compatibility View Unicode View
VARCHAR(255) UNICODE
VARCHAR(255) UNICODE
Format X(255) X(255)
Associated View Columns[X] ColumnsV[X]
CompressValueList Returns the list of compress value(s) defined for the column.
Data Type Compatibility View Unicode View
VARCHAR(8192) UNICODE
VARCHAR(8192) UNICODE
Format X(8192) X(8192)
Associated View Columns[X] ColumnsV[X]
ConfigId Returns the common ID given to all records within the TDWM database that comprise a single configuration.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View QryLogEventHis QryLogEventHisV
ConstCat(Title: Cat)
Returns the constant category.
For legacy and subops profile types, the constant categories are:
• C = the constant is a cost prediction parameter.
• I = the constant is an initialization parameter.
Data Type CHAR(1)NOT NULL
Format X(1)
Associated View CostProfileValues_v
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
138 Data Dictionary
ConstDesc Returns the description of the constant.
Data Type VARCHAR(2048)
Format X(2048)
Associated View CostProfileValues_v
ConstId(Title: C-Id)
Returns the constant identifier number.
Data Type INTEGERNOT NULL
Format -----9
Associated View CostProfileValues_v
ConstName(Title: Constant Name)
Returns the name of the constant in the cost profile.
Data Type CHAR(30)NOT NULL
Format X(30) (explicit)
Associated View CostProfileValues_v
ConstVal(Title: Value)
Returns the constant numeric value that overrides the default numeric value for the cost profile type.
Data Type FLOAT
Format ----,---,--9.9999 (explicit)
Associated View CostProfileValues_v
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 139
ConstraintCollation Returns the collation to be used in evaluating the index constraint as:
• E (EBCDIC)
• A (ASCII)
• M (MULTINATIONAL)
• C (CHARSET_COLL)
• J (JIS_COLL)
• U (use the session collation)
Data Type Compatibility View Unicode View
CHAR(1) LATINUPPERCASENOT NULL
CHAR(1) LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View IndexConstraints[X] IndexConstraintsV[X]
ConstraintCount Returns the count of table level constraints referencing this column.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ---,--9 ---,--9
Associated View Columns[X] ColumnsV[X]
ConstraintName Returns the name of the table-level check. This field is NULL if this is an unnamed table check.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View Table_LevelConstraints[X] Table_LevelConstraintsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
140 Data Dictionary
ConstraintText Returns the unresolved text for the table-level check condition.
Data Type Compatibility View Unicode View
VARCHAR(8192)LATINCASESPECIFIC
VARCHAR(8192)UNICODECASESPECIFIC
Format X(255) X(255)
Associated View Table_LevelConstraints[X] Table_LevelConstraintsV[X]
Returns the unresolved condition text of the index constraint (that is, the implied constraint determined from the partitioning expressions for the index).
Data Type Compatibility View Unicode View
VARCHAR(8192)LATINCASESPECIFIC
VARCHAR(8192)UNICODECASESPECIFIC
Format X(255) X(255)
Associated View IndexConstraints[X] IndexConstraintsV[X]
For information on how implied constraint differs for multi-level from single-level, and how to query index constraints to get the multi-level partitioned tables, see Database Design.
ConstraintType Returns the type of the index constraint as Q (implicit primary index partitioning constraint).
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View IndexConstraints[X] IndexConstraintsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 141
CoordTaskId Returns the coordinator that had the in-doubt transaction.
Data Type Compatibility View Unicode View
VARBYTE (30)NOT NULL
VARBYTE (30)NOT NULL
Format X(60) X(60)
Associated View DeleteOldInDoubtInDoubtLog
DeleteOldInDoubtVInDoubtLogV
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).
Data Type Compatibility View Unicode View
FLOAT NOT NULL
FLOAT NOT NULL
Format ---,---,---,--9.99 (explicit) ---,---,---,--9.99 (explicit)
Associated View AMPUsage[X] AMPUsageV[X]
Returns the amount of CPU time in seconds (with resolution of .01 second) used on AMPs for the step or for a set of parallel steps. The first step in a set of parallel steps contains the sum of the CPU time.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ZZ,ZZZ,ZZ9.999 (explicit) ZZ,ZZZ,ZZ9.999 (explicit)
Associated View QryLogSteps QryLogStepsV
CPUTimeNorm Returns the normalized AMP CPU time for co-existence systems.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ZZ,ZZZ,ZZ9.999 (explicit) ZZ,ZZZ,ZZ9.999 (explicit)
Associated View QryLogSteps QryLogStepsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
142 Data Dictionary
CPUTimeNorm(Continued)
Returns the normalized cpu usage and is calculated as follows:
CPU x scaling factor
The following shows an example:
If the system is NCR 5400, which has a scaling factor of 10.14 and the cpu usage is 3.22, the cpunorm is 32.65.
Note: The calculation is made for each PE in the system. It is used for systems with “co-existent” processors where each node may have CPUs with different scaling factors.
Data Type Compatibility View Unicode View
FLOATNOT NULL
FLOATNOT NULL
Format ---,---,---,--9.99 (explicit) ---,---,---,--9.99 (explicit)
Associated View AMPUsage[X] AMPUsageV[X]
CreateDate Returns the date that the event took place.
Data Type Compatibility View Unicode View
DATE NOT NULL
DATE NOT NULL
Format YY/MM/DD YY/MM/DD
Associated View Events[X]Events_Configuration[X]Events_Media[X]
EventsV[X]Events_ConfigurationV[X]Events_MediaV[X]
CreateTime Returns the time that the event took place.
Data Type Compatibility View Unicode View
DATE NOT NULL
DATE NOT NULL
Format YY/MM/DD YY/MM/DD
Associated View Events[X]Events_Configuration[X]Events_Media[X]
EventsV[X]Events_ConfigurationV[X]Events_MediaV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 143
CreateTimeStamp Returns the date and time the dictionary row was created.
Data Type Compatibility View Unicode View
TIMESTAMP(0) TIMESTAMP(0)
Format YYYY-MM-DDBHH:MI: SS YYYY-MM-DDBHH:MI: SS
Associated View AccLogRulesAllRights[X]All_RI_Children[X]All_RI_Parents[X]Columns[X]Databases[X]Indices[X]LogonRulesRI_Child_Tables[X]RI_Distinct_Children[X]RI_Distinct_Parents[X]RI_Parent_Tables[X]ShowColChecks[X]ShowTblChecks[X]Tables[X]Table_LevelConstraints[X]Triggers[X]UserGrantedRightsUserRightsUsersAllRoleRightsUserRoleRightsProfileInfo[X]IndexConstraints[X]RoleInfo[X]ArchiveLoggingObjs[X]
AccLogRulesVAllRightsV[X]All_RI_ChildrenV[X]All_RI_ParentsV[X]ColumnsV[X]DatabasesV[X]IndicesV[X]LogonRulesVRI_Child_TablesV[X]RI_Distinct_ChildrenV[X]RI_Distinct_ParentsV[X]RI_Parent_TablesV[X]ShowColChecksV[X]ShowTblChecksV[X]TablesV[X]Table_LevelConstraintsV[X]TriggersV[X]UserGrantedRightsVUserRightsVUsersVAllRoleRightsVUserRoleRightsVProfileInfoV[X]IndexConstraintsV[X]RoleInfoV[X]ErrorTblsV[X]ArchiveLoggingObjsV[X]
CreateTxtOverflow Identifies that the CreateText for the object overflowed DBC.TVM when set to ’C,’ and the complete text is stored in DBC.TextTbl.
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASE
CHAR(1)LATINUPPERCASE
Format X(1) X(1)
Associated View Triggers[X] TriggersV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
144 Data Dictionary
CreatorName Returns either the name of the user who created the database or table, or the name of the creator.
For the view DBC.AllRights, CreatorName contains the name of the grantor when the right was granted explicitly. But in cases a right was granted automatically as the result of creating an object, CreatorName contains the name of the user who executed the CREATE command.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View AccLogRulesAllRights[X]All_RI_Children[X]All_RI_Parents[X]Columns[X]Databases[X]Indices[X]LogonRulesRI_Child_Tables[X]RI_Distinct_Children[X]RI_Distinct_Parents[X]RI_Parent_Tables[X]ShowColChecks[X]ShowTblChecks[X]Tables[X]Table_LevelConstraints[X]Triggers[X]UserGrantedRightsUserRightsUsersRoleInfo[X]
AccLogRulesVAllRightsV[X]All_RI_ChildrenV[X]All_RI_ParentsV[X]ColumnsV[X]DatabasesV[X]IndicesV[X]LogonRulesVRI_Child_TablesV[X]RI_Distinct_ChildrenV[X]RI_Distinct_ParentsV[X]RI_Parent_TablesV[X]ShowColChecksV[X]ShowTblChecksV[X]TablesV[X]Table_LevelConstraintsV[X]TriggersV[X]UserGrantedRightsVUserRightsVUsersVRoleInfoV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 145
CreatorName(Continued)
Returns the name of the user who created the profile.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View ProfileInfo[X] ProfileInfoV[X]
Returns the name of the user that created the index constraint.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View IndexConstraints[X] IndexConstraintsV[X]
Returns the name of the error table creator.
Data Type Unicode View
VARCHAR(128)UNICODE
Format X(128)
Associated View ErrorTblsV[X]
Returns the name of the user who created the archive logging.
Data Type Unicode View
VARCHAR(128)UNICODENOT NULL
Format X(128)
Associated View ArchiveLoggingObjsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
146 Data Dictionary
CurrentCollation Returns the current collation of the session with the following values:
• A = ASCII
• E = EBCDIC
• H = Host
• M = Multinational
• C = CharSet_Coll
• J = JIS_Coll
Data Type Compatibility View Unicode View
CHAR(1)LATINNOT NULLUPPERCASE
CHAR(1)LATINNOT NULLUPPERCASE
Format X(1) X(1)
Associated View SessionInfo[X] SessionInfoV[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.
Data Type Compatibility View Unicode View
FLOAT NOT NULL
FLOAT NOT NULL
Format ---,---,---,---,--9 (explicit) ---,---,---,---,--9 (explicit)
Associated View AllSpace[X}DiskSpace[X]TableSize[X]
AllSpaceV[X}DiskSpaceV[X]TableSizeV[X]
CurrentRole Displays the current role for a session.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View SessionInfo[X] SessionInfoV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 147
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).
Data Type Compatibility View Unicode View
FLOAT NOT NULL
FLOAT NOT NULL
Format ---,---,---,---,--9 (explicit) ---,---,---,---,--9 (explicit)
Associated View AllSpace[X}DiskSpace[X]
AllSpaceV[X}DiskSpaceV[X]
CurrentTemp Returns the number of bytes currently used by a temporary table per vproc.
Data Type Compatibility View Unicode View
FLOAT NOT NULL
FLOAT NOT NULL
Format ---,---,---,---,--9 (explicit) ---,---,---,---,--9 (explicit)
Associated View AllSpace[X}DiskSpace[X]
AllSpaceV[X}DiskSpaceV[X]
DatabaseId Returns the ID of the database with the indicated count of unresolved references.
Data Type Compatibility View Unicode View
BYTE(4) NOT NULL
BYTE(4) NOT NULL
Format X(8) X(8)
Associated View Databases2[X] Databases2V[X]
Returns the ID of the database which contains both the Child and Parent tables.
Data Type Compatibility View Unicode View
BYTE(4) NOT NULL
BYTE(4) NOT NULL
Format X(8) X(8)
Associated View Tables2[X] Tables2V[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
148 Data Dictionary
DatabaseName Returns the database or user name of the object for which this log entry was made.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE NOT NULL
Format X(30) X(128)
Associated View AccessLogSecurityLog[X]
AccessLogVSecurityLogV[X]
Returns the database in which the function resides.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE NOT NULL
Format X(30) X(128)
Associated View Functions[X] FunctionsV[X]
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)
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE NOT NULL
Format X(30) X(128)
Associated View AllRights[X] AllRightsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 149
DatabaseName(Continued)
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.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE NOT NULL
Format X(30) X(128)
Associated View AllSpace[X]Databases[X]DiskSpace[X]UserGrantedRightsUserRights
AllSpaceV[X]DatabasesV[X]DiskSpaceV[X]UserGrantedRightsVUserRightsV
Returns the name of the database or user space in which the imported object now resides.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE NOT NULL
Format X(30) X(128)
Associated View Association[X] AssociationV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
150 Data Dictionary
DatabaseName(Continued)
Returns the name of a database.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE NOT NULL
Format X(30) X(128)
Associated View Columns[X]Indices[X]TableSize[X]AllRoleRightsUserRoleRightsTableText[X]MultiColumnStatsAccLogRules
ColumnsV[X]IndicesV[X]TableSizeV[X]AllRoleRightsVUserRoleRightsVTableTextV[X]MultiColumnStatsVAccLogRulesV
Returns the name of a database for which a default journal table has been defined.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE NOT NULL
Format X(30) X(128)
Associated View Database_Default_Journals[X] Database_Default_JournalsV[X]
Returns the name of a database with the indicated count of unresolved references.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE NOT NULL
Format X(30) X(128)
Associated View Databases2[X] Databases2V[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 151
DatabaseName(Continued)
Returns the name of the database that was affected by the event.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE NOT NULL
Format X(30) X(128)
Associated View Events[X] EventsV[X]
Returns the name of a database containing a table with a column-level check.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE NOT NULL
Format X(30) X(128)
Associated View ShowColChecks[X] ShowColChecksV[X]
Returns the name of a database containing a table with a table-level check.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE NOT NULL
Format X(30) X(128)
Associated View ShowTblChecks[X]Table_LevelConstraints[X]
ShowTblChecksV[X]Table_LevelConstraintsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
152 Data Dictionary
DatabaseName(Continued)
Returns the name of the database in which the table resides.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE NOT NULL
Format X(30) X(128)
Associated View Tables[X]TableText[X]IndexConstraints[X]
TablesV[X]TableTextV[X]IndexConstraintsV[X]
Returns the name of the database where the trigger resides.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE NOT NULL
Format X(30) X(128)
Associated View Triggers[X] TriggersV[X]
Returns the databasename of the table, for which the column or index statistics are requested.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE NOT NULL
Format X(30) X(128)
Associated View ColumnStatsIndexStats
ColumnStatsVIndexStatsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 153
DatabaseName(Continued)
Returns the database in which the External Stored Procedure resides.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE NOT NULL
Format X(30) X(128)
Associated View ExternalSPs[X] ExternalSPsV[X]
Returns the database in which the authorization resides.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE NOT NULL
Format X(30) X(128)
Associated View Authorizations[X] AuthorizationsV[X]
Returns the database in which the archive logs reside.
Data Type Unicode View
VARCHAR(128)UNICODE NOT NULL
Format X(128)
Associated View ArchiveLoggingObjsV[X]
DataSetName Returns the client system data set name for a dump or restore event.
Data Type Compatibility View Unicode View
VARCHAR(44)LATIN
VARCHAR(44)LATIN
Format X(44) X(44)
Associated View Events[X]Events_Media[X]
EventsV[X]Events_MediaV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
154 Data Dictionary
DBKind Returns information that indicates whether the row information represents a database (D) or a user (U).
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View Databases[X] DatabasesV[X]
DecimalFractionalDigits Returns an integer indicating the total number of fractional digits (if the column is defined as a decimal).
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format Z9 (explicit) Z9 (explicit)
Associated View Columns[X]ColumnStatsIndexStatsMultiColumnStats
ColumnsV[X]ColumnStatsVIndexStatsVMultiColumnStatsV
DecimalTotalDigits Returns an integer indicating the total number of decimal digits (if the column is defined as a decimal).
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format Z9 (explicit) Z9 (explicit)
Associated View Columns[X]ColumnStatsIndexStatsMultiColumnStats
ColumnsV[X]ColumnStatsVIndexStatsVMultiColumnStatsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 155
DefaultAccount Returns the name of the default account, if any, for the user.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View Users UsersV
Returns the name of the default account, if any, for the profile.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View ProfileInfo[X] ProfileInfoV[X]
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.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View HostsInfo HostsInfoV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
156 Data Dictionary
DefaultCharType Returns the type of the user default character type as follows:
• 1 - Latin
• 2 - Unicode
• 3 - KanjiSJIS
• 4 - Graphic
• 5 - Kanji1
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ---,--9 ---,--9
Associated View Users UsersV
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:
• A = ASCII
• E = EBCDIC
• H = Host
• M = Multinational
• C = CharSet_Coll
• J = JIS_Coll
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View Users UsersV
DefaultDatabase Returns the name of the current default database for the user.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View SessionInfo[X] SessionInfoV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 157
DefaultDatabase(Continued)
Returns the name of the current default database used in the query.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View QryLogQryLogTDWM
QryLogVQryLogTDWMV
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.
Note that at logon, this may be superseded by a default account in a profile, if the user has a profile, and the profile specifies a default account.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View Users UsersV
DefaultDateForm Returns either an INTEGERDATE or ANSIDATE that is set for a USER with the CREATE or MODIFY statement.
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASE
CHAR(1)LATINUPPERCASE
Format X(1) X(1)
Associated View Users UsersV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
158 Data Dictionary
DefaultDB Returns the name of the default database.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View ProfileInfo[X] ProfileInfoV[X]
DefaultRole Returns whether a role is a default role for the grantee.
If the grantee is a USER and has the role as his default role, DefaultRole is ’Y’; otherwise, the value is ’N.’
Data Type Compatibility View Unicode View
VARCHAR(1)UNICODE
VARCHAR(1)UNICODE
Format X(1) X(1)
Associated View RoleMembers[X] RoleMembersV[X]
DefaultValue Returns any default value assigned to the column or parameter.
Data Type Compatibility View Unicode View
VARCHAR(1024)UNICODE
VARCHAR(1024)UNICODE
Format X(1024) X(1024)
Associated View Columns[X] ColumnsV[X]
DelayTime Indicates whether the query was delayed by TDWM.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View QryLogTDWM QryLogTDWMV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 159
DelayedCount Indicates how many of all the queries that completed in the summary interval for the workload definition were delayed.
Data Type Compatibility View Unicode View
INTEGERNOT NULL
INTEGERNOT NULL
Format --,---,---,--9 --,---,---,--9
Associated View QryLogTDWMSum QryLogTDWMSumV
DeterministicOpt Returns whether the function returns the same results for identical inputs or not.
The following codes are used:
• Y = deterministic
• N = not deterministic
The default is N.
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View Functions[X] FunctionsV[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).
Data Type Compatibility View Unicode View
FLOAT NOT NULL
FLOAT NOT NULL
Format ---,---,---,--9 (explicit) ---,---,---,--9 (explicit)
Associated View AMPUsage[X] AMPUsageV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
160 Data Dictionary
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
Data Type Compatibility View Unicode View
CHAR(1)LATINNOT NULL
CHAR(1)LATINNOT NULL
Format X(1) X(1)
Associated View Events[X]Events_Media[X]RCC_Media[X]
EventsV[X]Events_MediaV[X]RCC_MediaV[X]
E2I Returns the client system (external) to Teradata Database (internal) Hex translation codes.
Data Type Compatibility View Unicode View
BYTE(256) NOT NULL
BYTE(256) NOT NULL
Format X(512) X(512)
Associated View CharTranslations CharTranslationsV
E2IUp Returns the client system (external) to Teradata Database (internal) and uppercase Hex translation codes.
Data Type Compatibility View Unicode View
BYTE(256) NOT NULL
BYTE(256) NOT NULL
Format X(512) X(512)
Associated View CharTranslations CharTranslationsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 161
ElapsedTime Returns the difference between last response time and start time.
Data Type Compatibility View Unicode View
INTERVAL HOUR TO SECOND
INTERVAL HOUR TO SECOND
Format -h(2):mm:ss.s(6) -h(2):mm:ss.s(6)
Associated View QryLog QryLogV
Data Type Compatibility View Unicode View
INTERVAL HOUR TO SECOND
INTERVAL HOUR TO SECOND
Format -h(4):mm:ss.s(6) -h(4):mm:ss.s(6)
Associated View QryLogSteps QryLogStepsV
EnabledFlag Returns a code that indicates whether the trigger is enabled or disabled:
• Y = Yes (default)
• N = No
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View Triggers[X] TriggersV[X]
EntryID Returns the internal ID of the causing construct.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View QryLogEventHis QryLogEventHisV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
162 Data Dictionary
EntryKind Indicates what kind of event-related construct caused something to happen. These are the values:
• EVENT
• EXPRESSION
• SYSCON
• OPENV
• STATE
Data Type Compatibility View Unicode View
CHAR(10)LATINNOT CASESPECIFIC
CHAR(10)LATINNOT CASESPECIFIC
Format X(10) X(10)
Associated View QryLogEventHis QryLogEventHisV
EntryName Returns the name of the causing construct.
Data Type Compatibility View Unicode View
VARCHAR(128)UNICODENOT CASESPECIFIC
VARCHAR(128)UNICODENOT CASESPECIFIC
Format X(128) X(128)
Associated View QryLogEventHis QryLogEventHisV
EntryTS Returns the timestamp when the entry occurred.
Data Type Compatibility View Unicode View
TIMESTAMP(2)NOT NULL
TIMESTAMP(2)NOT NULL
Format YYYY-MM-DDBHH:MI:SS.S(F)Z YYYY-MM-DDBHH:MI:SS.S(F)Z
Associated View QryLogEventHis QryLogEventHisV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 163
ErrorCode Returns an error code.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View QryLog QryLogV
ErrorCount Returns the count of queries that completed with an error (error code) in the collection period for this WD.
Data Type Compatibility View Unicode View
INTEGERNOT NULL
INTEGERNOT NULL
Format --,---,---,--9 --,---,---,--9
Associated View QryLogTDWMSum QryLogTDWMSumV
ErrorText Returns the text from the error if ErrorCode is not 0.
Data Type Compatibility View Unicode View
CHAR(255)LATIN/KANJI1
VARCHAR(1024)UNICODE
Format X(255) X(255)
Associated View QryLogQryLogExceptions
QryLog[V]QryLogExceptionsV
ErrTblDbName Returns the name of the database where the error table resides.
Data Type Unicode View
VARCHAR(128)UNICODENOT NULL
Format X(128)
Associated View ErrorTblsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
164 Data Dictionary
ErrTblName Returns the name of the error table.
Data Type Unicode View
VARCHAR(128)UNICODENOT NULL
Format X(128)
Associated View ErrorTblsV[X]
EstCPUCost Returns an estimate (from the optimizer) of the milliseconds of CPU time for the step.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ZZ,ZZZ,ZZ9.999 ZZ,ZZZ,ZZ9.999
Associated View QryLogSteps QryLogStepsV
EstHRCost Returns an estimate (from the optimizer) of other costs for the step.
There is no comparable actual data for this estimate.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ZZ,ZZZ,ZZ9.999 ZZ,ZZZ,ZZ9.999
Associated View QryLogSteps QryLogStepsV
EstIOCost Returns an estimate (from the optimizer) of service time in milliseconds for IO for the step.
There is no comparable actual data for this estimate.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ZZ,ZZZ,ZZ9.999 ZZ,ZZZ,ZZ9.999
Associated View QryLogSteps QryLogStepsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 165
EstNetCost Returns an estimate (from the optimizer) of the BYNET service time in milliseconds for the step.
There is no comparable actual data for this estimate.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ZZ,ZZZ,ZZ9.999 ZZ,ZZZ,ZZ9.999
Associated View QryLogSteps QryLogStepsV
EstProcTime Returns the estimated processing time from the Optimizer.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ----,---,---,---,--9.999 ----,---,---,---,--9.999
Associated View QryLogSteps QryLogStepsV
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ZZ,ZZZ,ZZ9.999 ZZ,ZZZ,ZZ9.999
Associated View QryLog QryLogV
EstRowCount Returns the estimated row count from the Optimizer.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ----,---,---,---,--9 ----,---,---,---,--9
Associated View QryLogSteps QryLogStepsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
166 Data Dictionary
E_TableId Returns the identifier for the materialized (effective) temporary table for a base global temporary table.
Data Type Compatibility View Unicode View
BYTE(6)NOT NULL
BYTE(6)NOT NULL
Format X(12) X(12)
Associated View AllTempTables[X] AllTempTablesV[X]
Event Returns a description of the type of action, using the following descriptions:
• Logon
• Logoff
• Logon failed
The value "Logon failed" means a logon failed for reasons other than "Bad User," "Bad Account," or "Bad Password." Currently, those other reasons are a failure to conform to Logon Rules or an attempt to log on without a password, where the TDP logon exit does not approve the logon.
• Bad user
• Bad account
The value "Bad account" means the user provided an account string during logon time, but that string does not match any of the account names specified for the user in the CREATE USER or MODIFY USER SQL statement.
• Bad password
• Profile of the user
• Forced Off (indicates that the user session was terminated from the Teradata Database console or the Performance Monitor API)
Data Type Compatibility View Unicode View
CHAR(12)LATINNOT NULL
CHAR(12)LATINNOT NULL
Format X(12) X(12)
Associated View LogOnOff[X] LogOnOffV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 167
Event(Continued)
Returns a code to signify which of the following SQL statements fires the trigger:
• U = UPDATE
• I = INSERT
• D = DELETE
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View Triggers[X] TriggersV[X]
EventCode Returns a Teradata error code.
Data Type Compatibility View Unicode View
INTEGER NOT NULL
INTEGER NOT NULL
Format --,---,---,--9 --,---,---,--9
Associated View QryLogEvents QryLogEventsV
EventCount Returns the number of duplicate rows (that is, same occurrences) that preceded a ’LAST-occurrence- only’ row.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View AccessLog AccessLogV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
168 Data Dictionary
EventInfo Returns information about the event that occurred.
Data Type Compatibility View Unicode View
VARCHAR(200)LATIN
VARCHAR(200)UNICODE
Format X(200) X(200)
Associated View QryLogEvents QryLogEventsV
EventNum Returns the client system event number of the restore operation.
Data Type Compatibility View Unicode View
INTEGER NOT NULL
INTEGER NOT NULL
Format --,---,---,--9 --,---,---,--9
Associated View Association[X] AssociationV[X]
Returns the value assigned by the Teradata Database to each user archive or recovery command processed.
Data Type Compatibility View Unicode View
INTEGER NOT NULL
INTEGER NOT NULL
Format --,---,---,--9 --,---,---,--9
Associated View Events[X]RCC_Media[X]Events_Configuration[X]Events_Media[X]
EventsV[X]RCC_MediaV[X]Events_ConfigurationV[X]Events_MediaV[X]
Returns the value assigned by the Teradata Database to each utility function performed or CHECKPOINT statement processed.
Data Type Compatibility View Unicode View
INTEGER NOT NULL
INTEGER NOT NULL
Format --,---,---,--9 --,---,---,--9
Associated View RCC_Configuration[X] RCC_ConfigurationV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 169
EventSubCode This field is not used at this time.
The value will be 0.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View QryLogEvents QryLogEventsV
Event_Tag(Title: 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 occurred. 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.)
Data Type Compatibility View Unicode View
INTEGERNOT NULL
INTEGERNOT NULL
Format Z99-99999-99 Z99-99999-99
Associated View Software_Event_Log Software_Event_LogV
EventTime Identifies the time when the event occurred.
Data Type Compatibility View Unicode View
TIMESTAMP(2)NOT NULL
TIMESTAMP(2)NOT NULL
Format YYYY-MM-DDBHH:MI:SS.S(F)Z YYYY-MM-DDBHH:MI:SS.S(F)Z
Associated View QryLogEvents QryLogEventsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
170 Data Dictionary
EventType Returns the type of event that occurred, using the following:
• CHECKPOINT
• RESTORE
• DELETE
• ROLLBACK
• DUMP
• ROLLFORWARD
Data Type Compatibility View Unicode View
CHAR(30)LATIN NOT NULL
CHAR(30)LATIN NOT NULL
Format X(30) X(30)
Associated View Events[X]Events_Configuration[X]Events_Media[X]
EventsV[X]Events_ConfigurationV[X]Events_MediaV[X]
EventValue Returns the current (latest) value of the primary event criteria, such as number of AMP Worker Tasks (AWTs) and so forth.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View QryLogEventHis QryLogEventHisV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 171
ExceptionAction Specifies the action taken from the list below.
• 'A' - Abort. Cannot be combined with other actions.
• 'C' - Change workload definition. NewWlcId contains the new WD.
• 'L' - Log.
• 'E' - Execute Program. ExProgram contains the program name.
• 'T' - Alert. ExAlert contains to alert name.
• 'N' - No action. Cannot be combined with other actions. This option disables exception detection.
Data Type Compatibility View Unicode View
CHAR(10)LATINNOT CASESPECIFIC
CHAR(10)LATINNOT CASESPECIFIC
Format X(10) X(10)
Associated View QryLogExceptions QryLogExceptionsV
ExceptionCode Returns the error code encountered.
Data Type Compatibility View Unicode View
INTEGER NOT NULL
INTEGER NOT NULL
Format --,---,---,--9 --,---,---,--9
Associated View QryLogExceptions QryLogExceptionsV
ExceptionCount Indicates how many of all the queries completed in the summary interval for the workload definition were processed for exceptions.
Data Type Compatibility View Unicode View
INTEGER NOT NULL
INTEGER NOT NULL
Format --,---,---,--9 --,---,---,--9
Associated View QryLogTDWMSum QryLogTDWMSumV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
172 Data Dictionary
ExceptionSubCode Returns an additional error code to further define the situation.
These codes have not yet been defined.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View QryLogExceptions QryLogExceptionsV
ExceptionTime Returns the time when the query encountered an exception.
Data Type Compatibility View Unicode View
TIMESTAMP(2)NOT NULL
TIMESTAMP(2)NOT NULL
Format YYYY-MM-DDBHH:MI:SS.S(F)Z
YYYY-MM-DDBHH:MI:SS.S(F)Z
Associated View QryLogExceptions QryLogExceptionsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 173
ExceptionValue Specifies what type of exception occurred from the following list:
0x00000001 - Exception time limit exceeded.
0x00000002 - CPU time (AMP and PE) limit exceeded.
0x00000004 - Blocked time limit exceeded.
0x00000008 - Disk to CPU ratio exceeded.
0x00000010 - AMP CPU skew limit exceeded.
0x00000020 - AMP I/O count limit exceeded.
0x00000040 - AMP I/O skew limit exceeded.
0x00000080 - Max row count (for a step) exceeded.
0x00000100 - Max row count (for a query) exceeded.
0x00000200 - Spool space limit exceeded.
0x00000400 - Number of AMPs used in query exceeded.
These values show up as an integer. A conversion to hex is used to extract the bit values. For example - a value of 1024 converted to hex is 400.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View QryLogExceptionsQryLogTDWM
QryLogExceptionsVQryLogTDWMV
ExecProtectionMode Returns whether the function can be executed directly with a call statement (not protected) or indirectly as a separate process (protected).
The following codes are used:
• P = protected mode
• U = unprotected mode
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View Functions[X] FunctionsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
174 Data Dictionary
ExecProtectionMode(Continued)
Indicates the execution protection mode of an External Stored Procedure.
The following codes are used:
• P = protected mode
• U = unprotected mode
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View ExternalSPs[X] ExternalSPsV[X]
ExpandAcctString Returns the expanded logon string of the user.
Data Type Compatibility View Unicode View
CHAR(30)UNICODE
CHAR(30)UNICODE
Format X(30) X(30)
Associated View QryLog QryLogV
ExpirePassword Returns the number of days to elapse before the password expires. 0 indicates the password does not expire.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ---,--9 ---,--9
Associated View SecurityDefaults SecurityDefaultsV
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ---,--9 ---,--9
Associated View ProfileInfo[X] ProfileInfoV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 175
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
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASE
CHAR(1)LATINUPPERCASE
Format X(1) X(1)
Associated View SessionInfo[X] SessionInfoV[X]
ExplainFlag(Title: Explain)
The following codes are used:T = Explain text is stored in DBC.DBQLExplainTblF = No Explain text is provided
Data Type Compatibility View Unicode View
CHAR(1)LATINNOT NULL
CHAR(1)LATINNOT NULL
Format X(1) X(1)
Associated View DBQLRules DBQLRulesV
ExplainText Returns a full Explain Text segment.
Data Type Compatibility View Unicode View
VARCHAR(31000)UNICODENOT NULL
VARCHAR(31000)UNICODENOT NULL
Format X(31000) X(31000)
Associated View QryLogExplain QryLogExplainV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
176 Data Dictionary
ExpRowNo Needed in case multiple rows are used for an Explain.
If the additional "Explain" text is greater than 64KB, the system generates multiple rows.
Data Type Compatibility View Unicode View
INTEGER NOT NULL
INTEGER NOT NULL
Format --,---,---,--9 --,---,---,--9
Associated View QryLogExplain QryLogExplainV
ExternalName Returns the external name of a function.
Data Type Compatibility View Unicode View
CHAR(30)LATIN CASESPECIFICNOT NULL
CHAR(30)LATIN CASESPECIFICNOT NULL
Format X(128) X(128)
Associated View Functions[X]ExternalSPs[X]
Functions[X]ExternalSPsV[X]
ExternalProcedureId Specifies the unique ID of an External Stored Procedure.
Data Type Compatibility View Unicode View
BYTE(6)NOT NULL
BYTE(6)NOT NULL
Format X(12) X(12)
Associated View ExternalSPs[X] ExternalSPsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 177
ExternalProcedureName Identifies the name of an External Stored Procedure.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODEUPPERCASENOT NULL
Format X(30) X(128)
Associated View ExternalSPs[X] ExternalSPsV[X]
ExtFileReference Saves the external file reference provided in the CREATE/REPLACE FUNCTION or external stored procedure statement.
Data Type Compatibility View Unicode View
VARCHAR(1000)LATIN/KANJI1CASESPECIFIC
VARCHAR(1000)UNICODECASESPECIFIC
Format X(1000) X(255)
Associated View Functions[X]ExternalSPs[X]
FunctionsV[X]ExternalSPsV[X]
ExtraInfo Used to track queries.
Data Type Compatibility View Unicode View
VARCHAR(200)LATIN/KANJI1
VARCHAR(200)UNICODE
Format X(200) X(200)
Associated View QryLogExceptions QryLogExceptionsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
178 Data Dictionary
ExtRole Stores comma-delimited names of directory-assigned roles.
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View RoleInfo[X] RoleInfoV[X]
FieldStatistics Returns the statistics for a column in a table.
Data Type Compatibility View Unicode View
VARBYTE (16383) VARBYTE (16383)
Format X(255) X(255)
Associated View ColumnStats ColumnStatsV
FinalWDID Returns the workload definition in which the query completed the execution.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View QryLogTDWM QryLogTDWMV
FirstStepTime Returns the time the first step for this query is dispatched.
Data Type Compatibility View Unicode View
TIMESTAMP(2) NOT NULL
TIMESTAMP(2) NOT NULL
Format YYYY-MM-DDBHH:MI:SS.S(F)Z
YYYY-MM-DDBHH:MI:SS.S(F)Z
Associated View QryLog QryLogV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 179
FreqofUse Returns the count of the number of optimizer references to the object from the parse tree.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View QryLogObjects QryLogObjectsV
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 LAST occurrences
• E = EACH occurrence
• F = FIRST occurrence only
• L = LAST occurrence only
Data Type Compatibility View Unicode View
CHAR(1)LATINNOT NULL
CHAR(1)LATINNOT NULL
Format X(1) X(1)
Associated View AccessLog AccessLogV
FunctionId Returns the unique ID of a function.
Data Type Compatibility View Unicode View
BYTE(6)NOT NULL
BYTE(6)NOT NULL
Format X(12) X(12)
Associated View Functions[X] FunctionsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
180 Data Dictionary
FunctionName Returns the overloaded name of a function.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODEUPPERCASENOT NULL
Format X(30) X(128)
Associated View Functions[X] FunctionsV[X]
FunctionType Returns the type of function. It can be:
• F (scalar function)
• A (aggregate function)
• S (statistical function)
• B (combined aggregate and statistical function)
• R (table function)
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View Functions[X] FunctionsV[X]
GrantAuthority Returns the WITH GRANT OPTION attribute of the access right held by the user.
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View AllRights[X]UserGrantedRightsUserRights
AllRightsV[X]UserGrantedRightsVUserRightsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 181
Grantee Returns the name of a user who was granted a privilege; ALL can be specified.
Returns the name of a user or role who was granted a role.
Data Type Compatibility View Unicode View
CHAR(30)LATINNOT NULL
CHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View UserGrantedRightsRoleMembers[X]
UserGrantedRightsVRoleMembersV[X]
GranteeKind Returns the kind of a grantee. It is either User or Role.
Data Type Compatibility View Unicode View
VARCHAR(4)UNICODENOT NULL
VARCHAR(4)UNICODENOT NULL
Format X(4) X(4)
Associated View RoleMembers[X] RoleMembersV[X]
Grantor Returns the name of the user who granted the role.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View RoleMembers[X] RoleMembersV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
182 Data Dictionary
GrantorName Returns the name of the user who granted the privilege.
Returns the name of the grantor.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View AllRights[X]UserRightsAllRoleRightsUserRoleRights
AllRightsV[X]UserRightsVAllRoleRightsVUserRoleRightsV
GroupName Returns the name of a replication group.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View RepTables[X] RepTablesV[X]
HighHist Returns the highest value specified as a query execution time differentiation. Used with the "SUMMARY" SQL option only.
If THRESHOLD is used, HighHist is 0.
Data Type Compatibility View Unicode View
FLOATNOT NULL
FLOATNULL
Format ----,---,---,---,--9.999 ----,---,---,---,--9.999
Associated View QryLogSummary QryLogSummaryV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 183
HostName Returns the unique name defined for this client system.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View HostsInfo HostsInfoV
HostNo Returns the number of the client system through which the user logged on to the Teradata Database.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ---,--9 ---,--9
Associated View SessionInfo[X]CSPSessionInfoAllTempTables[X]
SessionInfoV[X]CSPSessionInfoVAllTempTablesV[X]
I2E Returns the Teradata Database (internal) to client system (external) Hex translation codes.
Data Type Compatibility View Unicode View
BYTE(256) NOT NULL
BYTE(256) NOT NULL
Format X(512) X(512)
Associated View CharTranslations CharTranslationsV
I2EUp Returns the Teradata Database (internal) to client system (external) and uppercase Hex translation codes.
Data Type Compatibility View Unicode View
BYTE(256) NOT NULL
BYTE(256) NOT NULL
Format X(512) X(512)
Associated View CharTranslations CharTranslationsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
184 Data Dictionary
IdColType Indicates if a column is a regular column or an identity column.
Possible values are:
• NULL = non-identity column
• GA = generated always
• GD = generated by default
Data Type Compatibility View Unicode View
CHAR(2)LATINUPPERCASE
CHAR(2)LATINUPPERCASE
Format X(2) X(2)
Associated View Columns[X] ColumnsV[X]
IFPNo Returns the vproc number of the PE through which the session was connected or assigned..
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format -(5)9 -(5)9
Associated View AccessLogLogOnOff[X]SessionInfo[X]
AccessLogVLogOnOffV[X]SessionInfoV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 185
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
Note: If Y, it may be possible to validate the reference indexes that have been marked as inconsistent.
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASE NOT NULL
CHAR(1)LATINUPPERCASE NOT NULL
Format X(1) X(1)
Associated View All_RI_Children[X]All_RI_Parents[X]RI_Child_Tables[X]RI_Distinct_Children[X]RI_Distinct_Parents[X]RI_Parent_Tables[X]
All_RI_ChildrenV[X]All_RI_ParentsV[X]RI_Child_TablesV[X]RI_Distinct_ChildrenV[X]RI_Distinct_ParentsV[X]RI_Parent_TablesV[X]
IndexId Returns the reference index number.
Note: This is not the same as IndexNumber.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ---,--9 ---,--9
Associated View All_RI_Children[X]All_RI_Parents[X]RI_Child_Tables[X]RI_Distinct_Children[X]RI_Distinct_Parents[X]RI_Parent_Tables[X]
All_RI_ChildrenV[X]All_RI_ParentsV[X]RI_Child_TablesV[X]RI_Distinct_ChildrenV[X]RI_Distinct_ParentsV[X]RI_Parent_TablesV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
186 Data Dictionary
IndexName Returns the name of the reference index.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128) UNICODE
Format X(30) X(128)
Associated View All_RI_Children[X]All_RI_Parents[X]Indices[X]RI_Child_Tables[X]RI_Distinct_Children[X]RI_Distinct_Parents[X]RI_Parent_Tables[X]
All_RI_ChildrenV[X]All_RI_ParentsV[X]IndicesV[X]RI_Child_TablesV[X]RI_Distinct_ChildrenV[X]RI_Distinct_ParentsV[X]RI_Parent_TablesV[X]
Returns the name of the index. This field is NULL if the index does not have a name.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128) UNICODE
Format X(30) X(128)
Associated View IndexConstraints[X] IndexConstraintsV[X]
IndexNumber Returns an internal number assigned to the index. A primary index has an index number of 1.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ZZ9 (explicit) ZZ9 (explicit)
Associated View Indices[X] IndicesV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 187
IndexNumber(Continued)
Returns an internal number assigned to the index. A primary index has an index number of 1.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ---,--9 ---,--9
Associated View IndexStats IndexStatsV
Returns an internal number assigned to the index. A primary index has an index number of 1.
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ---,--9 ---,--9
Associated View IndexConstraints[X] IndexConstraintsV[X]
IndexPresent Returns Y (yes) or N (no) to indicate whether or not the INDEX option was used in a dump event.
Data Type Compatibility View Unicode View
CHAR(1)LATIN
CHAR(1)LATIN
Format X(1) X(1)
Associated View Events[X] EventsV[X]
IndexStatistics Returns the statistics relating to the index.
Data Type Compatibility View Unicode View
VARBYTE (16383) VARBYTE (16383)
Format X(255) X(255)
Associated View IndexStats IndexStatsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
188 Data Dictionary
IndexType Returns the type of an index as:
• P (Nonpartitioned Primary)
• Q (Partitioned 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)
• M (Multi-Column Statistics)
• D (Derived column partition statistics)
• 1 (field1 column of a join or hash index)
• 2 (field2 column of a join or hash index)
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View Indices[X]IndexStats
IndicesV[X]IndexStatsV
InfoData Returns the attribute identified by the value of the InfoKey field.
Data Type Compatibility View Unicode View
VARCHAR(16384)LATIN/KANJI1
VARCHAR(16384)UNICODE
Format X(16384) X(16384)
Associated View DBCInfo DBCInfoV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 189
InfoKey Returns the key identifying the attribute value in the InfoData field.
Data Type Compatibility View Unicode View
VARCHAR(30)LATINNOT NULL
VARCHAR(30)LATINNOT NULL
Format X(30) X(30)
Associated View DBCInfo DBCInfoV
InstallFlag Returns a code to indicate whether this character set is to be installed as currently available on the Teradata Database. A maximum of six character sets can be installed at one time.
These are the codes:
• Y = Yes
• N = No
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View CharTranslations CharTranslationsV
InterimFldSize Returns the interim field size defined for an aggregate user-defined function.
Data Type Compatibility View Unicode View
INTEGER NOT NULL
INTEGER NOT NULL
Format --,---,---,--9 --,---,---,--9
Associated View Functions[X] FunctionsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
190 Data Dictionary
InternalRequestNum Returns the internal request number used by the Teradata Database.
For statements other than those within a stored procedure, the internal request number and the client request number (RequestNum field) are the same.
When a stored procedure is invoked in a session, the internal request number is incremented by one for every request made by the stored procedure. All other queries issued by the session also increment the InternalRequestNum value.
Data Type Compatibility View Unicode View
INTEGER NOT NULL
INTEGER NOT NULL
Format --,---,---,--9 --,---,---,--9
Associated View QryLog QryLogV
IOCount Returns the number of IOs from AMPs that were generated by the step or set of parallel steps which follow if the second step level is 1. For parallel steps, StepLev2Num is greater than 1. The first step in a set of parallel steps contains the sum of the IOs.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ----,---,---,---,--9 ----,---,---,---,--9
Associated View QryLogSteps QryLogStepsV
Journal_DB Returns the name of the database or user space in which the default journal table for DatabaseName resides.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View Database_Default_Journals[X]User_Default_Journals[X]
Database_Default_JournalsV[X]User_Default_JournalsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 191
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)
Data Type Compatibility View Unicode View
CHAR(2)LATINUPPERCASENOT NULL
CHAR(2)LATINUPPERCASENOT NULL
Format X(2) X(2)
Associated View Databases[X]Tables[X]Users
DatabasesV[X]TablesV[X]UsersV
JournalName Returns the name of the journal table defined as the default for UserName.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View Database_Default_Journals[X]Journals[X]User_Default_Journals[X]
Database_Default_JournalsV[X]JournalsV[X]User_Default_JournalsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
192 Data Dictionary
JournalSaved Returns one of the following codes to indicate whether or not the SAVE option was used in the event:
• Y = Yes
• N = No
Data Type Compatibility View Unicode View
CHAR(1)LATIN
CHAR(1)LATIN
Format X(1) X(1)
Associated View Events[X] EventsV[X]
Journals_DB Returns the name of the database in which a journal table resides.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View Journals[X] JournalsV[X]
JournalUsed Returns one of the following codes to indicate which part of the journal table was used:
• C = Current
• R = Restored
• S = Saved
Data Type Compatibility View Unicode View
CHAR(1)LATIN
CHAR(1)LATIN
Format X(1) X(1)
Associated View Events[X] EventsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 193
Kind Returns a code that indicates whether the trigger is evaluated for:
• S = the statement (once)
• R = each row changed by the triggering action
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View Triggers[X] TriggersV[X]
LastAccessTimeStamp Returns the time that the corresponding object was last accessed.
Data Type Compatibility View Unicode View
TIMESTAMP(0) TIMESTAMP(0)
Format YYYY-MM-DDBHH:MI:SS YYYY-MM-DDBHH:MI:SS
Associated View Columns[X]Databases[X]Indices[X]Tables[X]UsersTriggers[X]
ColumnsV[X]DatabasesV[X]IndicesV[X]TablesV[X]UsersVTriggersV[X]
LastAlterName Returns the name of the user who last updated the dictionary row.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View Columns[X]Databases[X]Indices[X]Tables[X]Triggers[X]UsersProfileInfo[X]
ColumnsV[X]DatabasesV[X]IndicesV[X]Tables[X]TriggersV[X]UsersVProfileInfoV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
194 Data Dictionary
LastAlterTimeStamp Returns the time the dictionary row was last updated.
Data Type Compatibility View Unicode View
TIMESTAMP(0) TIMESTAMP(0)
Format YYYY-MM-DDBHH:MI:SS YYYY-MM-DDBHH:MI:SS
Associated View Columns[X]Databases[X]Indices[X]Tables[X]Triggers[X]Users
ColumnsV[X]DatabasesV[X]IndicesV[X]TablesV[X]TriggersV[X]UsersV
Returns the time the dictionary row was last updated.
Data Type Compatibility View Unicode View
TIMESTAMP(0)NOT NULL
TIMESTAMP(0)NOT NULL
Format YYYY-MM-DDBHH:MI:SS YYYY-MM-DDBHH:MI:SS
Associated View ProfileInfo[X] ProfileInfoV[X]
LastStateChange Returns the time of the last state change via TDWM.
Data Type Compatibility View Unicode View
TIMESTAMP(2) TIMESTAMP(2)
Format YYYY-MM-DDBHH:MI:SS(F)Z YYYY-MM-DDBHH:MI:SS(F)Z
Associated View QryLogTDWM QryLogTDWMV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 195
LDAP Indicates whether a session is LDAP-based.
The LDAP column contains "Y" if the session is LDAP-based; otherwise, the column contains "N."
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View SessionInfo[X] SessionInfoV[X]
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.
Data Type Compatibility View Unicode View
BYTEINT NOT NULL
BYTEINT NOT NULL
Format ZZ9 ZZ9
Associated View Software_Event_Log Software_Event_LogV
LineNo Returns the number that corresponds to the running sequence number of the multiple rows of text stored in DBC.TextTbl.
Data Type Compatibility View Unicode View
SMALLINTNOT NULL
SMALLINTNOT NULL
Format ---,--9 ---,--9
Associated View TableText[X] TableTextV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
196 Data Dictionary
LinkingEventNum Returns the terminating event number specified by the user for a rollforward or rollbackward event.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View Events[X] EventsV[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.
Data Type Compatibility View Unicode View
BYTEINT BYTEINT
Format ---9 ---9
Associated View Users UsersV
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.
Data Type Compatibility View Unicode View
DATE DATE
Format YY/MM/DD YY/MM/DD
Associated View Users UsersV
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.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format 99:99 99:99
Associated View Users UsersV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 197
LockedUserExpire Returns the number of minutes to elapse before a locked user is unlocked.
0 indicates immediate unlock.
-1 indicates user is locked indefinitely.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ---,--9 ---,--9
Associated View SecurityDefaults SecurityDefaultsV
Returns the number of minutes to elapse before a locked user is unlocked.
0 indicates immediate unlock.
-1 indicates user is locked indefinitely.
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ---,--9 ---,--9
Associated View ProfileInfo[X] ProfileInfoV[X]
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
Data Type Compatibility View Unicode View
CHAR(1)LATIN
CHAR(1)LATIN
Format X(1) X(1)
Associated View Events[X] EventsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
198 Data Dictionary
LogDate Returns the date that the access log entry was made.
Data Type Compatibility View Unicode View
DATENOT NULL
DATENOT NULL
Format YY/MM/DD YY/MM/DD
Associated View AccessLogLogOnOff[X]SecurityLog[X]
AccessLogVLogOnOffV[X]SecurityLogV[X]
Returns any calendar date that precedes the current date by more than 30 days.
Data Type Compatibility View Unicode View
DATENOT NULL
DATENOT NULL
Format YY/MM/DD YY/MM/DD
Associated View DeleteAccessLog[X] DeleteAccessLogV[X]
LogicalHostId Returns the ID of the client system from which the session logged on to the Teradata Database.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ZZZ9 (explicit) ZZZ9 (explicit)
Associated View AccessLogQryLog
AccessLogVQryLogV
Returns the ID of the client system from which the session logged on to the Teradata Database.
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ZZZ9 ZZZ9
Associated View QryLogExceptionsQryLogEventsQryLogSummary
QryLogExceptionsVQryLogEventsVQryLogSummaryV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 199
LogicalHostId(Continued)
Returns the ID of the client system that had the in-doubt transaction.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ---,--9 ---,--9
Associated View DeleteOldInDoubtInDoubtLog
DeleteOldInDoubtVInDoubtLogV
Returns the identifier of the client system connection as defined by the hardware configuration data.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ZZZ9 ZZZ9
Associated View HostsInfo HostsInfoV
Returns the number of the client system through which the user logged on to the Teradata Database.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ZZZ9 ZZZ9
Associated View LogOnOff[X] LogOnOffV[X]
Returns the client system identifier, as defined by the hardware configuration data, to which the rule applies.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ZZZ9 (explicit) ZZZ9 (explicit)
Associated View LogonRules LogonRulesV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
200 Data Dictionary
LogicalHostId(Continued)
Returns the identity of the client system connector, based on the hardware configuration data, through which the user logged on.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ZZZ9 ZZZ9
Associated View SessionInfo[X] SessionInfoV[X]
LogLevel Indicates whether the online archive logging is activated at either a table level or database level. These are the values:
• T = Online Archive Logging was activated on table level.
• D = Online Archive Logging was activated on database level.
Data Type Unicode View
CHAR(1)LATINNOT NULL
Format X(1)
Associated View ArchiveLoggingObjsV[X]
LogonAcct Returns the account string used when a session is established.
This is the explicit account name provided when a user logged on or, if no account name was provided at logon, as determined as follows:
• If the user is assigned to a profile, and that profile has a default account name (that is, the default account name for the profile is not null), then the default account name from that profile is used.
• If the user is not assigned to a profile, or the user is assigned to a profile and the default account name for that profile is null, the default account name, if any, assigned to the user is used.
• If the user does not have a default account name, then the name of the user is used.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View SessionInfo[X] SessionInfoV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 201
LogonDate Returns the date that the session for which the log entry was made was logged on to the Teradata Database.
Data Type Compatibility View Unicode View
DATE NOT NULL
DATE NOT NULL
Format YY/MM/DD YY/MM/DD
Associated View AccessLog AccessLogV
Returns the date on which logon for the session occurred.
Data Type Compatibility View Unicode View
DATE NOT NULL
DATE NOT NULL
Format YY/MM/DD YY/MM/DD
Associated View LogOnOff[X] LogOnOffV[X]
Returns the date of logon for the session being reported.
Data Type Compatibility View Unicode View
DATE NOT NULL
DATE NOT NULL
Format YY/MM/DD YY/MM/DD
Associated View SessionInfo[X] SessionInfoV[X]
LogonDateTime Returns the date and time that the session was logged on.
Data Type Compatibility View Unicode View
TIMESTAMP(2) NOT NULL
TIMESTAMP(2) NOT NULL
Format YYYY-MM-DDBHH:MI:SS YYYY-MM-DDBHH:MI:SS
Associated View QryLog QryLogV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
202 Data Dictionary
LogonSequenceNo Returns the logon sequence number of the session.
Data Type Compatibility View Unicode View
BYTE(4) BYTE(4)
Format X(8) X(8)
Associated View SessionInfo[X] SessionInfoV[X]
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:
Channel-Attached LogonSource Values
Each 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 name
4 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 does 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.
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 203
LogonSource(Continued)
Network-Attached LogonSource Values
The following shows an example:
(TCP/IP) 07DC 10.243.71.25 DW_OLD 2482 ROOT ARCMAIN 01 LSS
The following describes the meaning of each field:
1 TCP/IP - Literal connection name or type
2 07DC - Port or socket identifier
3 10.243.71.25 - IP address of the client
4 DW_OLD - TDPID
5 2482 - Client process/thread identifier
6 ROOT - Client system user ID
7 ARCMAIN - Program used on the client system
8 01 LSS - LSS version 01
PDE Internal Session LogonSource Values
The following fields represent a session logged on by a PDE debug or dump management application:
a LIBDBSUTIL (the library that logged on the session)
b PID of the application process running on the client
c Application name
d Node name (where the application logged on)
Data Type Compatibility View Unicode View
VARCHAR(128)LATIN/KANJI1
VARCHAR(128)UNICODE
Format X(128) X(128)
Associated View LogOnOff[X]SessionInfo[X]CSPSessionInfoQryLog
LogOnOffV[X]SessionInfoV[X]CSPSessionInfoVQryLogV
LogonStatus Returns if the rule grants (G) or refuses (R) permission for the named user to log on from the identified client system.
Data Type Compatibility View Unicode View
CHAR(1) LATINNOT NULL
CHAR(1) LATINNOT NULL
Format X(1) X(1)
Associated View LogonRules LogonRulesV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
204 Data Dictionary
LogonTime Returns the time on which logon for the session occurred (useful on logoff events).
Data Type Compatibility View Unicode View
FLOAT NOT NULL
FLOAT NOT NULL
Format 99:99:99.99 99:99:99.99
Associated View LogOnOff[X] LogOnOffV[X]
Returns the time that the session for which the log entry was made was logged on to the Teradata Database.
Data Type Compatibility View Unicode View
FLOAT NOT NULL
FLOAT NOT NULL
Format 99:99:99 (explicit) 99:99:99 (explicit)
Associated View AccessLog AccessLogV
Returns the time of logon for the session being reported.
Data Type Compatibility View Unicode View
FLOAT NOT NULL
FLOAT NOT NULL
Format 99:99:99.99 99:99:99.99
Associated View SessionInfo[X] SessionInfoV[X]
LogonUserName Returns the ID of the user who ran the in-doubt transaction.
Data Type Compatibility View Unicode View
VARCHAR(30)LATIN
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View DeleteOldInDoubtInDoubtLog
DeleteOldInDoubtVInDoubtLogV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 205
LogProcessor Returns the logical processor ID for an AMP not affected by the event.
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format -(5)9 -(5)9
Associated View Events_Configuration[X]RCC_Configuration[X]
Events_ConfigurationV[X]RCC_ConfigurationV[X]
LogTime Returns the time of day that the event occurred as HH:MM:SS.
Data Type Compatibility View Unicode View
FLOAT NOT NULL
FLOAT NOT NULL
Format 99:99:99 (explicit) 99:99:99 (explicit)
Associated View AccessLog AccessLogV
Returns the time of day that the event occurred as HH:MM:SS.
Data Type Compatibility View Unicode View
FLOAT NOT NULL
FLOAT NOT NULL
Format 99:99:99 99:99:99
Associated View DeleteAccessLog[X]SecurityLog[X]
DeleteAccessLogV[X]SecurityLogV[X]
Returns the time of day that the event occurred as HH:MM:SS.
Data Type Compatibility View Unicode View
FLOAT NOT NULL
FLOAT NOT NULL
Format 99:99:99.99 99:99:99.99
Associated View LogOnOff[X] LogOnOffV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
206 Data Dictionary
LogType Returns the kind of statement for which the access log entry was made.
Data Type Compatibility View Unicode View
BYTEINT BYTEINT
Format ---,--9 ---,--9
Associated View SecurityLog[X] SecurityLogV[X]
LowHist Returns the lowest value specified as a query execution differentiation for the "SUMMARY" SQL option.
For the "THRESHOLD" option, this is the threshold value given by the user.
Data Type Compatibility View Unicode View
FLOATNOT NULL
FLOATNOT NULL
Format ----,---,---,---,--9.999 ----,---,---,---,--9.999
Associated View QryLogSummary QryLogSummaryV
LSN Is used in the case of a load utility.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View QryLogQryLogTDWMQryLogSteps
QryLogVQryLogTDWMVQryLogStepsV
MaxAMPCPUTime Returns the CPU time of the highest CPU utilized AMP in the query.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ZZ,ZZZ,ZZ9.999 ZZ,ZZZ,ZZ9.999
Associated View QryLogQryLogSteps
QryLogVQryLogStepsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 207
MaxAMPCPUTimeNorm Returns the normalized maximum CPU Time for AMP.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ZZ,ZZZ,ZZ9.999 ZZ,ZZZ,ZZ9.999
Associated View QryLogQryLogSteps
QryLogVQryLogStepsV
MaxAmpIO (renamed from HotAmpIO)
Returns the I/O count of the highest I/O utilized AMP in the step.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ----,---,---,---,--9 ----,---,---,---,--9
Associated View QryLogQryLogSteps
QryLogVQryLogStepsV
MaxAMPSpool Returns the highest spool usage on an AMP.
This is the number of bytes of spool at the step level.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ----,---,---,---,--9 ----,---,---,---,--9
Associated View QryLogSteps QryLogStepsV
MaxCPUAmpNumber Returns the number of the AMP with the highest CPU activity.
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ---,--9 ---,--9
Associated View QryLogQryLogSteps
QryLogVQryLogStepsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
208 Data Dictionary
MaxCPUAmpNumberNorm Returns the number of the AMP with the highest CPU activity.
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ---,--9 ---,--9
Associated View QryLogQryLogSteps
QryLogVQryLogStepsV
MaxCPUTime Returns the most CPU time of all queries completed in the summary interval for the workload definition.
Data Type Compatibility View Unicode View
FLOATNOT NULL
FLOATNOT NULL
Format ZZZZZZ.99 ZZZZZZ.99
Associated View QryLogTDWMSum QryLogTDWMSumV
MaxIOAmpNumber Returns the number of the AMP with the highest IO usage for this step.
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ---,--9 ---,--9
Associated View QryLogQryLogSteps
QryLogVQryLogStepsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 209
MaxLogonAttempts Returns the number of erroneous logons allowed, at which time the user becomes locked. For example, a 1 indicates that one erroneous logon locks the user. 0 indicates that a user is never locked.
Data Type Compatibility View Unicode View
BYTEINT NOT NULL
BYTEINT NOT NULL
Format ---9 ---9
Associated View SecurityDefaults SecurityDefaultsV
Returns the number of erroneous logons allowed, at which time the user becomes locked. For example, a 1 indicates that one erroneous logon locks the user. 0 indicates that a user is never locked.
Data Type Compatibility View Unicode View
BYTEINT BYTEINT
Format ---9 ---9
Associated View ProfileInfo[X] ProfileInfoV[X]
MaxOutParameters Returns the maximum output parameters for a table function.
For FunctionType=’R,’ the column has values ranging from 0 to 2048.
• 0 = a table function with fixed output parameters.
• 1 to 2048 = a varying output column table function.
For all other FunctionType, the column returns a zero value.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ---,--9 (explicit) ---,--9 (explicit)
Associated View Functions[X] FunctionsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
210 Data Dictionary
MaxPerm Returns an integer that represents 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).
Data Type Compatibility View Unicode View
FLOAT NOT NULL
FLOAT NOT NULL
Format ---,---,---,---,--9 (explicit) ---,---,---,---,--9 (explicit)
Associated View Allspace[X]DiskSpace[X]
AllspaceV[X]DiskSpaceV[X]
MaxProfileSpool Returns the profile SPOOL space limit per AMP for the user if the user is assigned a profile which has a SPOOL space setting. Otherwise, this column has a null value.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ---,---,---,---,--9 (explicit) ---,---,---,---,--9 (explicit)
Associated View Allspace[X]DiskSpace[X]
AllspaceV[X]DiskSpaceV[X]
MaxProfileTemp Returns the profile TEMPORARY space limit per AMP for the user if the user is assigned a profile which has a TEMPORARY space setting Otherwise, this column has a null value.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ---,---,---,---,--9 (explicit) ---,---,---,---,--9 (explicit)
Associated View Allspace[X]DiskSpace[X]
AllspaceV[X]DiskSpaceV[X]
MaxRespTime Returns the slowest response time of all queries completed in the summary interval for the workload definition.
Data Type Compatibility View Unicode View
FLOATNOT NULL
FLOATNOT NULL
Format ZZZZZZ.99 (explicit) ZZZZZZ.99 (explicit)
Associated View QryLogTDWMSum QryLogTDWMSumV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 211
MaxSpool Returns an integer that represents the maximum spool space, in bytes, that is allocated to the database on a specified AMP (or on all AMPs if the SUM aggregate is specified).
Data Type Compatibility View Unicode View
FLOATNOT NULL
FLOATNOT NULL
Format ---,---,---,---,--9 (explicit) ---,---,---,---,--9 (explicit)
Associated View Allspace[X]DiskSpace[X]
AllspaceV[X]DiskSpaceV[X]
MaxSpoolAmpNumber Returns the number of the AMP with high spool usage.
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ---,--9 ---,--9
Associated View QryLogSteps QryLogStepsV
MaxStepsInPar Returns the maximum number of (level 2) steps done in parallel for this query.
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ---,--9 ---,--9
Associated View QryLog QryLogV
MaxTemp Returns an integer that represents the maximum temporary space, in bytes, that is allocated to the database on a specified AMP (or on all AMPs if the SUM aggregate is specified).
Data Type Compatibility View Unicode View
FLOAT NOT NULL
FLOAT NOT NULL
Format ---,---,---,---,--9 (explicit) ---,---,---,---,--9 (explicit)
Associated View Allspace[X]DiskSpace[X]
AllspaceV[X]DiskSpaceV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
212 Data Dictionary
MetSLGCount Indicates how many of all the queries completed in the summary interval for the workload definition met their SLG objectives. Note that queries may not have met the SLG but not have been treated as exceptions either.
Data Type Compatibility View Unicode View
FLOAT NOT NULL
FLOAT NOT NULL
Format --,---,---,--9 --,---,---,--9
Associated View QryLogTDWMSum QryLogTDWMSumV
MinAmpCPUTime Returns the CPU time of the lowest CPU utilized AMP in the step.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ZZ,ZZZ,ZZ9.999 ZZ,ZZZ,ZZ9.999
Associated View QryLogQryLogSteps
QryLogVQryLogStepsV
MinAmpCPUTimeNorm Returns the normalized minimum CPU Time for AMP.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ZZ,ZZZ,ZZ9.999 ZZ,ZZZ,ZZ9.999
Associated View QryLogQryLogSteps
QryLogVQryLogStepsV
MinAmpIO (renamed from LowAmpIO)
Returns the I/O count of the lowest I/O utilized AMP in the query.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ----,---,---,---,--9 ----,---,---,---,--9
Associated View QryLogQryLogSteps
QryLogVQryLogStepsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 213
MinAMPSpool Returns the lowest Spool usage on an AMP.
This is the number of bytes of spool at the step level.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ----,---,---,---,--9 ----,---,---,---,--9
Associated View QryLogSteps QryLogStepsV
MinCPUTime Returns the least CPU time of all queries completed in the summary interval for the workload definition.
Data Type Compatibility View Unicode View
FLOAT NOT NULL
FLOAT NOT NULL
Format ZZZZZZ.99 (explicit) ZZZZZZ.99 (explicit)
Associated View QryLogTDWMSum QryLogTDWMSumV
MinRespTime Returns the fastest response time of all queries completed in the summary interval for the workload definition.
Data Type Compatibility View Unicode View
FLOAT NOT NULL
FLOAT NOT NULL
Format ZZZZZZ.99 (explicit) ZZZZZZ.99 (explicit)
Associated View QryLogTDWMSum QryLogTDWMSumV
Model Returns the PMA (Processor Module Assembly) model information for the Vproc for which an event was logged.
Data Type Compatibility View Unicode View
CHAR(4) LATINNOT NULL
CHAR(4) LATINNOT NULL
Format X(4) X(4)
Associated View AMPUsage[X] AMPUsageV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
214 Data Dictionary
NamedTblCheckCount Returns the count of named table-level check constraint for the table.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ---,--9 ---,--9
Associated View Tables[X] TablesV[X]
NewWDID Specifies the workload definition into which the query was moved because of exception handling.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View QryLogExceptions QryLogExceptionsV
NoClassification Indicates that the query was not reclassified. The query is running in the WD selected by the user, not TDWM.
Data Type Compatibility View Unicode View
CHAR(1)LATIN
CHAR(1)LATIN
Format X(1) X(1)
Associated View QryLogTDWM QryLogTDWMV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 215
NoSQLDataAccess Returns the access indicated in the ‘Create Procedure’ statement. These are the values:
• Y = No SQL in the external stored procedures
• C = Contains SQL.
• R = Reads SQL data
• M = Modifies SQL data
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View Functions[X]ExternalSPs[X]
FunctionsV[X]ExternalSPsV[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
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASE
CHAR(1)LATINUPPERCASE
Format X(1) X(1)
Associated View Columns[X] ColumnsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
216 Data Dictionary
NullCall Returns whether the function is called on null input.
The following codes are used:
• Y = if that is the case
• N = if it returns null on null input
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View Functions[X] FunctionsV[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
Data Type Compatibility View Unicode View
CHAR(1)LATINNOT NULL
CHAR(1)LATINNOT NULL
Format X(1) X(1)
Associated View LogonRules LogonRulesV
NumOfActiveAMPs Returns the number of AMPS that were active for this query.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View QryLogQryLogSteps
QryLogVQryLogStepsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 217
NumParameters Returns the number of parameters of a function.
Data Type Compatibility View Unicode View
SMALLINTNOT NULL
SMALLINTNOT NULL
Format ---,--9 ---,--9
Associated View Functions[X] FunctionsV[X]
Returns the number of parameters of an External Stored Procedure.
Data Type Compatibility View Unicode View
SMALLINTNOT NULL
SMALLINTNOT NULL
Format ---,--9 ---,--9
Associated View ExternalSPs[X] ExternalSPsV[X]
NumResultRows Returns the total number of rows returned for the query.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ----,---,---,---,--9 ----,---,---,---,--9
Associated View QryLog QryLogV
NumSteps Returns the total number of (level 1) steps for this query.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ---,--9 ---,--9
Associated View QryLog QryLogV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
218 Data Dictionary
NumStepswPar Returns the number of (level 1) steps with parallel steps.
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ---,--9 ---,--9
Associated View QryLog QryLogV
ObjectColumnName Returns the name of the column.
If the object type is 'I' or Index, the system returns the name of the column associated with the index.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View QryLogObjects QryLogObjectsV
ObjectDatabaseName Returns the name of the database.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View QryLogObjects QryLogObjectsV
ObjectID Returns the internal ID of the object.
Data Type Compatibility View Unicode View
BYTE (4)NOT NULL
BYTE (4)NOT NULL
Format X(8) X(8)
Associated View QryLogObjects QryLogObjectsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 219
ObjectNum Used for indexes or columns.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View QryLogObjects QryLogObjectsV
ObjectTableName Returns the name of the table.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View QryLogObjects QryLogObjectsV
ObjectType Returns a code to indicate the type of object associated with the event. The following codes are used:
• D = Database
• J = Join Index
• Q = a backup or restore of selected partitions
• T = Table
Data Type Compatibility View Unicode View
CHAR(1)LATIN
CHAR(1)LATIN
Format X(1) X(1)
Associated View Events[X] EventsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
220 Data Dictionary
ObjectType(Continued)
Returns a code to indicate the type of object associated with the event. The following codes are used:
• Agg = User defined aggregate function
• Ags = User defined aggregate STAT function
• Aut = Security Authorization
• Col = Column
• DB = Database
• Hix = Hash index
• Idx = Index
• JIx = Join Index
• Jrl = Journal
• Mac = Macro
• NoT = No Type (Unknown)
• SP = Stored Procedure
• Sta = User defined STAT function
• Tab = Table
• TbF = Table function
• Tmp = Temporary
• Trg = Trigger
• UDF = User Defined Function
• UDM = User Defined Method
• UDT = User Defined Type
• Viw = View
• Vol = Volatile
• XSP = External Stored Procedure
Data Type Compatibility View Unicode View
CHAR(3)LATINNOT NULL
CHAR(3)LATINNOT NULL
Format X(3) X(3)
Associated View QryLogObjects QryLogObjectsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 221
ObjFlag(Title: Object)
The following codes are used:
• T = Object data (columns, databases, tables, and indexes) are stored in DBC.DBQLObjTbl
• F = No object data
Data Type Compatibility View Unicode View
CHAR(1)LATINNOT NULL
CHAR(1)LATINNOT NULL
Format X(1) X(1)
Associated View DBQLRules DBQLRulesV
OpEnvID Returns the ID of the operational environment currently activated by TDWM.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View QryLogExceptionsQryLogTDWMQryLogEventsQryLogTDWMSum
QryLogExceptionsVQryLogTDWMVQryLogEventsVQryLogTDWMSumV
OperationInProcess Returns a code to indicate whether the event is still processing. The following codes are used:
• Y = Yes
• N = No
Data Type Compatibility View Unicode View
CHAR(1)LATINNOT NULL
CHAR(1)LATINNOT NULL
Format X(1) X(1)
Associated View Events[X] EventsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
222 Data Dictionary
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.
Data Type Compatibility View Unicode View
CHAR(1)LATIN
CHAR(1)LATIN
Format X(1) X(1)
Associated View InDoubtLog InDoubtLogV
OrderNumber Optionally specifies when triggers bearing the same action time and event executes.
If the value is 32767, OrderNumber signifies that no explicit order was included in the trigger definition.
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ---,--9 ---,--9
Associated View Triggers[X] TriggersV[X]
Original_CommentString Returns the original comment on the imported table.
Data Type Compatibility View Unicode View
VARCHAR(255)UNICODE
VARCHAR(255)UNICODE
Format X(255) X(255)
Associated View Association[X] AssociationV[X]
Original_CreatorName Returns the original creator of the imported table.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1NOT NULL
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View Association[X] AssociationV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 223
Original_DatabaseName Returns the name of the original database in which the object resided.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1NOT NULL
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View Association[X] AssociationV[X]
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)
Data Type Compatibility View Unicode View
CHAR(2)LATINNOT NULL
CHAR(2)LATINNOT NULL
Format X(2) X(2)
Associated View Association[X] AssociationV[X]
Original_ProtectionType Returns the original protection type of the imported object, using the following codes:
• F = Fallback
• N = None
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View Association[X] AssociationV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
224 Data Dictionary
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
• F = Scalar UDF
• A = Aggregate UDF
• N = Hash Index Table
• U = User-defined data type
• H = Instance or Constructor Method
• E = External Stored Procedure
• R = Table Function
• X = Authorization
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View Association[X] AssociationV[X]
Original_TableName Returns the name of the original object.
Data Type Compatibility View Unicode View
CHAR(30)LATINNOT NULL
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View Association[X] AssociationV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 225
Original_Version Returns the original version of the imported object.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ---,--9 ---,--9
Associated View Association[X] AssociationV[X]
OSDomainName Returns the domain that the user belongs to.
Data Type Compatibility View Unicode View
VARCHAR(256)LATINCASESPECIFIC
VARCHAR(256)LATINCASESPECIFIC
Format X(256) X(256)
Associated View Authorizations[X] AuthorizationsV[X]
OSUserName Returns the OS user name.
Data Type Compatibility View Unicode View
VARCHAR(256)LATINCASESPECIFIC
VARCHAR(256)LATINCASESPECIFIC
Format X(256) X(256)
Associated View Authorizations[X] AuthorizationsV[X]
OtherCount This field is not used.
Data Type Compatibility View Unicode View
INTEGERNOT NULL
INTEGERNOT NULL
Format --,---,---,--9 --,---,---,--9
Associated View QryLogTDWMSum QryLogTDWMSumV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
226 Data Dictionary
OwnerName Returns the name of the owner of the objects targeted by the view, stored procedure, macro, user-defined types, user-defined methods, or user-defined function referenced in the request that generated this log entry.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View AccessLog AccessLogV
Returns the name of the database owner.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1NOT NULL
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View Databases[X] DatabasesV[X]
Returns the name of the owner of the user.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1NOT NULL
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View Users UsersV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 227
ParameterDataTypes Returns the parameter list of a function with a two-character string representing the data type for each parameter.
The maximum parameter is 128.
Data Type Compatibility View Unicode View
VARCHAR(256)LATINUPPERCASE
VARCHAR(256)LATINUPPERCASE
Format X(255) X(255)
Associated View Functions[X] FunctionsV[X]
ParameterStyle Returns the parameter passing convention for the function or an External Stored Procedure.
The following codes are used:
• S = SQL
• G = TD_GENERAL
• I = for internal
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View Functions[X]ExternalSPs[X]
FunctionsV[X]ExternalSPsV[X]
ParameterUDTIds Returns a series of 4-byte UDT- type identifiers.
Data Type Compatibility View Unicode View
VARBYTE(512) VARBYTE(512)
Format X(512) X(512)
Associated View Functions[X]ExternalSPs[X]
FunctionsV[X]ExternalSPsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
228 Data Dictionary
Parent Returns the name of a parent database or user.
Data Type Compatibility View Unicode View
CHAR(30)LATINNOT NULL
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View Children[X] ChildrenV[X]
ParentCount Returns the number of parent tables for the table specified in the TVM row.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ---,--9 ---,--9
Associated View Tables[X]Tables2[X]
TablesV[X]Tables2V[X]
ParentDb Returns the name of the referenced database.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View All_RI_Children[X]All_RI_Parents[X]RI_Distinct_Children[X]RI_Distinct_Parents[X]
All_RI_ChildrenV[X]All_RI_ParentsV[X]RI_Distinct_ChildrenV[X]RI_Distinct_ParentsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 229
ParentDbId Returns the database ID of the referenced table.
Data Type Compatibility View Unicode View
BYTE(4) NOT NULL
BYTE(4) NOT NULL
Format X(8) X(8)
Associated View RI_Child_Tables[X]RI_Parent_Tables[X]
RI_Child_TablesV[X]RI_Parent_TablesV[X]
ParentKeyColumn Returns the name of the column in a referenced key.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View All_RI_Children[X]All_RI_Parents[X]
All_RI_ChildrenV[X]All_RI_ParentsV[X]
ParentKeyFID Returns the field ID of a column in the referenced key.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ---,--9 ---,--9
Associated View RI_Child_Tables[X]RI_Parent_Tables[X]
RI_Child_TablesV[X]RI_Parent_TablesV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
230 Data Dictionary
ParentTable Returns the name of the referenced table.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View All_RI_Children[X]All_RI_Parents[X]RI_Distinct_Children[X]RI_Distinct_Parents[X]
All_RI_ChildrenV[X]All_RI_ParentsV[X]RI_Distinct_ChildrenV[X]RI_Distinct_ParentsV[X]
ParentTID Returns the table ID of the referenced table.
Data Type Compatibility View Unicode View
BYTE(6)NOT NULL
BYTE(6)NOT NULL
Format X(12) X(12)
Associated View RI_Child_Tables[X]RI_Parent_Tables[X]
RI_Child_TablesV[X]RI_Parent_TablesV[X]
ParserCPUTime Returns the total parser and dispatcher CPU time used for the query.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ZZ,ZZZ,ZZ9.999 ZZ,ZZZ,ZZ9.999
Associated View QryLog QryLogV
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ZZZ,ZZZ.999 ZZZ,ZZZ.999
Associated View QryLogSummary QryLogSummaryV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 231
ParserCPUTimeNorm Returns the normalized parser CPU time for co-existence systems.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ZZ,ZZZ,ZZ9.999 ZZ,ZZZ,ZZ9.999
Associated View QryLog QryLogV
Partition Returns the name of the Teradata Database partition to which the user is currently attached. Possible values are as follows:
• DBC/SQL = an SQL session
• EXPORT = a FASTEXPORT session
• FASTLOAD = a FASTLOAD session
• HUTPARSE = an ARC data session
• MLOAD = a MULTILOAD session
• MONITOR = sessions running in a performance monitoring application
• NONE = session is recognized but not yet assigned
Data Type Compatibility View Unicode View
CHAR(16)LATIN
CHAR(16)LATIN
Format X(20) X(20)
Associated View SessionInfo[X] SessionInfoV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
232 Data Dictionary
Partition(Continued)
Returns the number of the Teradata Database partition in which the task that resulted in the logged event was running.
Possible values are:
Number Defines the------ --------------------------------------------------7 console Utility Partition number8 partition in which DBC console procedures will be started by the Host utility9 File System Partition number10 Gateway partition number11 Worker Task Partition number12 Session Control Partition number13 Dispatcher Partition number14 Parser Partition number15 Startup Partition number17 RSSStartUp Partition number18 DDF Server Partition number19 RSG Partition number47 DBS RSG Partition number
Data Type Compatibility View Unicode View
BYTEINT BYTEINT
Format Z9 Z9
Associated View Software_Event_Log Software_Event_LogV
PasswordChgDate Returns the Julian date on which the current password was assigned to the user. This value is 0 for a new user.
Data Type Compatibility View Unicode View
DATE DATE
Format YY/MM/DD YY/MM/DD
Associated View Users UsersV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 233
PasswordDigits Returns a code to indicate if digits are to be allowed in the password. The following codes are used:
• Y, y = allow digits in a password
• N, n = do not allow digits
• R, r = at least one digit is required in the password string
Data Type Compatibility View Unicode View
CHAR(1)LATIN UPPERCASENOT NULL
CHAR(1)LATIN UPPERCASENOT NULL
Format X(1) X(1)
Associated View SecurityDefaults SecurityDefaultsV
Data Type Compatibility View Unicode View
CHAR(1)LATIN UPPERCASE
CHAR(1)LATIN UPPERCASE
Format X(1) X(1)
Associated View ProfileInfo[X] ProfileInfoV[X]
PasswordLastModDate Returns the date that the user password was last modified.
Data Type Compatibility View Unicode View
DATE DATE
Format YY/MM/DD YY/MM/DD
Associated View Users UsersV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
234 Data Dictionary
PasswordLastModTime Returns the time that the user password was last modified.
Data Type Compatibility View Unicode View
TIME TIME
Format HH:MI:SS HH:MI:SS
Associated View Users UsersV
PasswordMaxChar Returns the maximum number of characters in a valid password string. PasswordMaxChar must be equal to or greater than PasswordMinChar.
Data Type Compatibility View Unicode View
BYTEINTBETWEEN1 AND 30NOT NULL
BYTEINTBETWEEN1 AND 30NOT NULL
Format --9 --9
Associated View SecurityDefaults SecurityDefaultsV
Data Type Compatibility View Unicode View
BYTEINT BYTEINT
Format --9 --9
Associated View ProfileInfo[X] ProfileInfoV[X]
PasswordMinChar Returns the minimum number of characters in a valid password string.
Data Type Compatibility View Unicode View
BYTEINT BETWEEN1 AND 30NOT NULL
BYTEINT BETWEEN1 AND 30NOT NULL
Format --9 --9
Associated View SecurityDefaults SecurityDefaultsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 235
PasswordMinChar(Continued)
Data Type Compatibility View Unicode View
BYTEINT BYTEINT
Format --9 --9
Associated View ProfileInfo[X] ProfileInfoV[X]
PasswordRestrictWords Indicates whether to restrict certain words from being contained within a password string.
These are the valid values:
• Y (Yes)
• N (No)
The default is N.
Data Type Compatibility View Unicode View
CHAR(1)NOT NULLUPPERCASE
CHAR(1)NOT NULLUPPERCASE
Format X(1) X(1)
Associated View SecurityDefaults SecurityDefaultsV
PasswordReuse Returns the number of days to elapse before a password can be reused. 0 indicates immediate reuse.
Data Type Compatibility View Unicode View
SMALLINTNOT NULL
SMALLINTNOT NULL
Format --9 --9
Associated View SecurityDefaults SecurityDefaultsV
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ---,--9 ---,--9
Associated View ProfileInfo[X] ProfileInfoV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
236 Data Dictionary
PasswordSpecChar Returns a code to indicate if special characters are to be allowed in the password. For the definition of the codes, see DBC.SysSecDefaults.
Data Type Compatibility View Unicode View
CHAR(1)LATIN UPPERCASENOT NULL
CHAR(1)LATIN UPPERCASENOT NULL
Format X(1) X(1)
Associated View SecurityDefaults SecurityDefaultsV
Data Type Compatibility View Unicode View
CHAR(1)LATIN UPPERCASE
CHAR(1)LATIN UPPERCASE
Format X(1) X(1)
Associated View ProfileInfo[X] ProfileInfoV[X]
PeakPerm Returns a code to indicate if special characters are to be allowed in the password. For the definition of the codes, see DBC.SysSecDefaults.
Data Type Compatibility View Unicode View
FLOATNOT NULL
FLOATNOT NULL
Format ---,---,---,---,--9 (explicit) ---,---,---,---,--9 (explicit)
Associated View AllSpace[X]DiskSpace[X]TableSize[X]
AllSpaceV[X]DiskSpaceV[X]TableSizeV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 237
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 Database administrator to clear this field.
Data Type Compatibility View Unicode View
FLOATNOT NULL
FLOATNOT NULL
Format ---,---,---,---,--9 (explicit) ---,---,---,---,--9 (explicit)
Associated View AllSpace[X]DiskSpace[X]
AllSpaceV[X]DiskSpaceV[X]
PeakTemp Returns the peak number of bytes used at one time by a temporary table per vproc.
Note: The ClearPeakDisk macro allows the Teradata Database administrator to clear this field.
Data Type Compatibility View Unicode View
FLOATNOT NULL
FLOATNOT NULL
Format ---,---,---,---,--9 (explicit) ---,---,---,---,--9 (explicit)
Associated View AllSpace[X]DiskSpace[X]
AllSpaceV[X]DiskSpaceV[X]
PermSpace Returns an integer indicating the total space allocated to the database on all AMPs.
Data Type Compatibility View Unicode View
FLOATNOT NULL
FLOATNOT NULL
Format ZZZ,ZZZ,ZZZ,ZZZ,ZZ9 (explicit)
ZZZ,ZZZ,ZZZ,ZZZ,ZZ9 (explicit)
Associated View Databases[X] DatabasesV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
238 Data Dictionary
PermSpace(Continued)
Returns an integer that indicates the permanent space allocated to the user.
Data Type Compatibility View Unicode View
FLOATNOT NULL
FLOATNOT NULL
Format ---,---,---,---,--9 (explicit) ---,---,---,---,--9 (explicit)
Associated View Users UsersV
PhyProcessor Returns the physical processor ID for an AMP not affected by the event.
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ZZZZ9 ZZZZ9
Associated View Events_Configuration[X]RCC_Configuration[X]
Events_ConfigurationV[X]RCC_ConfigurationV[X]
Platform Returns the platform of the system on which the object is compiled.
This flag is significant when the system has performed a restore operation from a different platform. It determines whether a function object is valid or compatible with the current platform.
The following values are used:
• MPRAS = MP-RAS UNIX system
• W2K = Microsoft Windows
Data Type Compatibility View Unicode View
CHAR(8)LATINUPPERCASENOT NULL
CHAR(8)LATINUPPERCASENOT NULL
Format X(8) X(8)
Associated View Functions[X]ExternalSPs[X]
FunctionsV[X]ExternalSPsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 239
PMA Identifies the Processor Module Assembly (PMA) on which the event occurred.
Data Type Compatibility View Unicode View
INTEGERNOT NULL
INTEGERNOT NULL
Format ZZ9-99 ZZ9-99
Associated View Software_Event_Log Software_Event_LogV
PrepareCount Returns the single character field representing the Prepare Count statistical option.
The following codes are used:
• Y = the PrepareCount option is selected for the statistical function.
• N = the PrepareCount option is not selected.
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASE
CHAR(1)LATINUPPERCASE
Format X(1) X(1)
Associated View Functions[X] FunctionsV[X]
PrimaryKeyIndexId Returns information about the identification of the table used as the primary index.
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ---,--9 ---,--9
Associated View Tables[X] TablesV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
240 Data Dictionary
ProcessorState Returns D (the event was for all AMPs and the processor was down) or U (the event was for specific AMPs).
Data Type Compatibility View Unicode View
CHAR(1)LATINNOT NULL
CHAR(1)LATINNOT NULL
Format X(1) X(1)
Associated View Events_Configuration[X]RCC_Configuration[X]
Events_ConfigurationV[X]RCC_ConfigurationV[X]
ProcID Returns the processor ID of the dispatcher.
Data Type Compatibility View Unicode View
DECIMAL(5,0)NOT NULL
DECIMAL(5,0)NOT NULL
Format -(5)9 -(5)9
Associated View QryLogQryLogObjectsQryLogSummaryQryLogStepsQryLogSQLQryLogExplainQryLogTDWMSumQryLogExceptionsQryLogEventsQryLogTDWMQryLogEventHis
QryLogVQryLogObjectsVQryLogSummaryVQryLogStepsVQryLogSQLVQryLogExplainVQryLogTDWMSumVQryLogExceptionsVQryLogEventsVQryLogTDWMVQryLogEventHisV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 241
ProfileCat(Title: Cat)
Returns the cost profile category.
The following are the values:
F = profile instances which are fixed and cannot be changed
V = profile instances which can be modified
Data Type CHAR(1)
Format X(1)
Associated View CostProfiles_v
Returns the constant category.
For legacy and subops profile types, the constant categories are:
• C = the constant is a cost prediction parameter
• I = the constant is an initialization parameter
Data Type CHAR(1)NOT NULL
Format X(1)
Associated View CostProfileValues_v
ProfileDesc(Title: Description)
Returns the description of the profile.
Data Type VARCHAR(2048)
Format X(2048)
Associated View CostProfiles_v
ProfileId(Title: P-Id)
Returns the unique number assigned to the cost profile instance in the system.
Data Type INTEGERNOT NULL
Format -----9
Associated View CostProfileValues_v
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
242 Data Dictionary
ProfileId Returns the profile ID.
Data Type Compatibility View Unicode View
BYTE(4) BYTE(4)
Format X(8) X(8)
Associated View QryLogQryLogSummary
QryLogVQryLogSummaryV
Returns the unique number assigned to the cost profile instance in the system.
Data Type INTEGERNOT NULL
Format --------9 (explicit)
Associated View CostProfiles_v
ProfileName Returns the name of the profile.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1NOT NULL
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View ProfileInfo[X] ProfileInfoV[X]
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View UsersSessionInfo[X]
UsersVSessionInfoV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 243
ProfileName(Title: Profile Name)
Returns the unique name assigned to the cost profile instance in the system.
Data Type CHAR(30)LATIN/KANJI1NOT NULL
Format X(30)
Associated View CostProfiles_v
ProfileTypeDesc(Title: Description)
Returns the description of the profile.
Data Type VARCHAR(2048)
Format X(2048)
Associated View CostProfileTypes_v
ProfileTypeName(Title: Type Name)
Returns the name for each cost profile type.
Data Type CHAR(30) NOT NULL
Format X(30)
Associated View CostProfileTypes_v
Data Type CHAR(30) NOT NULL
Format X(15) (explicit)
Associated View CostProfiles_v
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
244 Data Dictionary
ProtectionType Returns F (Fallback) or N (None) to indicate whether the tables in the database are protected by the Fallback option.
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View Databases[X]Tables[X]Users
DatabasesV[X]TablesV[X]UsersV
QueryBand Returns the band under which the query is submitted.
Data Type Compatibility View Unicode View
VARCHAR(6160)UNICODE
VARCHAR(6160)UNICODE
Format X(6160) X(6160)
Associated View QryLogAccesslog
QryLogVAccesslogV
Returns the query band assigned to the session.
Data Type Compatibility View Unicode View
VARCHAR(2048)UNICODE
VARCHAR(2048)UNICODE
Format X(2048) X(2048)
Associated View SessionInfo[X] SessionInfoV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 245
QueryCount Returns the number of queries run in a 10-minute interval. Used with the "SUMMARY" or "THRESHOLD" SQL option only.
Data Type Compatibility View Unicode View
INTEGER NOT NULL
INTEGER NOT NULL
Format --,---,---,--9 --,---,---,--9
Associated View QryLogSummary QryLogSummaryV
QueryID Returns an ID for identification of query.
Data Type Compatibility View Unicode View
DECIMAL (18,0)NOT NULL
DECIMAL (18,0)NOT NULL
Format -Z(17)9 -Z(17)9
Associated View QryLogQryLogObjectsQryLogStepsQryLogSQLQryLogExplainQryLogExceptionsQryLogTDWM
QryLogVQryLogObjectsVQryLogStepsVQryLogSQLVQryLogExplainVQryLogExceptionsVQryLogTDWMV
QuerySeconds Returns the total number of seconds used by QueryCount. QuerySeconds can be used to obtain an average.
Data Type Compatibility View Unicode View
FLOATNOT NULL
FLOATNOT NULL
Format ----,---,---,---,--9.999 ----,---,---,---,--9.999
Associated View QryLogSummary QryLogSummaryV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
246 Data Dictionary
QueryText Returns the query text. The default size is 200 characters.
Data Type Compatibility View Unicode View
VARCHAR(10000)UNICODE
VARCHAR(10000)UNICODE
Format X(10000) X(10000)
Associated View QryLog QryLogV
QueueFlag Stores the queuing option for the table from the values listed below.
• Y = Yes (queuing option is set)
• N = No (queuing option is not set)
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View Tables[X] TablesV[X]
RepStatus These are the possible values:
• C = connected
• D = defined
• F = failed
• S = suspended
• T = terminated
• I = Initiated
• NULL
Data Type Compatibility View Unicode View
CHAR(1)LATIN UPPERCASE
CHAR(1)LATIN UPPERCASE
Format X(1) X(1)
Associated View Tables[X] TablesV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 247
RequestNum Returns the request number for the query.
Data Type Compatibility View Unicode View
INTEGER NOT NULL
INTEGER NOT NULL
Format --,---,---,--9 --,---,---,--9
Associated View QryLog QryLogV
Returns the request number of the query that has an exception.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View QryLogExceptions QryLogExceptionsV
RequestText Returns the text of the most recent data definition statement that was used to change the table, view, join index, trigger, macro, user-defined types, user-defined methods, or user defined function.
Data Type Compatibility View Unicode View
VARCHAR(12,500)UNICODE
VARCHAR(12,500)UNICODE
Format X(255) X(255)
Associated View Tables[X] TablesV[X]
Returns the actual request text that was used to create the trigger.
Data Type Compatibility View Unicode View
VARCHAR(12,500)UNICODE
VARCHAR(12,500)UNICODE
Format X(255) X(255)
Associated View Triggers[X] TriggersV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
248 Data Dictionary
RequestText(Continued)
Returns the text of the most recent data definition statement used to change the table, view, or macro.
Data Type Compatibility View Unicode View
VARCHAR(32000) per rowUNICODE
VARCHAR(32000) per rowUNICODE
Format X(255) X(255)
Associated View TableText[X] TableTextV[X]
ResolvingUserLogonName Returns the identity of the user who resolved the in-doubt transaction.
Data Type Compatibility View Unicode View
CHAR (30)LATINNOT NULL
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View DeleteOldInDoubtInDoubtLog
DeleteOldInDoubtVInDoubtLogV
RestartSeqNum Returns an integer (0 through n) to indicate the number of times that the Teradata Database had to be restarted during the event. 0 indicates that no restarts took place.
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ---,--9 ---,--9
Associated View Events[X]Events_Configuration[X]
EventsV[X]Events_ConfigurationV[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.
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ---,--9 ---,--9
Associated View RCC_Configuration[X] RCC_ConfigurationV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 249
RestrictedWord Returns a default list of restricted word.
For a complete list of restricted words, see SQL Reference: Fundamentals.
Data Type Compatibility View Unicode View
VARCHAR(60)UNICODEUPPERCASENOT NULL
VARCHAR(60)UNICODEUPPERCASENOT NULL
Format X(128) X(128)
Associated View RestrictedWords RestrictedWordsV
RoleName Returns the name of a role.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View RoleMembers[X]AllRoleRightsUserRoleRightsRoleInfo[X]
RoleMembersV[X]AllRoleRightsVUserRoleRightsVRoleInfoV[X]
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View Users UsersV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
250 Data Dictionary
RoutineKind Returns a single character indicating the family of the routine.
These are the values:
R = Regular Function
C = Constructor
O = Observer
M = Mutator
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASE NOT NULL
CHAR(1)LATINUPPERCASE NOT NULL
Format X(1) X(1)
Associated View Functions[X]ExternalSPs[X]
FunctionsV[X]ExternalSPsV[X]
RowCount Returns the number of rows inserted for the MultiLoad EXE step and the Merge Row Multiple (MRM) step.
For other steps, RowCount is the number of rows returned by the step.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ----,---,---,---,--9 ----,---,---,---,--9
Associated View QryLogSteps QryLogStepsV
RowCount2 Returns the number of rows updated by the MultiLoad EXE step or the MRM step.
For FastLoad LFI step, RowCount2 is the number of rows loaded by the step.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ----,---,---,---,--9 ----,---,---,---,--9
Associated View QryLogSteps QryLogStepsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 251
RowCount3 Returns the number of rows deleted by the MultiLoad EXE step.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ----,---,---,---,--9 ----,---,---,---,--9
Associated View QryLogSteps QryLogStepsV
RowsWComprColumns For each step, the system returns the number of rows which contains at least one compressed column.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ----,---,---,---,--9 ----,---,---,---,--9
Associated View QryLogSteps QryLogStepsV
RuleID Returns the rule ID that caused TDWM to reject a query or logon.
Note: This field is not populated in all cases.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View QryLogExceptions QryLogExceptionsV
RunUnitId Returns the identity of the run unit that had the in-doubt transaction.
Data Type Compatibility View Unicode View
VARBYTE(30)NOT NULL
VARBYTE(30)NOT NULL
Format X(60) X(60)
Associated View DeleteOldInDoubtInDoubtLog
DeleteOldInDoubtVInDoubtLogV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
252 Data Dictionary
ScopeValue Identifies the scope of the event from the values listed below.
1 - System level
2 - Session level
3 - Request level
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format --9 --9
Associated View QryLogEvents QryLogEventsV
SeqNumber Returns column sequence numbers derived from the field ID. The output is sorted in the order of the sequence numbers.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ---,--9 ---,--9
Associated View ColumnStats ColumnStatsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 253
SessionID Returns the session identifier.
Data Type Compatibility View Unicode View
INTEGERNOT NULL
INTEGERNOT NULL
Format --,---,---,--9 --,---,---,--9
Associated View QryLogQryLogSummary
QryLogVQryLogSummaryV
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View QryLogEvents QryLogEventsV
Returns the session identifier under which the exception occurred.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View QryLogExceptions QryLogExceptionsV
SessionNo Returns the session identifier assigned to the session by the TDP or LAN interface.
Data Type Compatibility View Unicode View
INTEGERNOT NULL
INTEGERNOT NULL
Format --,---,---,--9 --,---,---,--9
Associated View AccessLogLogOnOff[X]SessionInfo[X]AllTempTables[X]CSPSessionInfo
AccessLogVLogOnOffV[X]SessionInfoV[X]AllTempTablesV[X]CSPSessionInfoV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
254 Data Dictionary
SessionNumber
Note: SessionID, SessionNo, and SessionNumber have the same meaning.
Returns the session identifier of the session that had the in-doubt transaction.
Data Type Compatibility View Unicode View
INTEGERNOT NULL
INTEGERNOT NULL
Format --,---,---,--9 --,---,---,--9
Associated View DeleteOldInDoubtInDoubtLog
DeleteOldInDoubtVInDoubtLogV
Severity The Severity option returns a code identifying the severity of a software event. Possible values are as follows:
• 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)
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ZZ9 ZZ9
Associated View Software_Event_Log Software_Event_LogV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 255
SLGMet Indicates that the query met the Service Level Goals (SLG) of the workload definition.
Data Type Compatibility View Unicode View
CHAR(1)LATIN
CHAR(1)LATIN
Format X(1) X(1)
Associated View QryLogTDWM QryLogTDWMV
SpecificName Returns the specific (unique) name of a function.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View Functions[X] FunctionsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
256 Data Dictionary
SpoolSpace Returns an integer indicating the maximum spool space allowed for the database. SpoolSpace is 0 if DatabaseName is PUBLIC.
Data Type Compatibility View Unicode View
FLOATNOT NULL
FLOATNOT NULL
Format ZZZ,ZZZ,ZZZ,ZZZ,ZZ9 (explicit)
ZZZ,ZZZ,ZZZ,ZZZ,ZZ9 (explicit)
Associated View Databases[X] DatabasesV[X]
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ---,---,---,---,--9 (explicit) ---,---,---,---,--9 (explicit)
Associated View Users UsersV
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ----,---,---,---,--9 ----,---,---,---,--9
Associated View ProfileInfo[X] ProfileInfoV[X]
SpoolUsage Returns the number of bytes used for spooling in the query or the step.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ----,---,---,---,--9 ----,---,---,---,--9
Associated View QryLogQryLogSteps
QryLogVQryLogStepsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 257
SPParameterType Returns the data type of a stored procedure parameter and is also used as the data type of a UDF/UDM.
Possible types are:
I = IN parameter
O = OUT parameter
B = INOUT parameter (for Stored Procedure only)
E = External Result parameter
C = Return column for Table Function
S = SELF parameter
Data Type Compatibility View Unicode View
CHAR(1)LATINNOT NULL
CHAR(1)LATINNOT NULL
Format X(1) X(1)
Associated View Columns[X] ColumnsV[X]
SQLFlag(Title: SQL)
The following codes are used:
• T = SQL text is stored in DBC.DBQLSqlTbl
• F = SQL text is not stored in DBC.DBQLSqlTbl
Up to 10,000 characters can be stored in DBC.DBQLogTbl.
Data Type Compatibility View Unicode View
CHAR(1)LATINNOT NULL
CHAR(1)LATINNOT NULL
Format X(1) X(1)
Associated View DBQLRules DBQLRulesV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
258 Data Dictionary
SqlRowNo Needed in case multiple rows are used for SQL.
If the additional SQL text is greater than 64KB, the system generates multiple rows.
Data Type Compatibility View Unicode View
INTEGER NOT NULL
INTEGER NOT NULL
Format --,---,---,--9 --,---,---,--9
Associated View QryLogSQL QryLogSQLV
SqlTextInfo Returns a full SQL text segment.
Data Type Compatibility View Unicode View
VARCHAR (31000) UNICODENOT NULL
VARCHAR (31000) UNICODENOT NULL
Format X(31000) X(31000)
Associated View QryLogSQL QryLogSQLV
SrcFileLanguage Returns the programming language used in the function source file.
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View Functions[X]ExternalSPs[X]
FunctionsV[X]ExternalSPsV[X]
StartColTime Indicates the time at the start of the summary interval.
Data Type Compatibility View Unicode View
TIMESTAMP(2)NOT NULL
TIMESTAMP(2)NOT NULL
Format YYYY-MM-DDBHH:MI:SS.S(F)Z YYYY-MM-DDBHH:MI:SS.S(F)Z
Associated View QryLogTDWMSum QryLogTDWMSumV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 259
StartMBox Returns the client/server mailbox ID where the SQL request is sent.
Data Type Compatibility View Unicode View
BYTE BYTE
Format X(20) X(20)
Associated View CSPSessionInfo CSPSessionInfoV
StartTime Returns the time the query is submitted.
Data Type Compatibility View Unicode View
TIMESTAMP(2) NOT NULL
TIMESTAMP(2) NOT NULL
Format YYYY-MM-DDBHH:MI:SS.S(F)Z
YYYY-MM-DDBHH:MI:SS.S(F)Z
Associated View QryLog QryLogV
StartupString Returns the startup string (macro or SQL statement) specified for the user.
Data Type Compatibility View Unicode View
VARCHAR(255)UNICODE
VARCHAR(255)UNICODE
Format X(255) X(255)
Associated View Users UsersV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
260 Data Dictionary
StatementType Returns the type of statement issued by the query.
The statement uses a 20 character field to describe each query.
Data Type Compatibility View Unicode View
VARCHAR(20)LATINNOT NULL
VARCHAR(20)LATINNOT NULL
Format X(20) X(20)
Associated View AccessLog AccessLogV
Data Type Compatibility View Unicode View
CHAR(20)LATIN
CHAR(20)LATIN
Format X(20) X(20)
Associated View QryLog QryLogV
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.
Data Type Compatibility View Unicode View
VARCHAR (8192)UNICODE
VARCHAR (8192)UNICODE
Format X(8192) X(8192)
Associated View AccessLog AccessLogV
StatisticsId Returns the internal number assigned to the statistics.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ---,--9 ---,--9
Associated View MultiColumnStats MultiColumnStatsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 261
StepFlag(Title: Step)
The following codes are used:T = Step-level data is stored in DBC.DBQLStepTblF = Step-level data is not provided in DBC.DBQLStepTbl
Data Type Compatibility View Unicode View
CHAR(1)LATINNOT NULL
CHAR(1)LATINNOT NULL
Format X(1) X(1)
Associated View DBQLRules DBQLRulesV
StepLev1Num Returns the level 1 step number.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ---,--9 ---,--9
Associated View QryLogSteps QryLogStepsV
StepLev2Num Returns the level 2 step number.
For parallel steps, the second level number is the indication that it is a parallel step. For example, the step number for the first parallel step of step 4 would read “04 01.”
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ---,--9 ---,--9
Associated View QryLogSteps QryLogStepsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
262 Data Dictionary
StepName Returns an abbreviation of the step name.
For example: DEL for delete step.
Data Type Compatibility View Unicode View
CHAR(6)LATIN NOT NULL
CHAR(6)LATIN NOT NULL
Format X(6) X(6)
Associated View QryLogSteps QryLogStepsV
StepStartTime Returns the date and time the step is sent to the AMP.
Data Type Compatibility View Unicode View
TIMESTAMP(6) TIMESTAMP(6)
Format YYYY-MM-DDBHH:MI:SS.S(F)Z YYYY-MM-DDBHH:MI:SS.S(F)Z
Associated View QryLogSteps QryLogStepsV
StepStopTime Returns the date and time the step returns from the AMP.
Data Type Compatibility View Unicode View
TIMESTAMP(6) TIMESTAMP(6)
Format YYYY-MM-DDBHH:MI:SS.S(F)Z YYYY-MM-DDBHH:MI:SS.S(F)Z
Associated View QryLogSteps QryLogStepsV
StepWD Returns the identifier of the workload for the step.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View QryLogSteps QryLogStepsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 263
SubjectTableDatabaseName Returns the name of the database or user in which the subject table of the trigger resides.
You can use this to check for potential orphan triggers.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View Triggers[X] TriggersV[X]
SummaryFlag(Title: Summary)
The following codes are used:T = Summary information is stored in DBC.DBQLSummaryTblF = Data is not summarized
Data Type Compatibility View Unicode View
CHAR(1)LATINNOT NULL
CHAR(1)LATINNOT NULL
Format X(1) X(1)
Associated View DBQLRules DBQLRulesV
SummaryVal1(Title: Summary//Low)
Returns the Threshold value if ThresholdFlag is True.
Returns the high value for interval 1 if SummaryFlag is True.
The value can be in seconds, IOs, or hundredths of CPU seconds (see ThreshValue).
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ---,--9 ---,--9
Associated View DBQLRules DBQLRulesV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
264 Data Dictionary
SummaryVal2(Title: Med)
Returns the high value for interval 2 if SummaryFlag is True
The value can be in seconds, IOs, or hundredths of CPU seconds (see ThreshValue).
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ---,--9 ---,--9
Associated View DBQLRules DBQLRulesV
SummaryVal3(Title: High)
Returns the high value for interval 3 if SummaryFlag is True.
This same value is used for interval 4.
The value can be in seconds, IOs, or hundredths of CPU seconds (see ThreshValue).
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ---,--9 ---,--9
Associated View DBQLRules DBQLRulesV
SW_Version(Title: SW Version)
Identifies the software version running at the time the event was logged.
Data Type Compatibility View Unicode View
VARCHAR(64)LATIN
VARCHAR(64)LATIN
Format X(64) X(64)
Associated View Software_Event_Log Software_Event_LogV
SysConID Returns the ID of the system condition currently activated by TDWM.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View QryLogExceptionsQryLogTDWMQryLogEventsQryLogTDWMSum
QryLogExceptionsVQryLogTDWMVQryLogEventsVQryLogTDWMSumV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 265
TableKind Returns the table type as one of the following:
• A = Aggregate function
• B = Combined aggregate and ordered analytical function
• D = JAR
• E = External Stored Procedure
• F = Standard function
• G = Trigger
• H = Instance or Constructor Method
• I = Join Index
• J = Journal
• M = Macro
• N = Hash Index
• P = SQL Procedure
• Q = Queue Table
• R = Table function
• S = Ordered analytical function
• T = Table
• U = User-defined data type
• V = View
• X = Authorization
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASE NOT NULL
CHAR(1)LATINUPPERCASE NOT NULL
Format X(1) X(1)
Associated View Tables[X]TableText[X]Authorizations[X]
TablesV[X]TableTextV[X]AuthorizationsV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
266 Data Dictionary
TableName Returns the name of a table, view, stored procedure, trigger, macro, user-defined types, user-defined methods, or user-defined function on which a privilege was granted.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View AllRights[X] AllRightsV[X]
Returns the name of a table, join index, or hash index.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View AllSpace[X]Indices[X]Tables[X]TableSize[X]AllRoleRightsUserRoleRightsTableText[X]MultiColumnStatsRepTables[X]
AllSpaceV[X]IndicesV[X]TablesV[X]TableSizeV[X]AllRoleRightsVUserRoleRightsVTableTextV[X]MultiColumnStatsVRepTablesV[X]
Returns the name of a table, view, stored procedure, or macro.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View Columns[X]UserGrantedRightsUserRights
ColumnsV[X]UserGrantedRightsVUserRightsV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 267
TableName(Continued)
Returns the imported object name.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View Association[X] AssociationV[X]
Returns the name of the table affected by the event. If the object is a database, then the value is set to NULL.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View Events[X] EventsV[X]
Returns the name of a data table that has change images recorded in a journal table.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View Journals[X] JournalsV[X]
Returns the name of the table, view, stored procedure, or macro for this log entry.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View SecurityLog[X] SecurityLogV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
268 Data Dictionary
TableName(Continued)
Returns the name of a table having column-level check constraints.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View ShowColChecks[X] ShowColChecksV[X]
Returns the name of a table having table-level check constraints.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View ShowTblChecks[X]Table_LevelConstraints[X]
ShowTblChecksV[X]Table_LevelConstraintsV[X]
Returns the name of the table the trigger is defined against.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View Triggers[X] TriggersV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 269
TableName(Continued)
Returns the name of the table containing the column for which statistics are requested.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View ColumnStatsIndexStats
ColumnStatsVIndexStatsV
Returns the name of the table on which the index is built.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View IndexConstraints[X] IndexConstraintsV[X]
Tables_DB Returns the name of the database in which a data table resides that has change images written to a journal table.
Data Type Compatibility View Unicode View
CHAR(30)LATIN
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View Journals[X] Journals[X]
Task Returns the unique task number assigned to each task as it is created for execution.
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ZZZZ9 ZZZZ9
Associated View Software_Event_Log Software_Event_Log
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
270 Data Dictionary
TblCheck Returns the unresolved text for the table-level check condition.
Data Type Compatibility View Unicode View
VARCHAR(8192)LATINCASESPECIFIC
VARCHAR(8192)UNICDOECASESPECIFIC
Format X(8192) X(256)
Associated View ShowTblChecks[X] ShowTblChecksV[X]
TDWMAllAmpFlag Indicates whether one of the steps in the query was an all-AMP step.
Data Type Compatibility View Unicode View
CHAR(1)LATIN
CHAR(1)LATIN
Format X(1) X(1)
Associated View QryLogTDWM QryLogTDWMV
TDWMConfLevelUsed Returns the minimum confidence level that TDWM is allowed to use in looking at estimated data.
Data Type Compatibility View Unicode View
CHAR(1)LATIN
CHAR(1)LATIN
Format X(1) X(1)
Associated View QryLogTDWM QryLogTDWMV
TDWMEstLastRows Returns the estimated last step row number as generated by the Optimizer.
This column is used to classify queries into workload definition.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ----,---,---,---,--9 ----,---,---,---,--9
Associated View QryLogTDWM QryLogTDWMV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 271
TDWMEstMaxRows Returns the estimated maximum rows as generated by the Optimizer.
This column is used to classify queries into workload definition.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ----,---,---,---,--9 ----,---,---,---,--9
Associated View QryLogTDWM QryLogTDWMV
TDWMEstTotalTime Returns the estimated total time as generated by the Optimizer.
This column is used to classify queries into workload definition.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ZZZZ9.999999 (explicit) ZZZZ9.999999 (explicit)
Associated View QryLogTDWM QryLogTDWMV
TempSpace Returns the maximum temporary space allocated for a database, profile, or user in bytes.
Data Type Compatibility View Unicode View
FLOAT NOT NULL
FLOAT NOT NULL
Format ZZZ,ZZZ,ZZZ,ZZZ,ZZ9 (explicit)
ZZZ,ZZZ,ZZZ,ZZZ,ZZ9 (explicit)
Associated View Databases[X] DatabasesV[X]
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ---,---, ---,---,--9 (explicit) ---,---, ---,---,--9 (explicit)
Associated View Users UsersV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
272 Data Dictionary
TempSpace(Continued)
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ----,---, ---,---,--9 ----,---, ---,---,--9
Associated View ProfileInfo[X] ProfileInfoV[X]
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 the 255-character field.
Data Type Compatibility View Unicode View
VARCHAR(8192)UNICODE
VARCHAR(8192)UNICODE
Format X(8192) X(8192)
Associated View SecurityLog[X] SecurityLogV[X]
Text(Title: Message Text)
Returns the text associated with the logged event.
Data Type Compatibility View Unicode View
VARCHAR(30000)LATIN/KANJI1NOT NULL
VARCHAR(30000)UNICODENOT NULL
Format X(30000) X(255)
Associated View Software_Event_Log Software_Event_LogV
TextSizeLimit(Title: TextSize)
Returns the number of characters of SQL text to be stored in the DBQLogTbl.
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---, ---,--9 --,---, ---,--9
Associated View DBQLRules DBQLRulesV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 273
TheDate(Title: Date)
Returns the calendar date on which the event was logged.
Data Type Compatibility View Unicode View
DATE NOT NULL
DATE NOT NULL
Format YY/MM/DD YY/MM/DD
Associated View Software_Event_Log Software_Event_LogV
TheFunction(Title: Function)
Returns the identification string for the entity reporting a software event.
Data Type Compatibility View Unicode View
VARCHAR(32)LATIN
VARCHAR(32)LATIN
Format X(32) X(32)
Associated View Software_Event_Log Software_Event_LogV
TheTime(Title: Time)
Returns the clock time at which the event was logged, based on a 24-hour clock (hh:mm:ss).
Data Type Compatibility View Unicode View
FLOAT NOT NULL
FLOAT NOT NULL
Format 99:99:99.999999 99:99:99.999999
Associated View Software_Event_Log Software_Event_LogV
ThresholdFlag(Title: Threshold)
The following codes are used:
T=Count queries shorter or equal to SummaryVal1 in DBC.DBQLSummaryTbl, detailed data on long queries in DBC.DBQLogTbl.
F=Provide detailed data for all queries in DBC.DBQLogTbl unless SummaryFlag is True.
Data Type Compatibility View Unicode View
CHAR(1)LATINNOT NULL
CHAR(1)LATINNOT NULL
Format X(1) X(1)
Associated View DBQLRules DBQLRulesV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
274 Data Dictionary
ThreshValue(Title: Threshold//Value)
These are the values:
0 = seconds
1 = CPU
2 = I/O criteria
3 = normalized CPU criteria
4 = hundredths of a second criteria
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ---,--9 ---,--9
Associated View DBQLRules DBQLRulesV
TimeZoneHour Returns the format of the time zone as signed integer values from -12:59 to +13:00.
Data Type Compatibility View Unicode View
BYTEINT BYTEINT
Format ---9 ---9
Associated View Users UsersV
TimeZoneMinute Returns the format of the time zone as signed integer values from -12:59 to +13:00.
Data Type Compatibility View Unicode View
BYTEINT BYTEINT
Format ---9 ---9
Associated View Users UsersV
TotalIOCount Returns the number of IOs from AMPs that were generated by the query.
Data Type Compatibility View Unicode View
FLOAT FLOAT
Format ----,---,---,---,--9 ----,---,---,---,--9
Associated View QryLogQryLogSummary
QryLogVQryLogSummaryV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 275
Transaction_Mode Returns one of the following codes to indicate the mode of the session:
• T = TDBS
• A = ANSI
Data Type Compatibility View Unicode View
CHAR(1)LATIN
CHAR(1)LATIN
Format X(1) X(1)
Associated View SessionInfo[X] SessionInfoV[X]
TransLog Specifies whether transaction journals are generated. These are the values:
• Y = transaction journals are generated
• N = no logging for transaction journals
Data Type Compatibility View Unicode View
CHAR(1)NOT NULLLATIN
CHAR(1)NOT NULLLATIN
Format X(1) X(1)
Associated View Tables[X] TablesV[X]
TriggerComment Returns the optional comment for the trigger.
Data Type Compatibility View Unicode View
VARCHAR(255)UNICODE
VARCHAR(255)UNICODE
Format X(255) X(255)
Associated View Triggers[X] TriggersV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
276 Data Dictionary
TriggerName Returns the name of the trigger.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View Triggers[X] TriggersV[X]
TVMId Returns the internal ID of the table.
Data Type Compatibility View Unicode View
BYTE(6)NOT NULL
BYTE(6)NOT NULL
Format X(12) X(12)
Associated View Tables2[X] Tables2V[X]
TVMName Returns the table, view, stored procedure, macro, user-defined types, user-defined methods, or user-defined function name of the object for which this log entry was made.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View AccessLog AccessLogV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 277
TVMName(Continued)
Returns the table, view, stored procedure, macro, or user-defined function to which the access logging rule applies.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View AccLogRules AccLogRulesV
Returns the name of the table.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View Tables2[X] Tables2V[X]ArchiveLoggingObjsV[X]
TwoPCMode Returns one of the following codes:
• 2 = 2PC mode
• N = non-2PC mode
Data Type Compatibility View Unicode View
VARCHAR(1)LATIN
VARCHAR(1)LATIN
Format X(1) X(1)
Associated View SessionInfo[X] SessionInfoV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
278 Data Dictionary
TypeofUse Always 0.
Data Type Compatibility View Unicode View
BYTEINT BYTEINT
Format --9 --9
Associated View QryLogObjects QryLogObjectsV
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
Data Type Compatibility View Unicode View
CHAR(1)LATIN UPPERCASE NOT NULL
CHAR(1)LATIN UPPERCASE NOT NULL
Format X(1) X(1)
Associated View Indices[X]IndexStats
Indices[X]IndexStats
UnnamedTblCheckExist Returns an indicator for whether the table has an unnamed table-level check constraint, as follows:
• Y = Yes
• N = No
Data Type Compatibility View Unicode View
CHAR(1)LATIN UPPERCASE NOT NULL
CHAR(1)LATIN UPPERCASE NOT NULL
Format X(1) X(1)
Associated View Tables[X] TablesV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 279
UnResolvedRICount Returns the total number of unresolved Referential Integrity (RI) constraints in the database.
Data Type Compatibility View Unicode View
SMALLINT NOT NULL
SMALLINT NOT NULL
Format ---,--9 ---,--9
Associated View Databases2[X] Databases2[X]
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.
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASE
CHAR(1)LATINUPPERCASE
Format X(1) X(1)
Associated View Columns[X] ColumnsV[X]
UserID Returns the ID of the user.
Data Type Compatibility View Unicode View
BYTE(4) NOT NULL
BYTE(4) NOT NULL
Format X(8) X(8)
Associated View QryLogQryLogTDWM
QryLogVQryLogTDWMV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
280 Data Dictionary
UserID(Continued)
Data Type Compatibility View Unicode View
BYTE(4) BYTE(4)
Format X(8) X(8)
Associated View QryLogSummary QryLogSummaryV
UserLogonDate Returns the date that the specified user logged on.
Data Type Compatibility View Unicode View
DATENOT NULL
DATENOT NULL
Format YY/MM/DD YY/MM/DD
Associated View DeleteOldInDoubtInDoubtLog
DeleteOldInDoubtVInDoubtLogV
UserLogonTime Returns the time that the specified user logged on.
Data Type Compatibility View Unicode View
FLOATNOT NULL
FLOATNOT NULL
Format 99:99:99 99:99:99
Associated View DeleteOldInDoubtInDoubtLog
DeleteOldInDoubtVInDoubtLogV
UserName(Title: Name)
Returns the name or profile of a user.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View AccountInfo[X] AccountInfoV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 281
UserName Returns the name of the user for whom the log entry was made.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View AccessLogSecurityLog[X]
AccessLogVSecurityLogV[X]
Returns the user to which the access logging rule applies; ALL may be specified.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View AccLogRules AccLogRulesV
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.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View AMPUsage[X]Users
AMPUsageV[X]UsersV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
282 Data Dictionary
UserName(Continued)
Returns the name of a user to whom the privilege was granted.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View AllRights[X] AllRightsV[X]
Returns the username associated with the event.
Note: For the DBC.LogOnOff view, when a user tries to log on with a bad username, a username of “Non-existent User” is returned.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View Events[X]Events_Configuration[X]LogOnOff[X]
EventsV[X]Events_ConfigurationV[X]LogOnOffV[X]
Returns the name of the user to whom the rule applies; DEFAULT may be specified.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View LogonRules LogonRulesV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 283
UserName(Continued)
Returns the Teradata Database userid of the user who is currently logged on.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View SessionInfo[X] SessionInfoV[X]
Returns the name of a user space for which a default journal table has been defined.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View User_Default_Journals[X] User_Default_JournalsV[X]
Returns the username associated with the client system utility dump or restore event.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View Events_Media[X] Events_MediaV[X]
Returns the username associated with the client system utility dump or restore event.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View AllTempTables[X] AllTempTablesV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
284 Data Dictionary
UserName(Continued)
Returns the name of the user who issued the query.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODE
Format X(30) X(128)
Associated View QryLogQryLogExceptionsQryLogTDWM
QryLogVQryLogExceptionsVQryLogTDWMV
Returns the name of the user associated with the rule.
Data Type Compatibility View Unicode View
CHAR(30)LATIN/KANJI1
VARCHAR(128)UNICODENOT NULL
Format X(30) X(128)
Associated View DBQLRules DBQLRulesV
UserOrProfile Returns an indication whether the account name is for a user or a profile using the following values:
• User
• Profile
Data Type Compatibility View Unicode View
CHAR(7)UNICODENOT NULL
CHAR(7)UNICODENOT NULL
Format X(7) X(7)
Associated View AccountInfo[X] AccountInfoV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 285
UtilityTableId Returns the table ID for the load utilities.
Data Type Compatibility View Unicode View
BYTE(4) BYTE(4)
Format X(8) X(8)
Associated View QryLogSteps QryLogStepsV
UtilVersion Returns the utility version count.
For more information on UtilVersion, see “Tables[V][X]” on page 416.
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format -----9 (explicit) -----9 (explicit)
Associated View Tables[X] TablesV[X]
ValueType Returns the type that was used to determine the threshold from the values listed below.
C = CPU seconds
I = IO count
S = Elapsed time in seconds
Data Type Compatibility View Unicode View
CHAR(1)LATIN
CHAR(1)LATIN
Format X(1) X(1)
Associated View QryLogSummary QryLogSummaryV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
286 Data Dictionary
Version Returns the version count, which is incremented each time the table is altered with a data definition statement.
Data Type Compatibility View Unicode View
SMALLINTNOT NULL
SMALLINTNOT NULL
Format ZZZZ(9) ZZZZ(9)
Associated View Tables[X] TablesV[X]
Returns the version count, which is incremented each time the authorization is being replaced.
Data Type Compatibility View Unicode View
SMALLINTNOT NULL
SMALLINTNOT NULL
Format ---,--9 ---,--9
Associated View Authorizations[X] AuthorizationsV[X]
VolSequenceNum Returns the sequence number of the volume, which defines the position of the volume in a multi-volume set.
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format ---,--9 ---,--9
Associated View RCC_Media[X]Events_Media[X]
RCC_MediaV[X]Events_MediaV[X]
VolSerialId Returns the unique six character volume serial assigned to a device.
Data Type Compatibility View Unicode View
CHAR(6)LATINNOT NULL
CHAR(6)LATINNOT NULL
Format X(6) X(6)
Associated View Events_Media[X]RCC_Media[X]
Events_MediaV[X]RCC_MediaV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 287
Vproc Identifies the virtual processor for which an event was logged.
Data Type Compatibility View Unicode View
SMALLINT SMALLINT
Format -(5)9 -(5)9
Associated View Events_Configuration[X]RCC_Configuration[X]Software_Event_Log
Events_ConfigurationV[X]RCC_ConfigurationV[X]Software_Event_LogV
Identifies the virtual processor for which an event was logged.
Data Type Compatibility View Unicode View
SMALLINTNOT NULL
SMALLINTNOT NULL
Format -(5)9 -(5)9
Associated View AllSpace[X]AMPUsage[X]DiskSpace[X]TableSize[X]
AllSpaceV[X]AMPUsageV[X]DiskSpaceV[X]TableSizeV[X]
Vproctype Returns the type of Vproc for which an event was logged.
Data Type Compatibility View Unicode View
CHAR(4) LATINNOT NULL
CHAR(4) LATINNOT NULL
Format X(4) X(4)
Associated View AMPUsage[X] AMPUsageV[X]
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
288 Data Dictionary
WarningOnly Returns warning code T for true if the error was reported while running TDWM in the warning mode, or it is not logged at all.
A null '?' is found in the field if WarningOnly is not true.
Data Type Compatibility View Unicode View
CHAR(1) LATIN
CHAR(1) LATIN
Format X(1) X(1)
Associated View QryLogQryLogExceptions
QryLogVQryLogExceptionsV
WDID Returns the workload definition under which the query was classified.
Data Type Compatibility View Unicode View
INTEGERNOT NULL
INTEGERNOT NULL
Format --,---,---,--9 --,---,---,--9
Associated View QryLogTDWMSum QryLogTDWMSumV
Data Type Compatibility View Unicode View
INTEGER INTEGER
Format --,---,---,--9 --,---,---,--9
Associated View QryLogTDWMQryLogEventsQryLogExceptions
QryLogTDWMVQryLogEventsVQryLogExceptionsV
WDOverride Indicates that the workload definition was overridden by the user.
Data Type Compatibility View Unicode View
CHAR(1)LATIN
CHAR(1)LATIN
Format X(1) X(1)
Associated View QryLogTDWM QryLogTDWMV
Column Name Description
Chapter 2: System ViewsSystem Views Columns Reference
Data Dictionary 289
WhenGranted Returns the date a role was granted.
Data Type Compatibility View Unicode View
TIMESTAMP(0) TIMESTAMP(0)
Format YYYY-MM-DDBHH:MI:SS YYYY-MM-DDBHH:MI:SS
Associated View RoleMembers[X] RoleMembersV[X]
WithAdmin Returns 'Y' if Admin Option comes with the role grant; otherwise, the value is ‘N.’
Data Type Compatibility View Unicode View
CHAR(1)LATINUPPERCASENOT NULL
CHAR(1)LATINUPPERCASENOT NULL
Format X(1) X(1)
Associated View RoleMembers[X] RoleMembersV[X]
Column Name Description
Data Dictionary 291
CHAPTER 3 System Views: Usage andExamples
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]”
• Unicode version is shown in the form “ViewName [V]”
• User Type
• 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 Database documents that can provide additional information about this view
The output of some views extends beyond an 80-character display. To see all the columns, the user has to do either of the following:
• Cast the name columns to shorter lengths
• Use the SET FOLDLINE and SET SIDETITLES options in BTEQ
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 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.
Chapter 3: System Views: Usage and ExamplesAccessLog[V]
292 Data Dictionary
AccessLog[V]
Returns logging entries generated by the application of access logging rules (see AccLogRules[V]).
Corresponding System Table
The corresponding system table for DBC.AccessLog[V] 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[V]).
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[V] Teradata DatabaseSecurity Administrator
LogDateLogTimeLogonDateLogonTimeLogicalHostIdIFPNoSessionNoUserNameAccountName (expanded)OwnerNameAccessTypeFrequencyEventCountAccLogResultDatabaseNameTVMNameColumnNameStatementTypeStatementTextQueryBand
Chapter 3: System Views: Usage and ExamplesAccessLog[V]
Data Dictionary 293
==> SELECT LogDate, UserName, AccessType, StatementText FROM DBC.AccessLog WHERE LogDate = 890510;
LogDate UserName AccessType StatementText-------- -------- ---------- ------------------------------
89/05/10 Jones CT CREATE TABLE Jones.EmpDup (Em
Chapter 3: System Views: Usage and ExamplesAccLogRules[V]
294 Data Dictionary
AccLogRules[V]
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.
View Name User Type Columns Selected
DBC.AccLogRules[V] Teradata DatabaseSecurity Administrator
UserNameDatabaseNameTVMNameAcrAlterFunctionAcrCheckpoint AcrCreateDatabaseAcrCreateFunction AcrCreateMacroAcrCreateTable AcrCreateUser AcrCreateView AcrCreateProcedure AcrCreExtProcedureAcrDelete AcrDropDatabase AcrDropFunction AcrDropMacro AcrDropTable AcrDropUser AcrDropView AcrDropProcedure AcrDump AcrExecute AcrExecuteFunction AcrExecuteProcedure AcrGrant AcrIndex AcrInsert AcrReference AcrRestore AcrSelect AcrUpdate AcrCreateTrigger AcrDropTrigger AcrCreateRole AcrDropRole AcrCreateProfile AcrDropProfile AcrAlterProcedure AcrAlterExtProcedure AcrRepControl
Chapter 3: System Views: Usage and ExamplesAccLogRules[V]
Data Dictionary 295
Corresponding System Tables
The corresponding system tables for DBC.AccLogRules[V] are:
• DBC.AccLogRuleTbl
• DBC.DBase
• DBC.TVM
Usage Notes
The underlying table of this view is populated only if the security macro is installed and the Teradata Database 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 AccLogRules[V]).
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:
a B Both FIRST and LAST occurrences are to be logged.
b E Each occurrence is to be logged.
c F FIRST occurrence is to be logged.
d L LAST occurrence is to be logged.
e 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).
a B Both FIRST and LAST occurrences are to be logged.
DBC.AccLogRules[V](Continued)
Teradata DatabaseSecurity Administrator
AcrUDTUsage AcrUDTType AcrUDTMethod AcrCreAuthorization AcrDropAuthorization CreatorNameCreateTimeStamp
View Name User Type Columns Selected
Chapter 3: System Views: Usage and ExamplesAccLogRules[V]
296 Data Dictionary
b E Each occurrence is to be logged.
c F FIRST occurrence is to be logged.
d L LAST occurrence is to be logged.
e 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.
a - Save text only for Denial entries.
b + Save text for all entries.
c = Save text for all entries (specified in multiple BEGIN LOGGING statements).
d 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:
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 CUSJones Jones All E ...
Jones Personnel All F - ...
Chapter 3: System Views: Usage and ExamplesAccountInfo[V][X]
Data Dictionary 297
AccountInfo[V][X]
The AccountInfo view provides information about valid accounts.
Corresponding System Tables
The corresponding system tables for DBC.AccountInfo[V] are:
• DBC.Accounts
• DBC.DBase
• DBC.Profiles
The corresponding system tables for DBC.AccountInfo[V]X are:
• DBC.Accounts
• DBC.AccessRights
• DBC.DBase
• DBC.Owners
• DBC.Profiles
This view also references the DBC.userdb view.
Example
==> SELECT * FROM DBC.AccountInfo;
Name AccountName UserOrProfile------------- ------------- --------------DBC DBC UserCONSOLE DBC UserSystemFe SystemFe UserCrashdumps Crashdumps UserTDPUSER $H UserSysAdmin SysAdmin UserSys_Calendar Sys_Calendar UserV2R5IN DBC User
Related Topics
See Database Design for more information on controlling access, space, and ownership.
See SessionInfo[X] for the current account name (unexpanded) in effect for a session.
View Name User Type Columns Selected
DBC.AccountInfo[V][X] Supervisory
Teradata DatabaseAdministrator
[X]End User
UserNameAccountNameUserOrProfile
Chapter 3: System Views: Usage and ExamplesAccountInfo[V][X]
298 Data Dictionary
See Databases[X] or Users system views to determine the default account name for a user or database.
See Profile[X] fir default account name if set by profile for a user or database.
Chapter 3: System Views: Usage and ExamplesAllRights[V][X]
Data Dictionary 299
AllRights[V][X]
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, macros, user-defined types, user-defined methods, and user-defined functions.
The AllRights view also returns PUBLIC rights.
Corresponding System Tables
The corresponding system tables for DBC.AllRights[V] are:
• DBC.AccessRights
• DBC.DBase
• DBC.TVM
• DBC.TVFields
The corresponding system tables for DBC.AllRights[V]X are:
• DBC.AccessRights
• DBC.DBase
• DBC.Owners
• DBC.TVM
• DBC.TVFields
• DBC.Roles
• DBC.RoleGrants
Usage Notes
The AllRights view does not return information about implicit privileges for a user, only explicit privileges granted on the object. The explicit privileges include the following:
View Name User Type Columns Selected
DBC.AllRights[V][X] Teradata DatabaseAdministrator
UserNameDatabaseNameTableNameColumnNameAccessRightGrantAuthorityGrantorNameAllnessFlagCreatorNameCreateTimeStamp
Chapter 3: System Views: Usage and ExamplesAllRights[V][X]
300 Data Dictionary
• AE = ALTER EXTERNALPROCEDURE
• AF = ALTER FUNCTION
• AP = ALTER PROCEDURE
• AS = ABORT SESSION
• CA = CREATE AUTHORIZATION
• CD = CREATE DATABASE
• CE = CREATE EXTERNAL PROCEDURE
• CF = CREATE FUNCTION
• CG = CREATE TRIGGER
• CM = CREATE MACRO
• CO = CREATE PROFILE
• CP = CHECKPOINT
• CR = CREATE ROLE
• CT = CREATE TABLE
• CU = CREATE USER
• CV = CREATE VIEW
• D = DELETE
• DA = DROP AUTHORIZATION
• DD = DROP DATABASE
• DF = DROP FUNCTION
• DG = DROP TRIGGER
• DM = DROP MACRO
• DO = DROP PROFILE
• DP = DUMP
• DR = DROP ROLE
• DT = DROP TABLE
• DU = DROP USER
• DV = DROP VIEW
• E = EXECUTE
• EF = EXECUTE FUNCTION
• I = INSERT
• IX = INDEX
• MR = MONITOR RESOURCE
• MS = MONITOR SESSION
• PC = CREATE PROCEDURE
• PD = DROP PROCEDURE
• PE = EXECUTE PROCEDURE
• RO = REPLICATION OVERRIDE
Chapter 3: System Views: Usage and ExamplesAllRights[V][X]
Data Dictionary 301
• R = RETRIEVE/SELECT
• RF = REFERENCE
• RS = RESTORE
• SS = SET SESSION RATE
• SR = SET RESOURCE RATE
• U = UPDATE
• UU = UDT Usage
• UT = UDT Type
• UM = UDT Method
Example
The following SELECT statement displays the privileges user Jones has on tables.
==> SELECT Tablename, AccessRight, GrantorNameFROM DBC.AllRights WHERE UserName = ’Jones’;
TableName AccessRight GrantorName---------- ----------- -------------project RS SYSTEMADproject DP SYSTEMADproject DT SYSTEMADproject D SYSTEMADproject I SYSTEMADproject U SYSTEMADproject R SYSTEMADemployee I SYSTEMADemployee U SYSTEMAD
Chapter 3: System Views: Usage and ExamplesAllRoleRights[V]
302 Data Dictionary
AllRoleRights[V]
The AllRoleRights view lists all privileges granted to each role.
Corresponding System Tables
The corresponding system tables for DBC.AllRoleRights[V] are:
• DBC.AccessRights
• DBC.DBase
• DBC.Owners
• DBC.Roles
• DBC.TVM
• DBC.TVFields
Usage Notes
The AllRoleRights view is similar to the AllRights view except that it does not have the following columns:
• AllnessFlag
• CreatorName columns
Example
The following SELECT statement returns all the privileges granted to each role.
==> SELECT CAST(RoleName as CHAR(16)) as RoleName, CAST(DatabaseName as CHAR(15)) as Databases, CAST(TableName as CHAR(15)) as TVMs --,CAST(ColumnName as CHAR(10)) as Columns, CAST(AccessRight as CHAR(5)) as AccRights CAST(GrantorName as CHAR(15)) as Grantor
FROM DBC.AllRoleRights WHERE RoleName like 'roles017%' ORDER BY 1,2,3,5; *** Query completed. 6 rows found. 5 columns returned. *** Total elapsed time was 1 second.
View Name User Type Columns Selected
DBC.AllRoleRights[V] Teradata DatabaseSecurity Administrator
Teradata DatabaseAdministrator
Supervisory
RoleNameDatabaseNameTableNameColumnNameAccessRightGrantorNameCreateTimeStamp
Chapter 3: System Views: Usage and ExamplesAllRoleRights[V]
Data Dictionary 303
RoleName Databases TVMs AccRights Grantor---------------- --------------- --------------- --------- ---------------roles017_dbc_r1b roles017_3_db roles017_3_m3 E roles017_3roles017_r1a roles017_3_db roles017_3_t1 R roles017_3roles017_r1c roles017_3_db roles017_3_t4 R monthlyroles017_r1f roles017_3_db roles017_3_v2 R roles017_3roles017_r2d roles017_3_db roles017_3_v2 R roles017_3roles017_r2e roles017_3_db roles017_3_t5 R monthly
Chapter 3: System Views: Usage and ExamplesAllSpace[V][X]
304 Data Dictionary
AllSpace[V][X]
The AllSpace view provides AMP-by-AMP information about disk space usage (including spool) for each user database, data table, or journal table.
Corresponding System Tables
The corresponding system tables for DBC.AllSpace[V] are:
• DBC.DataBaseSpace
• DBC.DBase
The corresponding system tables for DBC.AllSpace[V]X are:
• DBC.AccessRights
• DBC.DataBaseSpace
• DBC.DBase
• DBC.Owners
• DBC.Roles
• DBC.RoleGrants
• DBC.TVM
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 Database 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
View Name User Type Columns Selected
DBC.AllSpace[V][X] Teradata DatabaseAdministrator
[X]End User
Supervisory
VprocDatabaseNameAccountName (unexpanded)TableNameMaxPermMaxSpoolMaxTempCurrentPermCurrentSpoolCurrentTempPeakPermPeakSpoolPeakTempMaxProfileSpoolMaxProfileTemp
Chapter 3: System Views: Usage and ExamplesAllSpace[V][X]
Data Dictionary 305
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 TableName or DatabaseName, the returned values are double the desired result.
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[V][X] and TableSize[V][X]).
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 FROM DBC.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
Chapter 3: System Views: Usage and ExamplesAllTempTables[V][X]
306 Data Dictionary
AllTempTables[V][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
The corresponding system tables for DBC.AllTempTables[V][X] are:
• DBC.DBase
• DBC.SessionTbl
• DBC.TempTables
• DBC.TVM
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.
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.
View Name User Type Columns Selected
DBC.AllTempTables[V][X] Teradata DatabaseAdministrator
[X]End User
HostNoSessionNoUserNameB_DatabaseNameB_TableNameE_TableId
Chapter 3: System Views: Usage and ExamplesAllTempTables[V][X]
Data Dictionary 307
==> SELECT * FROM DBC.AllTempTablesX;
HostNo SessionNo DatabaseName TableName TableId
52 3,409 TEST GTEMP1 00800A000000
Chapter 3: System Views: Usage and ExamplesAll_RI_Children[V][X]
308 Data Dictionary
All_RI_Children[V][X]
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
The corresponding system tables for DBC.All_RI_Children[V] are:
• DBC.DBase
• DBC.ReferencingTbls
• DBC.TVFields
• DBC.TVM
The corresponding system tables for DBC.All_RI_Children[V]X are:
• DBC.AccessRights
• DBC.DBase
• DBC.Owners
• DBC.ReferencingTbls
• DBC.Roles
• DBC.RoleGrants
• DBC.TVFields
• DBC.TVM
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
View Name User Type Columns Selected
DBC.All_RI_Children[V][X] All users IndexIDIndexNameChildDBChildTableChildKeyColumnParentDBParentTableParentKeyColumnInconsistencyFlagCreatorNameCreateTimeStamp
Chapter 3: System Views: Usage and ExamplesAll_RI_Children[V][X]
Data Dictionary 309
RI_Child_Tables view while allowing more (or all) users to access the names via the All_RI_Children view.
Chapter 3: System Views: Usage and ExamplesAll_RI_Parents[V][X]
310 Data Dictionary
All_RI_Parents[V][X]
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
The corresponding system tables for DBC.All_RI_Parents[V] are:
• DBC.DBase
• DBC.ReferencedTbls
• DBC.TVFields
• DBC.TVM
The corresponding system tables for DBC.All_RI_Parents[V]X are:
• DBC.AccessRights
• DBC.DBase
• DBC.Owners
• DBC.ReferencedTbls
• DBC.Roles
• DBC.RoleGrants
• DBC.TVFields
• DBC.TVM
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
View Name User Type Columns Selected
DBC.All_RI_Parents[V][X] All users IndexIDIndexNameParentDBParentTableParentKeyColumnChildDBChildTableChildKeyColumnInconsistencyFlagCreatorNameCreateTimeStamp
Chapter 3: System Views: Usage and ExamplesAll_RI_Parents[V][X]
Data Dictionary 311
RI_Parent_Tables view while allowing more (or all) users to access the names via the All_RI_Parents view.
Chapter 3: System Views: Usage and ExamplesAMPUsage[V][X]
312 Data Dictionary
AMPUsage[V][X]
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.
Corresponding System Table
The corresponding system table for DBC.AMPUsage[V][X] is DBC.Acctg.
Note that AccountName is the expanded account name used when the usage information was collected.
Example
The following SELECT statement displays, 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
Related Topics
See Database Design for more information on controlling access, space, and ownership.
View Name User Type Columns Selected
DBC.AMPUsage[V][X] Teradata DatabaseAdministrator
AccountNameUserNameCPUTimeDiskIOCPUTimeNormVprocVprocTypeModel
Chapter 3: System Views: Usage and ExamplesArchiveLoggingObjsV[X]
Data Dictionary 313
ArchiveLoggingObjsV[X]
The ArchiveLoggingObjs view provides information about the tables that have online archive active logs and their online archive logging levels.
Corresponding System Table
The corresponding system table for ArchiveLoggingObjsV[X] is DBC.ArchiveLoggingObjsTbl.
Example
The following SELECT statement displays information about the tables that have online archive active logs and their online archive logging levels.. The logging level is either T or D.
T = Online Archive Logging was activated on the table level
D = Online Archive Logging was activated on the database level.
==> sel databasename, tvmname, loglevel from dbc.archiveloggingobjsv;
DatabaseName TVMName LogLevel--------------- ------- --------oarc_otop005db1 Tab_nfb Toarc_oth007db1 Tab_nfb Doarc_oth007db1 tab_fb Doarc_otop010db1 Tab_nfb Doarc_oth007db1 tab_ppi Doarc_otop010db1 tab_nusi Doarc_otop016db1 Tab_nfb Toarc_oth008db1 Tab_queue Toarc_otop010db1 tab_bigcol Doarc_otop001db1 Tab_nfb Toarc_otop018db1 Tab_nfb Toarc_comb002db1 tab_fb T
View Name User Type Columns Selected
ArchiveLoggingObjsV[X] Teradata DatabaseAdministrator
DatabaseNameTVMNameLogLevelCreatorNameCreateTimeStamp
Chapter 3: System Views: Usage and ExamplesAssociation[V][X]
314 Data Dictionary
Association[V][X]
The Association view allows the user to retrieve information about an object that was imported from another Teradata Database.
Corresponding System Tables
The corresponding system tables for DBC.Association[V] are:
• DBC.DBCAssociation
• DBC.DBase
• DBC.TVM
The corresponding system tables for DBC.Association[V]X are:
• DBC.AccessRights
• DBC.DBCAssociation
• DBC.DBase
• DBC.Owner
• DBC.RoleGrants
• DBC.Roles
• 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.
View Name User Type Columns Selected
DBC.Association[V][X] Operations Control
DatabaseNameTableNameEventNumOriginal_DatabaseNameOriginal_TableNameOriginal_TableKindOriginal_VersionOriginal_ProtectionTypeOriginal_JournalFlagOriginal_CreatorNameOriginal_CommentString
Chapter 3: System Views: Usage and ExamplesAssociation[V][X]
Data Dictionary 315
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
Related Topics
The following references provide additional usage information on recovery control.
Book Chapter Section
Database Administration Archiving, Restoring, and Recovering Data
Recovery Control Views
Teradata Archive/Recovery Utility Reference
Archive/Recovery Control Language
All
Chapter 3: System Views: Usage and ExamplesAuthorizations[V][X]
316 Data Dictionary
Authorizations[V][X]
The Authorizations view provides information about an authorization.
Corresponding System Tables
The corresponding system tables for DBC.Authorizations[V] are:
• DBC.DBase
• DBC.TVM
The corresponding system tables for DBC.Authorizations[V]X are:
• DBC.DBase
• DBC.TVM
• DBC.AccessRights
• DBC.Owner
Usage Notes
None.
View Name User Type Columns Selected
DBC.Authorizations[V][X] Teradata Database Administrator
DatabaseNameAuthorizationNameAuthorizationIdTableKindVersionAuthorizationTypeAuthorizationSubTypeOSDomainNameOSUserName
Chapter 3: System Views: Usage and ExamplesAuthorizations[V][X]
Data Dictionary 317
Example
==> sel * from authorizations where databasename = 'dba';
*** Query completed. 2 rows found. 9 columns returned. *** Total elapsed time was 1 second.
DatabaseName dba AuthorizationName INVOKER_DEFAULT AuthorizationId 00001F0A0000 TableKind X Version 1 AuthorizationType IAuthorizationSubType D OSDomainName OSUserName gdUsrGrp DatabaseName dba AuthorizationName myinvoker AuthorizationId 00001E0A0000 TableKind X Version 1 AuthorizationType IAuthorizationSubType D OSDomainName OSUserName gdUsrGrp
Chapter 3: System Views: Usage and ExamplesCharSets[V]
318 Data Dictionary
CharSets[V]
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.
Corresponding System Table
The corresponding system table for DBC.CharSets[V] is DBC.Translation.
Usage Notes
The Teradata Database can support many user-defined character sets (see CharTranslations[V]). You can install a maximum of 12 character sets 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 Database administrator.
Example
The following example shows that two user-defined character sets are available for the requesting user.
==> SELECT * from DBC.CharSets ;
CharSetNameFrench_EBCDICSwedish_EBCDIC
View Name User Type Columns Selected
DBC.CharSets[V] End User CharSetName
Chapter 3: System Views: Usage and ExamplesCharTranslations[V]
Data Dictionary 319
CharTranslations[V]
The CharTranslations view shows hexadecimal codes inserted by the Teradata Database system administrator to form translation tables that enable the Teradata Database 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.
Corresponding System Table
The corresponding system table for DBC.CharTranslations[V] is DBC.Translation.
Usage Notes
The underlying table of this view is populated by the Teradata Database 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 Database 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 Database system administrator specifies which character set is assigned to which client system (see HostsInfo[V]). Otherwise, the standard default is used. Also, the user may specify a defined character set after a session is started (see CharSets[V]).
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 a convention be used for naming character sets which differentiates between EBCDIC and ASCII compatibility (see example).
View Name User Type Columns Selected
DBC.CharTranslations[V] End User CharSetNameCharSetIdInstallFlagE2IE2IUpI2EI2EUp
Chapter 3: System Views: Usage and ExamplesCharTranslations[V]
320 Data Dictionary
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;
CharSetName 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...
Chapter 3: System Views: Usage and ExamplesChildren[V][X]
Data Dictionary 321
Children[V][X]
The Children view lists the names of databases and users and their parents in the hierarchy.
Corresponding System Tables
The corresponding system tables for DBC.Children[V] are:
• DBC.DBase
• DBC.Owners
The corresponding system tables for DBC.Children[V]X are:
• DBC.AccessRights
• DBC.DBase
• DBC.Owners
The X 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[V][X] Supervisory ChildParent
Chapter 3: System Views: Usage and ExamplesCollations[V]
322 Data Dictionary
Collations[V]
The Collations view provides definitions for the standard Japanese, Swedish, and Norwegian predefined collation sequences that can be used when the collation for a user or session is set to MULTINATIONAL.
It also defines custom collation sequence definitions, if any exist. The Collations view provides a view on all columns of the DBC.CollationTbl.
Corresponding System Table
The corresponding system table for DBC.Collations[V] is DBC.CollationTbl.
Usage Notes
The DBC.CollationTbl table initially contains five rows:
• KANJI5026_STANDARD
• KANJIKATA_STANDARD
• KANJI5035_STANDARD
• NORWEGIAN_STANDARD
• SWEDISH_STANDARD
Database administrators can run the CollInstallMulti macro to specify which row in the DBC.CollationTbl table to use as the collation sequence when the user or session COLLATION option is set to MULTINATIONAL. You must reset (initialize) the Teradata Database before the new collation sequence can take effect.
When you define a new collation with a name other than ’MULTINATIONAL,’ 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.CollationTbl ;
View Name User Type Columns Selected
DBC.Collations[V] End User CollNameCollInstallCollEqvClassCollOrderCSCollOrderUC
Chapter 3: System Views: Usage and ExamplesCollations[V]
Data Dictionary 323
The result is the following list:
CollName---------------------------KANJI5026_STANDARDKANJIKATA_STANDARDKANJI5035_STANDARDNORWEGIAN_STANDARDSWEDISH_STANDARD
Related Topics
For more information on the MULTINATIONAL collation sequence, see International Character Set Support.
Chapter 3: System Views: Usage and ExamplesColumns[V][X]
324 Data Dictionary
Columns[V][X]
The Columns view provides information from the DBC.TVFields table about stored procedures, join indexes, the parameters of macros, stored procedures, user-defined types, user-defined methods, user-defined functions, and the columns of any table or view.
Corresponding System Tables
The corresponding system tables for DBC.Columns[V] are:
• DBC.DBase
• DBC.TVFields
• DBC.TVM
The corresponding system tables for DBC.Columns[V]X are:
• DBC.AccessRights
• DBC.DBase
• DBC.Owners
View Name User Type Columns Selected
DBC.Columns[V][X] [X]End User
Teradata DatabaseAdministrator
DatabaseNameTableNameColumnNameColumnFormatColumnTitleSPParameterTypeColumnTypeColumnUDTNameColumnLengthDefaultValueNullableCommentStringDecimalTotalDigitsDecimalFractionalDigitsColumnIdUpperCaseFlagCompressibleCompressValueColumnConstraintConstraintCountCreatorNameCreateTimeStampLastAlterNameLastAlterTimeStampCharTypeIdColTypeAccessCountLastAccessTimeStampCompressValueList
Chapter 3: System Views: Usage and ExamplesColumns[V][X]
Data Dictionary 325
• DBC.RoleGrants
• DBC.Roles
• DBC.TVFields
• DBC.TVM
Usage Notes
When querying DBC.Columns for a view, information on column attributes (length, type, etc.) is null. Because column attributes correspond to the table for which they were defined, they are not stored in the dictionary and are 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’ AND TableName=’Employee’ORDER BY Columnid;
ColumnName CommentString----------- ---------------------------------------EmpNo Employee serial number.Name Employee name, last then first initial.DeptNoJobTitleSalaryYrsExp
Chapter 3: System Views: Usage and ExamplesColumnStats[V]
326 Data Dictionary
ColumnStats[V]
This view provides information on statistics collected on an individual column (other than a system-derived column PARTITION). This includes individual non-indexed columns as well as columns for which a single-column index has been defined. It is important to note that when statistics are collected on a single-column index using the INDEX keyword in the COLLECT STATISTICS syntax, the statistics are saved in DBC.TVFields, which is the underlying base table on which the ColumnStats view is defined.
Corresponding System Tables
The corresponding system tables for DBC.ColumnStats[V] are:
• DBC.DBase
• DBC.TVFields
• DBC.TVM
Usage Notes
This view is used by the following client tools:
• Teradata System Emulation Tool (TSET)
• Teradata Visual Explain
This view is also used by 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 following:
• Field Statistics for each column, table name, and database name
• Column data type
• Column sequence number of the column
The columns on which no statistics have been collected return an output row whose FieldStatistics column is NULL. Users may wish to filter such rows out of the output.
View Name User Type Columns Selected
DBC.ColumnStats[V] All users DatabaseNameTableNameColumnNameColumnTypeColumnLengthColumnFormatDecimalTotalDigitsDecimalFractionalDigitsFieldStatisticsSeqNumber
Chapter 3: System Views: Usage and ExamplesColumnStats[V]
Data Dictionary 327
Note: This view does not include entries for system-derived column PARTITION even if the statistics were collected as single-column statistics. You must use the MultiColumnsStats[V]
view to get these entries.
Example
This example assumes the following statistics have been collected:
COLLECT STATISTICS ON Charges INDEX (Proj_id);COLLECT STATISTICS ON Charges COLUMN WkEnd;
The following statement determines which Charges columns have statistics.
Note: Statistics are stored and returned in binary form.
SELECT ColumnName, FieldStatisticsFROM DBC.ColumnStatsWHERE DatabaseName = 'Personnel' AND TableName = 'Charges'AND FieldStatistics IS NOT NULLORDER BY SeqNumber;
*** Query completed. 2 rows found. 2 columns returned. *** Total elapsed time was 1 second.
ColumnName FieldStatistics---------- ------------------------------------------------------Proj_id D4070A060E35063C0200000000000000000000000000WkEnd D4070A060E35072C0200000000000000000000000000
Note: The FieldStatistics information appears in an internal format. The client tools TSET or
Teradata Visual Explain can interpret this information.
Chapter 3: System Views: Usage and ExamplesCostProfiles_v
328 Data Dictionary
CostProfiles_v
This view provides the cost profile instances available for use by the optimizer.
Corresponding System Tables
The corresponding system tables for DBC.CostProfiles_v are:
• DBC.CostProfiles
• DBC.CostProfileTypes
Usage Notes
None.
Example
The following example lists the cost profiles defined for the system.
SELECT ProfileName (FORMAT 'X(16)', TITLE 'Name'), ProfileId (FORMAT '-----9', TITLE 'Id'), ProfileCat (FORMAT 'X', Title 'Cat'), ProfileDesc (FORMAT 'X(64)', Title 'Description')
FROM DBC.CostProfiles_vORDER BY 2;
Name Id Cat Description ------------- ------ --- ---------------------------------------------SysDefault 0 F SysDefault DBS cost values only. Partial proV2R4 1 F V2R4 DBS cost values only. Partial profiV2R5 2 F V2R5 DBS cost values only. Partial profilV2R5_Solaris 3 F V2R5 DBS cost values only. Specific toV2R4_Bynet 4 F Bynet cost values for V2R4. Partial profileV2R5_Bynet_V1 5 F Bynet V1 cost values for V2R5. Partial profV2R5_Bynet_V2 6 F Bynet V2 cost values for V2R5. Partial prosymbios_half 7 F Disk array cost values for Half Populatedsymbios_full 8 F Disk array cost values for Fully Populatedemc 9 F Disk array cost values for EMC. Partial lsi6283 10 F Disk array cost values for LSI 6283 array.lsi6288_40 11 F Disk array cost values for LSI 6288 arraylsi6288_52 12 F Disk array cost values for LSI 6288 array lsi6840_28 13 F Disk array cost values for LSI 6840 array lsi6840_40 14 F Disk array cost values for LSI 6840 arraylsi6840_56 15 F Disk array cost values for LSI 6840 arraylsi6285_20 16 F Disk array cost values for LSI 6285 array
View Name User Type Columns Selected
DBC.CostProfiles_v All users ProfileTypeName ProfileNameProfileIdProfileCatProfileDesc
Chapter 3: System Views: Usage and ExamplesCostProfiles_v
Data Dictionary 329
lsi6285_40 17 F Disk array cost values for LSI 6285 array V2R4_Array 18 F Disk array cost values for V2R4 Default.V2R5_Array 19 F Disk array cost values for V2R5 Default.
Chapter 3: System Views: Usage and ExamplesCostProfileTypes_v
330 Data Dictionary
CostProfileTypes_v
This view provides the profile type name and description for each cost profile type.
Corresponding System Table
The corresponding system table for DBC.CostProfileTypes_v is DBC.CostProfileTypes.
Usage Notes
None.
Example
The following example shows how to list the defined profile types. Only one type is defined.
==> SELECT ProfileTypeName (TITLE 'Type Name', FORMAT 'X(8)'),ProfileTypeDesc (TITLE 'Description', FORMAT 'X(80)')
FROM DBC.CostProfileTypes_v;
Type Name Description--------- ----------------------------------------------------------Legacy Traditional (V2R6 & prior releases) cost values for legacy
View Name User Type Columns Selected
DBC.CostProfileTypes_v All users ProfileTypeNameProfileTypeDesc
Chapter 3: System Views: Usage and ExamplesCostProfileValues_v
Data Dictionary 331
CostProfileValues_v
This view provides the values for the constants in a cost profile instance.
Corresponding System Tables
The corresponding system tables for DBC.CostProfileValues_v are:
• DBC.ConstantDefs
• DBC.ConstantValues
• DBC.CostProfiles
Usage Notes
None.
Example
The following example lists the parameter values for the new profile.
SELECT ConstName (TITLE 'Profile Name'), ConstId (TITLE 'Id', FORMAT '--9'), ConstVal (TITLE 'Value'), ConstCat (TITLE 'Cat')FROM DBC.CostProfileValues_vWHERE ProfileName = 'V2R5_UseSpoolLimit'ORDER BY 4 DESC, 1; <Note T="Result">
Profile Name Id Value Cat------------------------------ --- -------------- ---ApplySpoolLimit 65 1.0 IOptBitInst 1 33.0 IOptBMAndRowInst 2 98,500.0 IOptCharFieldInst 3 261.0 IOptIndexBlockSize 4 49,152.0 IOptMaxBldKeySize 5 1,000.0 IOptMaxRowIdsIndex 6 8,030.0 IOptNumFieldInst 7 37.0 IOptOutputRowInst 8 1,641.0 IOptOvhdOfRowCompInst 9 242.0 IOptRedistributeInst 10 73,389.0 IOptRowAccessInst 11 409.0 IOptRowIdInst 12 27,139.0 I
View Name User Type Columns Selected
DBC.CostProfileValues_v All users ProfileNameProfileIdConstNameConstIdConstCatConstValConstDesc
Chapter 3: System Views: Usage and ExamplesCostProfileValues_v
332 Data Dictionary
OptRowidSize 13 12.0 IOptSpoolBlockSize 14 131,072.0 IOptSynonymInst 15 27,139.0 IOptTableBlockSize 16 49,152.0 ISpoolLimitPercent 73 100.0 I
Chapter 3: System Views: Usage and ExamplesDatabases[V][X]
Data Dictionary 333
Databases[V][X]
The Databases view provides information about both databases and users from the DBC.DBase table.
Corresponding System Tables
The corresponding system table for DBC.Databases[V] is DBC.Dbase
The corresponding system tables for DBC.Databases[V]X are:
• DBC.AccessRights
• DBC.DBase
• DBC.Owners
• DBC.RoleGrants
• DBC.Roles
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.
Note that AccountName is the unexpanded default account name for the user or database. A database can only have one account. A user may have a default account plus other accounts.
View Name User Type Columns Selected
DBC.Databases[V][X] [X]End User
Teradata DatabaseAdministrator
DatabaseNameCreatorNameOwnerNameAccountNameProtectionTypeJournalFlagPermSpaceSpoolSpaceTempSpaceCommentStringCreateTimeStampLastAlterNameLastAlterTimeStampDBKindAccessCount LastAccessTimeStamp
Chapter 3: System Views: Usage and ExamplesDatabases[V][X]
334 Data Dictionary
For all the account names associated with a database or user, use the AccountInfo[X] system view.
Example
The statement shown in the following selects information about the Personnel database.
==> SELECT AccountName,ProtectionType,PermSpace,SpoolSpaceFROM DBC.Databases WHERE DatabaseName = ’Personnel’;
AccountName ProtectionType PermSpace SpoolSpace--------------- -------------- --------- -------------Teradata_Sample F 100,000 1,339,884,032
Chapter 3: System Views: Usage and ExamplesDatabases2[V][X]
Data Dictionary 335
Databases2[V][X]
The Databases2 view provides database ID and Referential Integrity (RI) information.
Corresponding System Table
The corresponding system table for DBC.Databases2[V] is DBC.Dbase.
The corresponding system tables for DBC.Databases2[V]X are:
• DBC.AccessRights
• DBC.DBase
• DBC.Owners
• DBC.RoleGrants
• DBC.Roles
Usage Notes
The Databases2 view is similar to the Databases view but returns the ID of the database instead of the various 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[V][X] Teradata Database Administrator
DatabaseNameDatabaseIdUnResolvedRICount
Chapter 3: System Views: Usage and ExamplesDatabase_Default_Journals[V][X]
336 Data Dictionary
Database_Default_Journals[V][X]
The Database_Default_Journals view provides information on each database that is defined as having a default journal table.
Corresponding System Tables
The corresponding system table for DBC.Database_Default_Journals[V] is DBC.DBase.
The corresponding system tables for DBC.Database_Default_Journals[V]X are:
• DBC.AccessRights
• DBC.DBase
• DBC.Owners
• DBC.RoleGrants
• DBC.Roles
• DBC.TVM
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[V][X] [X]End
Teradata DatabaseAdministrator
DatabaseNameJournal_DBJournalName
Chapter 3: System Views: Usage and ExamplesDBCInfo[V]
Data Dictionary 337
DBCInfo[V]
The DBCInfo view provides information about specific attributes of the Teradata Database, such as the current software version and release level. It is updated during each system restart.
Corresponding System Table
The corresponding system table for DBC.DBCInfo[V] is DBC.DBCInfoTbl.
Usage Notes
Three attributes are currently maintained in DBC.DBCInfo. They are:
• VERSION—Version of the software currently running on the Teradata Database
• RELEASE—Release level of the software currently running on the PDE
• LANGUAGE SUPPORT MODE - Standard or Japanese support mode
Example
The following SELECT statement retrieves the version and release of the current Teradata Database software.
==> SELECT infokey (format ‘x(30)’), infodata (format ‘x20)’) FROM dbcinfov ORDER BY infokey;
*** Query completed. 3 rows found. 2 columns returned.*** Total elapsed time was 1 second.
InfoKey InfoData--------------------- --------------------LANGUAGE SUPPORT MODE JapaneseRELEASE 12.00.00.00VERSION 12.00.00.00
For the language support mode, InfoData is either Standard or Japanese.
The values for Version and Release are broken down into 4 parts:
• Major release
• Minor release
• Maintenance release
• E-fix release
View Name User Type Columns Selected
DBC.DBCInfo[V] All users InfoKeyInfoData
Chapter 3: System Views: Usage and ExamplesDBCInfo[V]
338 Data Dictionary
For example, 12.01.02.03 represents the following:
• 12 = major release number
• 01 = minor release number
• 02 = maintenance release number
• 03 = e-fix or patch release number
Chapter 3: System Views: Usage and ExamplesDBQLRules[V]
Data Dictionary 339
DBQLRules[V]
The DBQLRules view displays the rules in effect for users.
Corresponding System Tables
The corresponding system tables for DBC.DBQLRules[V] are:
• DBC.DBase (user name)
• DBC.DBQLRuleTbl
Usage Notes
Only users with DBC or SystemFE privileges are able to use this view.
Example
The following SELECT statement retrieves the rules in effect for users.
==> SELECT * FROM DBC.DBCLRules;
UserName AllAccountExplain FObject FSQL FStep FSummary FThreshold TTextSize 1,000SummaryLow 3Med ?High ?ThresholdValue 0
View Name User Type Columns Selected
DBC.DBQLRules[V] Teradata DatabaseAdministrator
Supervisory
UserNameAccountStringExplainFlagObjFlagSqlFlagStepFlagSummaryFlagThresholdFlagTextSizeLimitSummaryVal1SummaryVal2SummaryVal3ThreshValue
Chapter 3: System Views: Usage and ExamplesDBQLRules[V]
340 Data Dictionary
These are the threshold values:
0 = second
1 = cpu time
2 = IO count
Note: This rule was initiated as BEGIN QUERY LOGGING LIMIT THRESHOLD = 3 AND SQLTEXT = 1000 ON ALL;
Queries longer than 3 seconds are logged in the DBQLogTbl (QryLog view). Shorter queries are counted and appear in the DBQLSummaryTbl (QryLogSummary view).
Summary Low is for either Threshold or Summary.
Chapter 3: System Views: Usage and ExamplesDeleteAccessLog[V]
Data Dictionary 341
DeleteAccessLog[V]
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 Table
The corresponding system table for DBC.DeleteAccessLog[V] is DBC.AccLogTbl.
Usage Notes
The access log contains entries according to the application of the access logging rules (see AccessLog[V] and AccLogRules[V]).
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 statement deletes entries logged more than 30 days before the current calendar date.
==> DELETE FROM DBC.DeleteAccessLog ALL;
DELETE COMPLETED. 79 RECORDS DELETED.
View Name User Type Columns Selected
DBC.DeleteAccessLog[V] Teradata DatabaseSecurity Administrator
LogDateLogTime
Chapter 3: System Views: Usage and ExamplesDeleteOldInDoubt[V]
342 Data Dictionary
DeleteOldInDoubt[V]
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.
Corresponding System Table
The corresponding system table for this view is 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[V] Teradata DatabaseAdministrator
LogicalHostIdSessionNumberCoordTaskIdRunUnitIdLogonUserNameResolvingUserLogonNameCommitOrRollbackUserLogonDateUserLogonTimeCompletionDateCompletionTimeOptions
Chapter 3: System Views: Usage and ExamplesDiskSpace[V][X]
Data Dictionary 343
DiskSpace[V][X]
The DiskSpace view provides AMP-by-AMP vproc information about disk space usage (including spool) for any database or account.
Corresponding System Tables
The corresponding system tables for DBC.DiskSpace[V] are:
• DBC.DataBaseSpace
• DBC.DBase
The corresponding system tables for DBC.DiskSpace[V]X are:
• DBC.AccessRights
• DBC.DataBaseSpace
• DBC.DBase
• DBC.Owners
• DBC.RoleGrants
• DBC.Roles
The X 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 Database (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
View Name User Type Columns Selected
DBC.DiskSpace[V][X] Teradata DatabaseAdministrator
[X]End User
Supervisory
VprocDatabaseNameAccountName (unexpanded)MaxPermMaxSpoolMaxTempCurrentPermCurrentSpoolCurrentTempPeakPermPeakSpoolPeakTempMaxProfileSpoolMaxProfileTemp
Chapter 3: System Views: Usage and ExamplesDiskSpace[V][X]
344 Data Dictionary
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),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:
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.
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 Database 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
Chapter 3: System Views: Usage and ExamplesDiskSpace[V][X]
Data Dictionary 345
Example
The following SELECT statement displays the permanent disk space across all AMPs.
==> SELECT AMP,DatabaseName,CurrentPerm,MaxPerm FROM DBC.DiskSpace;
AMP DatabaseName CurrentPerm MaxPerm--- ------------ ----------- ---------. . . .. . . .
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
Chapter 3: System Views: Usage and ExamplesErrorTblsV[X]
346 Data Dictionary
ErrorTblsV[X]
The ErrorTblsV view provides information on relationships between data and error tables accessible to the current user:
Corresponding System Tables
The corresponding system tables for DBC.ErrorTblsV are:
• DBC.Dbase
• DBC.TVM
• DBC.ErrorTbls
The corresponding system tables for DBC.ErrorTblsVX are:
• DBC.Dbase
• DBC.TVM
• DBC.ErrorTbls
• DBC.AccessRights
• DBC.Owner
• DBC.RoleGrants
• DBC.Roles
Usage Notes
None.
Example
The following example shows base data table u2.t1 has an error table u2.ET_t1, which is created by u2.
==> SELECT ErrTblDbName (char(8)), ErrTblName (char(8)), BaseTblDbName (char(8)), BaseTblName (char(8)), CreatorName (char(4)), CreateTimeStampFROM DBC.ErrorTblsV;
View Name User Type Columns Selected
DBC.ErrorTblsV[X] Operations Control
ErrTblDbNameErrTblNameBaseTblDbNameBaseTblNameCreatorNameCreateTimeStamp
Chapter 3: System Views: Usage and ExamplesErrorTblsV[X]
Data Dictionary 347
*** Query completed. One row found. 6 columns returned. *** Total elapsed time was 1 second. ErrTblDbName ErrTblName BaseTblDbName BaseTblName CreatorName CreateTimeStamp------------ ---------- ------------- ----------- ----------- -------------------
u2 ET_t1 u2 t1 u2 2006-08-28 11:47:56
Chapter 3: System Views: Usage and ExamplesEvents[V][X]
348 Data Dictionary
Events[V][X]
The Events view provides information about the execution of checkpoint statements and client system utility functions.
Corresponding System Tables
The corresponding system table for DBC.Events[V] is DBC.RCEvent.
The corresponding system tables for DBC.Events[V]X are:
• DBC.AccessRights
• DBC.DBase
• DBC.Owners
• DBC.RCEvent
• DBC.RoleGrants
• DBC.Roles
The X 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.
View Name User Type Columns Selected
DBC.Events[V][X] Operations Control
CreateDateCreateTimeEventNumEventTypeUserNameDatabaseNameObjectTypeAllAMPsFlagRestartSeqNumOperationInProcessTableNameCheckpointNameLinkingEventNumDataSetNameLockModeJournalUsedJournalSavedIndexPresentDupeDumpSet
Chapter 3: System Views: Usage and ExamplesEvents[V][X]
Data Dictionary 349
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 Database connects to more than one client system and the client system clocks are not synchronized.
Type of event row … A row is created for each …
Checkpoint journal checkpointed.
Delete journal deleted.
Dump database or table dumped.
Restore database or table restored.
Rollback database or table rolled back.
Rollforward database or table rolled forward.
Standard fields Optional fields
EventNum DataSetName
CreateDate TableName
CreateTime CheckpointName
UserName LinkingEventNum
EventType LockMode
DatabaseName JournalUsed
ObjectType JournalSaved
AllAMPsFlag IndexPresent
RestartSeqNum DupeDumpSet
Chapter 3: System Views: Usage and ExamplesEvents[V][X]
350 Data Dictionary
Example
The following SELECT statement selects information associated with the requesting user from the DBC.EventsX view.
==> SELECT CreateDate, CreateTime, EventType, JournalUsed FROM DBC.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
Chapter 3: System Views: Usage and ExamplesEvents_Configuration[V][X]
Data Dictionary 351
Events_Configuration[V][X]
The Events_Configuration view provides information about utility events that did not affect all AMPs.
Corresponding System Tables
The corresponding system tables for DBC.Events_Configuration[V] are:
• DBC.RCConfiguration
• DBC.RCEvent
The corresponding system tables DBC.Events_Configuration[V]X are:
• DBC.AccessRights
• DBC.DBase
• DBC.Owners
• DBC.RCConfiguration
• DBC.RCEvent
• DBC.RoleGrants
• DBC.Roles
The X view also references the userdb view.
Usage Notes
The Events_Configuration view contains rows for each archive activity that does not affect all AMPs in the Teradata Database 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 online.
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
View Name User Type Columns Selected
DBC.Events_Configuration[V][X] Operations Control
CreateDateCreateTimeEventNumEventTypeUserNameLogProcessorPhyProcessorVprocProcessorStateRestartSeqNum
Chapter 3: System Views: Usage and ExamplesEvents_Configuration[V][X]
352 Data Dictionary
timestamp sequence. This may also occur if a Teradata Database is connected to more than one client system and the client system clocks are not synchronized.
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
Chapter 3: System Views: Usage and ExamplesEvents_Media[V][X]
Data Dictionary 353
Events_Media[V][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
The corresponding system tables for DBC.Events_Media[V] are:
• DBC.RCEvent
• DBC.RCMedia
The corresponding system tables for DBC.Events_Media[V]X are:
• DBC.AccessRights
• DBC.DBase
• DBC.Owners
• DBC.RCEvent
• DBC.RCMedia
• DBC.RoleGrants
• DBC.Roles
The X view also references 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 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 Database is connected to more than one client system and the client system clocks are not synchronized.
View Name User Type Columns Selected
DBC.Events_Media[V][X] Operations Control
CreateDateCreateTimeEventNumEventTypeUserNameDataSetNameVolSerialIdVolSequenceNumDupeDumpSet
Chapter 3: System Views: Usage and ExamplesEvents_Media[V][X]
354 Data Dictionary
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’ ;
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
Chapter 3: System Views: Usage and ExamplesExternalSPs[V][X]
Data Dictionary 355
ExternalSPs[V][X]
The ExternalSPs view extracts the External Stored Procedure (XSP) details from DBC.UDFInfo, DBC.DBase, and DBC.TVM.
Corresponding System Tables
The corresponding system tables for DBC.ExternalSPs[V] are:
• DBC.DBase
• DBC.TVM
• DBC.UDFInfo
The corresponding system tables for DBC.ExternalSPs[V]X are:
• DBC.AccessRights
• DBC.DBase
• DBC.Owners
• DBC.RoleGrants
• DBC.Roles
• DBC.TVM
• DBC.UDFInfo
Example
The following SELECT statement returns information about the external stored procedures in database ’dba’.
==> SELECT * FROM DBC.ExternalSPsWHERE databasename = ‘dba’;
View Name User Type Columns Selected
DBC.ExternalSPs[V][X] Teradata DatabaseAdministrator
DatabaseNameExternalProcedureNameExternalProcedureIdNumParametersExternalNameSrcFileLanguageNoSQLDataAccessParameterStyleExecProtectionModeExtFileReferenceCharacterTypePlatformRoutineKindParameterUDTIdsAuthIdUsedAppCategory
Chapter 3: System Views: Usage and ExamplesExternalSPs[V][X]
356 Data Dictionary
DataDatabaseName dbaExternalProcedureName XSP_100ExternalProcedureId 00006E0F0000NumParameters 2ExternalName xsp_100SrcFileLanguage CNoSQLDataAccess YParameterStyle SExecProtectionMode PExtFileReference CS!xsp_100!/home/i18n/ckl/udftest/xsp_100.cCharacterType 1Platform MPRASRoutineKind RParameterUDTIdsAuthIdUsed 00001E0A0000AppCategory S
Chapter 3: System Views: Usage and ExamplesFunctions[V][X]
Data Dictionary 357
Functions[V][X]
The Functions view contains all the function information.
Corresponding System Tables
The corresponding system tables for DBC.Functions[V] are:
• DBC.Dbase
• DBC.TVM
• DBC.UDFInfo
The corresponding system tables for DBC.Functions[V]X are:
• DBC.AccessRights
• DBC.Dbase
• DBC.Owners
• DBC.TVM
• DBC.UDFInfo
View Name User Type Columns Selected
DBC.Functions[V][X] Teradata DatabaseAdministrator
DatabaseNameFunctionNameSpecificNameFunctionIdNumParametersParameterDataTypesFunctionTypeExternalNameSrcFileLanguageNoSQLDataAccessParameterStyleDeterministicOptNullCallPrepareCountExecProtectionModeExtFileReferenceCharacterTypePlatformInterimFldSizeRoutineKindParameterUDTIdsAuthIdUsedMaxOutParameters
Chapter 3: System Views: Usage and ExamplesFunctions[V][X]
358 Data Dictionary
Example
The following SELECT statement displays information about the overloaded functions named 'concat' in 'dba' database:
==> SELECT SpecificName, NumParameters, ParameterDataTypes FROM FUNCTIONS WHERE DatabaseName = 'dba' and FunctionName = 'concat' order by 1,2,3;
SpecificName NumParameters ParameterDataTypes------------------ ------------- --------------------------
concat 2 CFCFconcat_3 3 CFCFCFconcat_4 4 CFCFCFCF
Chapter 3: System Views: Usage and ExamplesHostsInfo[V]
Data Dictionary 359
HostsInfo[V]
The HostsInfo view displays information about any user-defined character sets assigned by the Teradata Database system administrator as the default for the client systems in the Teradata Database configuration. (See also CharSets[V] and CharTranslations[V].)
Corresponding System Table
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 Database configuration.
==> SELECT * FROM DBC.HostsInfo;
LogicalHostId HostName DefaultCharSet------------- --------- ----------------
136 VM Norwegian_EBCDIC137 LAN ASCII
Related Topics
For more information on user-defined character sets and the values in DBC.HostsInfo, see International Character Set Support.
View Name User Type Columns Selected
DBC.HostsInfo[V] End User
Teradata DatabaseAdministrator
LogicalHostIdHostNameDefaultCharSet
Chapter 3: System Views: Usage and ExamplesIndexConstraints[V][X]
360 Data Dictionary
IndexConstraints[V][X]
This view provides information about index constraints on tables. Index constraints are implied constraints derived from a partitioning expression.
Corresponding System Tables
The corresponding system tables for DBC.IndexConstraints[V] are:
• DBC.DBase
• DBC.TableConstraints
• DBC.TVM
The corresponding system tables for DBC.IndexConstraints[V]X are:
• DBC.AccessRights
• DBC.DBase
• DBC.Owners
• DBC.TableConstraints
• DBC.TVM
• DBC.RoleGrants
• DBC.Roles
Example
The following statement shows the DBC.IndexConstraints view:
==> SELECT * FROM DBC.IndexConstraintsWHERE TableName = ’Orders’AND DatabaseName = 'pls';
View Name User Type Columns Selected
DBC.IndexConstraints[V][X] End User
Teradata DatabaseAdministrator
DatabaseNameTableNameIndexNameIndexNumberConstraintTypeConstraintTextConstraintCollationCollationNameCreatorNameCreateTimeStamp
Chapter 3: System Views: Usage and ExamplesIndexConstraints[V][X]
Data Dictionary 361
The output of this statement is:
DatabaseName plsTableName OrdersIndexName OrdPIIndexNumber 1ConstraintType ConstraintText CHECK ( (RANGE_N(o_orderdate BETWEEN DATE ’1992-01-01’ConstraintCollation UCollationName ?CreatorName plsCreateTimeStamp 2001-02-20 23:02:30
Note: Due to BTEQ line limit, ConstraintText is truncated in the output above.
For information on the following topics, see Database Design.
• Single-Level Partitioned Primary Indexes (SLPPI)
• Implicit Table-Level Index CHECK Constraints for SLPPI Tables
• Single-Level Partitioning Example
• Multilevel Partitioned Primary Indexes (MLPPI)
• Implicit Table-Level Index CHECK Constraint for MLPPI Tables
• Multilevel Partitioning Example
Chapter 3: System Views: Usage and ExamplesIndexStats[V]
362 Data Dictionary
IndexStats[V]
This view provides information on statistics collected on multicolumn indexes, namely those indexes for which two or more columns have been defined. When statistics are collected on such indexes, the statistics are saved in DBC.Indexes, which is the underlying base table on which the IndexStats view is defined. For information regarding statistics collected on single column indexes, see “ColumnStats[V]” on page 326.
Corresponding System Tables
The corresponding system tables for this view are:
• DBC.DBase
• DBC.Indexes
• DBC.TVFields
• DBC.TVM
Usage Notes
This view is used by the following client tools:
• Teradata System Emulation Tool (TSET)
• Teradata Visual Explain
This view is also is also used by any client application that requires statistical information.
The information returned includes the following:
• Index statistics
• Table name
• Database name
• Index number
View Name User Type Columns Selected
DBC.IndexStats[V] End User
Teradata Database Administrator
DatabaseName TableName IndexNumber IndexName IndexType UniqueFlag ColumnPosition ColumnName ColumnType ColumnLengthColumnFormatDecimalTotalDigits DecimalFractionalDigits IndexStatistics
Chapter 3: System Views: Usage and ExamplesIndexStats[V]
Data Dictionary 363
• Details of the column on which the index is defined.
By default, the output from this view includes a result row for each column of each index. For those indexes with collected statistics, only the first column, namely the one whose FieldPosition is 1, has statistics returned in the IndexStatistics column. All other columns of the index return rows whose IndexStatistics value is NULL. If no statistics where collected on the index, then the row in which FieldPosition equals 1 has the corresponding IndexStatistics set to NULL as well. Users may wish to filter out those rows in which IndexStatistics is NULL.
By default, the output from this view includes a result row for indexes defined on single columns. Such rows have the IndexStatistics field set to NULL. Users may wish to filter out such rows and should instead use the ColumnStats view to retrieve statistics for single-column indexes.
Example
This example assumes the following statistics have been collected:
COLLECT STATISTICS ON Charges INDEX (EmpNo, Proj_id);
The following statement retrieves statistics collected on the “Charges” table.
==> SELECT IndexNumber, IndexType, ColumnPosition, ColumnName, IndexStatistics
FROM DBC.IndexStatsWHERE DatabaseName = 'Personnel' AND TableName = 'Charges'AND IndexStatistics IS NOT NULLORDER BY IndexNumber;
The output of this statement is:
*** Query completed. One row found. 5 columns returned. *** Total elapsed time was 1 second.IndexNumber 1IndexType PColumnPosition 1ColumnName EmpNoIndexStatisticsD4070A060E3508280200000000000000000000000000000000002020202
Note: The IndexStatistics information appears in an internal format. The client tools TSET or
Teradata Visual Explain can interpret this information.
Chapter 3: System Views: Usage and ExamplesIndices[V][X]
364 Data Dictionary
Indices[V][X]
The Indices view provides information about each indexed column from the DBC.Indexes table.
Corresponding System Tables
The corresponding system tables for DBC.Indices[V] are:
• DBC.DBase
• DBC.Indexes
• DBC.TVFields
• DBC.TVM
The corresponding system tables for DBC.Indices[V]X are:
• DBC.AccessRights
• DBC.DBase
• DBC.Indexes
• DBC.Owners
• DBC.Roles
• DBC.RoleGrants
• DBC.TVFields
• DBC.TVM
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 returns multiple rows.
View Name User Type Columns Selected
DBC.Indices[V][X] [X]End User
Teradata DatabaseAdministrator
DatabaseNameTableNameIndexNumberIndexTypeUniqueFlagIndexNameColumnNameColumnPositionCreatorNameCreateTimeStampLastAlterNameLastAlterTimeStampIndexModeAccessCount LastAccessTimeStamp
Chapter 3: System Views: Usage and ExamplesIndices[V][X]
Data Dictionary 365
Example
The following SELECT statement displays index information for all the tables in the Personnel database.
==> SELECT TableName,ColumnName,ColumnPosition,IndexType,UniqueFlag FROM DBC.Indices
WHERE DatabaseName= ’Personnel’ORDER BY TableName,ColumnPosition ;
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
Chapter 3: System Views: Usage and ExamplesInDoubtLog[V]
366 Data Dictionary
InDoubtLog[V]
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.
Corresponding System Table
The corresponding system table for this view is InDoubtResLog.
View Name User Type Columns Selected
DBC.InDoubtLog[V] Teradata DatabaseAdministrator
LogicalHostIdSessionNumberCoordTaskIdRunUnitIdLogonUserNameResolvingUserLogonNameCommitOrRollBackUserLogonDateUserLogonTimeCompletionDateCompletionTimeOptions
Chapter 3: System Views: Usage and ExamplesJournals[V][X]
Data Dictionary 367
Journals[V][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
The corresponding system tables for DBC.Journals[V] are:
• DBC.DBase
• DBC.TVM
The corresponding system tables for DBC.Journals[V]X are:
• DBC.AccessRights
• DBC.DBase
• DBC.Owners
• DBC.RoleGrants
• DBC.Roles
• DBC.TVM
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[V][X] [X]End User
Teradata DatabaseAdministrator
Tables_DBTableNameJournals_DBJournalName
Chapter 3: System Views: Usage and ExamplesLogOnOff[V][X]
368 Data Dictionary
LogOnOff[V][X]
The LogOnOff view supplies information about logon and logoff activity, including attempted logons.
Corresponding System Table
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.
Note that AccountName is the unexpanded account name for the session at the time of the event.
Example 1
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. . . . .
View Name User Type Columns Selected
DBC.LogOnOff[V][X] Teradata DatabaseSecurity Administrator
Teradata DatabaseAdministrator
Supervisory
LogDateLogTimeUserNameAccountNameEventLogicalHostIdIFPNoSessionNoLogonDateLogonTimeLogonSource
Chapter 3: System Views: Usage and ExamplesLogOnOff[V][X]
Data Dictionary 369
. . . . .
. . . . .
Related Topics
For more information on controlling access, space, and ownership, see Database Design.
Chapter 3: System Views: Usage and ExamplesLogonRules[V]
370 Data Dictionary
LogonRules[V]
The LogonRules view retrieves information about logon rules generated as a result of successfully processed GRANT LOGON statements.
Corresponding System Tables
The corresponding system tables for this view are:
• DBC.DBase
• DBC.LogonRuleTbl
Usage Notes
The LOGON rules can be used to redefine the Teradata Database defaults. See SQL Reference: Data Definition Statements 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.
Teradata Database, running on Microsoft Windows, provides the capability of integrating with the Windows logon, so that users only need to identify themselves to Windows. Teradata Database can then use this information to log clients on. External authentication is enabled by granting permission to log on "with null password" from the appropriate network, identified by host ID. See Security Administration for more information.
View Name User Type Columns Selected
DBC.LogonRules[V] Teradata DatabaseSecurity Administrator
UserNameLogicalHostIdLogonStatusNullPasswordCreatorNameCreateTimeStamp
Chapter 3: System Views: Usage and ExamplesMultiColumnStats[V]
Data Dictionary 371
MultiColumnStats[V]
The MultiColumnStats view provides partition statistical (single-column or multicolumn partition) information for groups of non-indexed columns. This view also includes information about tables where partition statistics have been collected.
Corresponding System Tables
The corresponding system tables for this view are:
• DBC.DBase
• DBC.Indexes
• DBC.TVFields
• DBC.TVM
When statistics are collected on a group of two or more non-indexed columns of a table, the information is saved in the base table DBC.Indexes. Such rows within DBC.Indexes are often described as being "pseudo" indexes because of the fact that they are simply a placeholder for storing non-indexed statistics.
Usage Notes
The following client tools use this view:
• Teradata System Emulation Tool (TSET)
• Teradata Visual Explain
Any client application that requires statistical information used by the Optimizer also uses this view. The information returned includes the following:
• Columns Statistics
• Table Name
• Database Name
• Statistics ID
• Details of the columns on which the statistics are collected.
View Name User Type Columns Selected
DBC.MultiColumnStats[V] End User
Teradata Database Administrator
DatabaseNameTableNameStatisticsIdColumnPositionColumnNameColumnTypeColumnLengthColumnFormatDecimalTotalDigitsDecimalFractionalDigitsColumnsStatistics
Chapter 3: System Views: Usage and ExamplesMultiColumnStats[V]
372 Data Dictionary
By default, the output from this view includes a result row for each column on which multicolumn statistics or single-column PARTITION statistics were collected. For those columns of multicolumn statistics, only the first column, namely the one whose FieldPosition is 1, has statistics returned in the ColumnsStatistics column. All other columns of the multicolumn statistics return rows whose ColumnsStatistics value is NULL. Users may wish to filter out those rows in which ColumnsStatistics is NULL.
The information stored in the ColumnsStatistics column is stored in an internal format. The client tools TSET or Teradata Visual Explain can interpret this information.
Example
The following statement retrieves information about statistics collected on groups of non-indexed columns for table T1. The results assume that statistics have been previously collected on column groups (colA,colB) and (colC,colD,colE).
SELECT ColumnName, StatisticsIdFROM DBC.MultiColumnStatsWHERE DatabaseName = 'Statstesting1' AND TableName = 'T1'ORDER BY StatisticsId;
The output of this statement is:
ColumnName StatisticsId---------- ------------- colA 129colB 129colC 130colD 130colE 130
Chapter 3: System Views: Usage and ExamplesProfileInfo[V][X]
Data Dictionary 373
ProfileInfo[V][X]
The ProfileInfo view lists all profiles and their parameter settings, and the ProfileInfoX view lists the profile, if any, and its parameter settings for the current user.
Corresponding System Tables
The corresponding system tables for this view are:
• DBC.DBase
• DBC.Profiles
Usage Notes
In ProfileInfo[X], if no profile is set up for the user or for ProfileInfo and if no profile is defined, the view returns the following message:
No rows found
If the profile creator has been dropped, the ProfileInfo[X] view returns the information of that profile, which is shown with the text "Dropped User" for CreatorName or LastAlterName.
Example
The following query lists the parameter settings of all profiles in the system together with their parameter settings:
SELECT CAST(ProfileName AS CHAR(15)),CAST (DefaultDB AS CHAR(15)),CAST (AccountName AS CHAR(15)) (NAMED DefaultAccount),
View Name User Type Columns Selected
DBC.ProfileInfo[V][X] [X]End User
Teradata DatabaseSecurity Administrator
Teradata DatabaseAdministrator
Supervisory
ProfileNameDefaultAccountDefaultDBSpoolSpaceTempSpaceExpirePasswordPasswordMinCharPasswordMaxCharPasswordDigitsPasswordSpecCharPasswordRestrictWordsMaxLogonAttemptsLockedUserExpirePasswordReuseCommentStringCreatorNameCreateTimeStampLastAlterNameLastAlterTimeStamp
Chapter 3: System Views: Usage and ExamplesProfileInfo[V][X]
374 Data Dictionary
SpoolSpace,TempSpace
FROM DBC.ProfileInfo ORDER BY 1;*** Query completed. 3 rows found. 5 columns returned.*** Total elapsed time was 1 second.
ProfileName DefaultDB DefaultAccount SpoolSpace TempSpace----------- --------- -------------- ---------- ------------kanji japan i18n 50000 50000HResources personnel ? ? ?NTGroup NT ncrsandiego 50000 50000
If multiple accounts are specified for the ACCOUNT parameters, only the first account (the default account) in the list is reflected in the display. The remaining accounts in the list can be retrieved by performing a SELECT on the existing view DBC.AccountInfo.
Parameter settings for the profile assigned to the user may similarly be displayed by performing a SELECT on the new system view DBC.ProfilesInfoX.
Chapter 3: System Views: Usage and ExamplesQryLog[V]
Data Dictionary 375
QryLog[V]
The QryLog view specifies the main view for DBQL.
View Name User Type Columns Selected
DBC.QryLog[V] Teradata DatabaseAdministrator
ProcIDCollectTimeStampQueryIDUserIDUserNameDefaultDatabaseAcctStringExpandAcctStringSessionIDLogicalHostIDRequestNumInternalRequestNumLogonDateTimeAcctStringTimeAcctStringHourAcctStringDateLogonSourceAppIDClientIDClientAddrQueryBandProfileIDStartTimeFirstStepTimeFirstRespTimeElapsedTimeNumStepsNumStepswParMaxStepsInParNumResultRowsTotalIOCountAMPCPUTimeParserCPUTimeErrorCodeErrorTextWarningOnlyAbortFlag
Chapter 3: System Views: Usage and ExamplesQryLog[V]
376 Data Dictionary
Corresponding System Table
The corresponding system table for this view is DBC.DBQLogTbl.
Usage Notes
If logging is invoked for a user/account, each query has one row logged in the QryLog. Note that the account string logged is the account string in effect at the end of the query.
Example
The following SELECT statement retrieves the main view for DBQL:
SELECT QueryID, UserName, AcctString, SessionID, LogicalHostID, RequestNum, LogonDateTime, StartTime, NumSteps, NumStepswPar, MaxStepsInPar, NumResultRows, CacheFlag, QueryTextFROM DBC.QryLog where QueryID = 201205134619838011;
QueryID 201205134619838011 UserName Chanbr AcctString 6000 SessionID 1106 LogicalHostID 1 RequestNum 27 LogonDateTime 2004-06-27 17:18:40.03 StartTime 2004-06-27 17:18:43.01 NumSteps 6 NumStepswPar 0
View Name User Type Columns Selected
DBC.QryLog(Continued)
Teradata DatabaseAdministrator
CacheFlagStatementTypeQueryTextNumOfActiveAMPsMaxAMPCPUTimeMaxCPUAmpNumberMinAmpCPUTimeMaxAmpIOMaxIOAmpNumberMinAmpIOSpoolUsageLSNEstResultRowsEstProcTimeEstMaxRowCountAMPCPUTimeNormParserCPUTimeNormMaxAMPCPUTimeNormMaxCPUAmpNumberNormMinAmpCPUTimeNorm
Chapter 3: System Views: Usage and ExamplesQryLog[V]
Data Dictionary 377
MaxStepsInPar 0 NumResultRows ? CacheFlag T QueryText SELECT * FROM Department order by Deptno;
Chapter 3: System Views: Usage and ExamplesQryLogEventHis[V]
378 Data Dictionary
QryLogEventHis[V]
The QryLogEventHis view provides a means by which an end user can discover the sequence of states and events that occurred at any point in time.
Corresponding System Table
The corresponding system table for this view is DBC.TDWMEventHistory.
Usage Notes
None.
Example
The following is an example SQL statement that demonstrates how data can be extracted from the QryLogEventHis view to give an explanation of the expression and events which caused a RED SysCon.
WITH RECURSIVE CausalAnalysis(EntryTS, EntryKind, EntryID, EntryName, Activity, ActiveId) AS ( SELECT EntryTS, EntryKind, EntryID, EntryName, Activity, ActiveId FROM test.QryLogEventHis WHERE EntryKind = 'SYSCON' AND EntryName = 'RED' AND Activity = 'ACTIVE' UNION ALL SELECT Cause.EntryTS, Cause.EntryKind, Cause.EntryID, Cause.EntryName, Cause.Activity, Cause.ActiveId
View Name User Type Columns Selected
DBC.QryLogEventHis[V] Teradata DatabaseAdministrator
ProcIDCollectTimeStamp EntryTS EntryKind EntryID EntryNameEventValue Activity ActivityId ActivityName ConfigIdSpare1Spare2
Chapter 3: System Views: Usage and ExamplesQryLogEventHis[V]
Data Dictionary 379
FROM CausalAnalysis Condition INNER JOIN test.QryLogEventHis Cause ON Condition.EntryKind = Cause.Activity AND Condition.EntryID = Cause.ActiveID )SELECT *FROM CausalAnalysisORDER BY 1 DESC;
*** Query completed. 4 rows found. 6 columns returned. *** Total elapsed time was 1 second.
EntryTS EntryKind EntryID EntryName Activity ActiveId----------------------- ---------- -------- ------------ ---------- ---------2006-03-22 14:20:49.12 SYSCON 30 RED ACTIVE 02006-03-22 14:19:49.06 EXPRESS 20 AWT & NODE SYSCON 302006-03-22 14:17:48.53 EVENT 11 NODE DOWN EXPRESS 20
2006-03-22 14:16:48.51 EVENT 10 LOW AWTS EXPRESS 20
Chapter 3: System Views: Usage and ExamplesQryLogEvents[V]
380 Data Dictionary
QryLogEvents[V]
The QryLogEvents view contains the Teradata Database events that affect or are affected by Teradata Dynamic Workload Manager.
Corresponding System Table
The corresponding system table for this view is DBC.TDWMEventLog.
Usage Notes
These events may include a TDWM rule update or errors encountered during a TDWM rule activate or deactivate.
Example
The following statement retrieves rows from the view QryLogEvents:
SELECT * from DBC.QryLogEvents;
The output of this statement is:
ProcID 16383CollectTimeStamp 2004-06-22 14:51:32
SessionID ? LogicalHostID ?
WDID ? OpEnvID ?
SysConID ? EventTime 2004-06-22 14:43:32.58 EventCode 3,158
EventSubCode ? EventInfo TDWM rules have been updated
View Name User Type Columns Selected
DBC.QryLogEvents[V] Teradata DatabaseAdministrator
ProcIDCollectTimeStamp SessionID LogicalHostID WDID OpEnvIDSysConID EventTime EventCode EventSubCode EventInfo
Chapter 3: System Views: Usage and ExamplesQryLogExceptions[V]
Data Dictionary 381
QryLogExceptions[V]
The QryLogExceptions view contains the results of the query affected by Teradata Dynamic Workload Manager exception handling.
Corresponding System Table
The corresponding system table for this view is DBC.TDWMExceptionLog.
Usage Notes
This view contains entries for the following:
1 Logons rejected due to TDWM throttle limits
2 Queries rejected due to TDWM object access violations
3 Queries rejected due to TDWM throttle limits if abort option is chosen
4 Queries subject to Workload Definition exception handling
View Name User Type Columns Selected
DBC.QryLogExceptions[V] Teradata DatabaseAdministrator
ProcIDCollectTimeStampQueryIDUserNameSessionIDRequestNumLogicalHostIDAcctStringWDIDOpEnvIDSysConIDClassificationTimeExceptionTimeExceptionValueExceptionActionNewWDIDExceptionCodeExceptionSubCodeErrorTextExtraInfoRuleIDWarningOnly
Chapter 3: System Views: Usage and ExamplesQryLogExceptions[V]
382 Data Dictionary
Example
The following SELECT statement retrieves the main view for QryLogExceptions:
SELECT * from DBC.QryLogExceptions;
The output of this statement is:
ProcID 16383 CollectTimeStamp 2004-06-21 16:38:34.21 QueryID 201205134619838011
UserName TEST1SessionID ?
RequestNum ?LogicalHostID 1
AcctString DBCWDID ?
OpEnvID ? SysConID ?ClassificationTime ?
ExceptionTime 2004-06-21 17:38:34.21ExceptionValue ?
ExceptionAction ?NewWDID ?
ExceptionCode 3,152ExceptionSubCode ?
ErrorText No access allowed, For all requests, For user TEST1, Regulation applies from 00:00 to 24:00
ExtraInfo ? RuleID ? WarningOnly ?
Chapter 3: System Views: Usage and ExamplesQryLogExplain[V]
Data Dictionary 383
QryLogExplain[V]
The QryLogExplain view contains the "Explain" of the query.
Corresponding System Table
The corresponding system table for this view is DBC.DBQLExplainTbl.
Usage Notes
Since the explain can be larger than 64KB, it may use multiple rows to hold the data.
Example
SELECT queryid, explaintext FROM qrylogexplain WHERE queryid = 201205134619838011;
The output is:
QueryID 201205134619838011ExplainText 1) First, we lock a distinct DBC."pseudo table" for read on a RowHash to prevent global deadlock for DBC.DBSpace. 2) Next, we lock DBC.DBSpace for read, we lock DBC.dbase for access, and we lock DBC.SessionTbl for access.3) We flush the DISKSPACE and AMPUSAGE caches.4) We execute the following steps in parallel.
1) We do an all-AMPs RETRIEVE step from DBC.dbase by way of an all-rows scan into Spool 2 (all_amps), which is built locally on the AMPs. Then we do a SORT to order Spool 2 by row hash. The size of Spool 2 is estimated with low confidence to be 10 rows. The estimated time for this step is 1 hour and 1 minute.
2) We do an all-AMPs RETRIEVE step from DBC.SessionTbl by way of an all-rows scan with no residual conditions into Spool 4 (all_amps), which is redistributed by hash code to all AMPs. Then we do a SORT to order Spool 4 by the sort key in spool field1 eliminating duplicate rows. The size of Spool 4 is estimated with low confidence to be 2 rows. The estimated time for this step is 1 hour and 1 minute.
5) We do an all-AMPs RETRIEVE step from Spool 4 (Last Use) by way of an all-rows scan into Spool 3 (all_amps), which is duplicated on all AMPs. Then we do a SORT to order Spool 3 by row hash. The size of Spool 3 is estimated with no confidence to be 4 rows.6) We execute the following steps in parallel.
View Name User Type Columns Selected
DBC.QryLogExplain[V] Teradata DatabaseAdministrator
ProcIDCollectTimestampQueryIDExpRowNoExplainText
Chapter 3: System Views: Usage and ExamplesQryLogExplain[V]
384 Data Dictionary
1) We do an all-AMPs JOIN step from Spool 2 (Last Use) by way of an all-rows scan, which is joined to Spool 3 (Last Use) by way of an all-rows scan. Spool 2 and Spool 3 are joined using an exclusion merge join, with a join condition of ("DatabaseName = UserName"). The result goes into Spool 5 (all_amps), which is duplicated on all AMPs. The size of Spool 5 is estimated with index join confidence to be20 rows. The estimated time for this step is 1 hour and 1 minute.
2) We do an all-AMPs RETRIEVE step from DBC.DBSpace by way of an all-rows scan into Spool 6 (all_amps), which is built locally on the AMPs. The size of Spool 6 is estimated with low confidence to be 134 rows. The estimated time for this step is 1 hour and 1 minute. \
7) We do an all-AMPs JOIN step from Spool 5 (Last Use) by way of an all-rows scan, which is joined to Spool 6 (Last Use) by way of an all-rows scan. Spool 5 and Spool 6 are joined using a single partition hash join, with a join condition of ("DatabaseId = DatabaseId"). The result goes into Spool 1 (group_amps), which is built locally on the AMPs. Then we do a SORT to order Spool 1 by the sort key in spool field1. The size of Spool 1 is estimated with index join confidence to be 134 rows. The estimated time for this step is 1 hour and 1 minute. 8) Finally, we send out an END TRANSACTION step to all AMPs involved in processing the request. -> The contents of Spool 1 are sent back to the user as the result of statement 1. The total estimated time is 1 hour and 1 minute.
Note: The ExplainText does not contain any format. It is just one long string. The example
was manually edited to add the line breaks to make it look more presentable.
Chapter 3: System Views: Usage and ExamplesQryLogObjects[V]
Data Dictionary 385
QryLogObjects[V]
The QryLogObjects view is populated if object information is requested for the query in addition to the default information row.
A row for each object (database, table, column, and index) is used. If the object is a secondary index, its number and use are logged.
Corresponding System Table
The corresponding system table for this view is DBC.DBQLObjTbl.
Usage Notes
If objects are requested, object information is stored in a DBQL table that contains a row for each object used in the query.
Object frequency can also be logged. This is the number of times an object is used in a query.
View Name User Type Columns Selected
DBC.QryLogObjects[V] Teradata DatabaseAdministrator
ProcIDCollectTimeStampQueryIDObjectDatabaseNameObjectTableNameObjectColumnNameObjectIDObjectNumObjectTypeFreqofUseTypeofUse
IF the object is … THEN …
an index the field ID is logged instead of a name.
a column • the field ID is logged instead of a name
• the object ID can be used to quality the field ID, which is not unique across the system.
Chapter 3: System Views: Usage and ExamplesQryLogObjects[V]
386 Data Dictionary
Example
The following SELECT statement retrieves the object information of a query:
SELECT QueryID, ObjectDatabaseName (Named ObjDBName), ObjectTableName (Named ObjTblName), ObjectColumnName (Named ObjColName), ObjectID (Named ObjId), ObjectNum (Named ObjNum), ObjectType (Named ObjType), FreqofUse FROM DBC.QryLogObjects where queryid = 201205134619838031;
QueryID ObjDBName ObjTblName ObjColName ObjID ObjNum ObjType FreqofUse------------------ ----------- ---------- ---------- -------- ------- -------- ---------201205134619838031 D_PERSONNEL ? ? 00001604 0 DB 1201205134619838031 D_PERSONNEL DEPARTMENT ? 00009005 0 Tab 1201205134619838031 D_PERSONNEL DEPARTMENT DeptNo 00009005 1,025 Col 2201205134619838031 D_PERSONNEL DEPARTMENT DeptName 00009005 1,026 Col 1201205134619838031 D_PERSONNEL DEPARTMENT EmpCount 00009005 1,027 Col 1201205134619838031 D_PERSONNEL DEPARTMENT Loc 00009005 1,028 Col 1
Chapter 3: System Views: Usage and ExamplesQryLogSQL[V]
Data Dictionary 387
QryLogSQL[V]
The QryLogSQL view holds the full SQL text.
Corresponding System Table
The corresponding system table for this view is DBC.DBQLSQLTbl.
Usage Notes
This view is populated if the SQL is requested for the query in addition to the default information row. If the additional SQL text is greater than 64KB, multiple rows are generated.
Example
The following SELECT statement retrieves the SQL text information of a query:
SELECT QueryID, SqlRowNo, SqlTextInfo from DBC.QryLogSQL WHERE QueryId=201205134619838024;
QueryID SqlRowNo SqlTextInfo ------------------ --------- ---------------------------- 201205134619838024 1 CREATE TABLE DR14082.suc , FALLBACK , NO BEFORE JOURNAL, NO AFTER JOURNAL (i INTEGER, i2 INTEGER) PRIMARY INDEX( i );
Note: The SQL text is not edited to remove any blanks; it is stored the same way you entered
the text.
View Name User Type Columns Selected
DBC.QryLogSQL[V] Teradata DatabaseAdministrator
ProcIDCollectTimestampQueryIDSqlRowNoSqlTextInfo
Chapter 3: System Views: Usage and ExamplesQryLogSteps[V]
388 Data Dictionary
QryLogSteps[V]
The QryLogSteps view is populated by step-level information.
Corresponding System Table
The corresponding system table for this view is DBC.DBQLStepTbl.
View Name User Type Columns Selected
DBC.QryLogSteps[V] Teradata DatabaseSecurityAdministrator
ProdIDCollectTimestampQueryIDStepLev1NumStepLev2NumStepNameStepStartTimeStepStopTimeElapsedTimeEstProcTimeEstCPUCostCPUtimeIOcountEstRowCountRowCountRowCount2 RowCount3NumOfActiveAMPsMaxAmpCPUTimeMaxCPUAmpNumberMinAmpCPUTimeMaxAmpIOMaxIOAmpNumberMinAmpIOSpoolUsageMaxAMPSpoolMaxSpoolAmpNumberMinAMPSpoolStepWDLSNUtilityTableIdRowsWComprColumnsEstIOCostEstNetCostEstHRCostCPUTimeNormMaxAmpCPUTimeNormMaxCPUAmpNumberNormMinAmpCPUTimeNorm
Chapter 3: System Views: Usage and ExamplesQryLogSteps[V]
Data Dictionary 389
Usage Notes
If the step information of the query is requested, a step table is populated with a row for each step.
Example
The following SELECT statement retrieves the step-level information of a query:
SELECT QueryID, StepLev1Num (Named StepLev1), StepLev2Num (Named StepLev2), StepName, StepStartTime, StepStopTime, RowCountFROM DBC.QryLogSteps where QueryID = 201205134619838027;
QueryID StepLev1 StepLev2 StepName StepStartTime StepStopTime RowCount------------------ -------- -------- -------- ------------------------- --------------------------- --------201205134619838027 1 0 MLK 2004-07-08 20:37:22.76000 2004-07-08 20:37:23.100000 1201205134619838027 2 0 MLK 2004-07-08 20:37:23.34000 2004-07-08 20:37:23.130000 1201205134619838027 3 0 MLK 2004-07-08 20:37:23.28000 2004-07-08 20:37:23.150000 1201205134619838027 4 1 SAT 2004-07-08 20:37:23.43000 2004-07-08 20:37:23.230000 0201205134619838027 4 2 SAT 2004-07-08 20:37:23.23000 2004-07-08 20:37:23.150000 0201205134619838027 4 3 INS 2004-07-08 20:37:23.14000 2004-07-08 20:37:23.290000 1201205134619838027 4 4 INS 2004-07-08 20:37:23.24000 2004-07-08 20:37:23.150000 1201205134619838027 4 5 INS 2004-07-08 20:37:23.11000 2004-07-08 20:37:24.120000 1201205134619838027 4 6 INS 2004-07-08 20:37:23.13000 2004-07-08 20:37:24.180000 1201205134619838027 4 7 CTRts 2004-07-08 20:37:24.17000 2004-07-08 20:37:25.190000 1201205134619838027 5 0 Ctb 2004-07-08 20:37:25.20000 2004-07-08 20:37:25.240000 1201205134619838027 6 0 Edt 2004-07-08 20:37:25.22000 2004-07-08 20:37:25.280000 1
In this example, Step 4 contains seven parallel steps. The remaining five steps are single steps.
Chapter 3: System Views: Usage and ExamplesQryLogSummary[V]
390 Data Dictionary
QryLogSummary[V]
The QryLogSummary view is populated only if summary information is requested or a threshold value is used.
Corresponding System Table
The corresponding system table for this view is DBC.DBQLSummaryTbl.
Usage Notes
For the summary case, a row exists for each collection if the count of the queries run in that time frame (LowHist to HighHist) is greater than 0.
For threshold, one row (with LowHist=ThreshValue and HighHist=0) exists for the collection if there were queries shorter than LowHist seconds.
Example
The following SELECT statement retrieves the summary information of a session:
If logging was initiated with “Begin Query Logging limit Summary = 5,10,20 IOcount on all;”
View Name User Type Columns Selected
DBC.QryLogSummary[V] Teradata DatabaseSecurityAdministrator
ProcIDCollectTimeStampUserID AcctString LogicalHostIDAppIDClientIDClientAddrProfileIDSessionIDQueryCountValueTypeQuerySecondsAverageTimeTotalIOCountAverageIOAMPCPUTimeAverageAmpCPUParserCPUTimeAverageParserCPUAMPCPUTimeNormAverageAmpCPUNormParserCPUTimeNormAverageParserCPUNormLowHistHighHist
Chapter 3: System Views: Usage and ExamplesQryLogSummary[V]
Data Dictionary 391
SELECT sessionid, valuetype, querycount, averageio, totaliocount,lowhistFROM qrylogsummary WHERE sessionid = 1048 or sessionid = 1049 or sessionid = 1050 ORDER BY collecttimestamp, sessionid, lowhist;
SessionID ValueType QueryCount AverageIO TotalIOCount LowHist--------- --------- ---------- ----------- ------------ -------
1,048 I 31 4 0.001,048 I 6 9 56 5.001,048 I 15 15 224 10.001,048 I 54 65 3,519 20.001,049 I 2 981 1,962 20.001,050 I 1 8 8 5.00
1,050 I 1 24 24 20.00
Chapter 3: System Views: Usage and ExamplesQryLogTDWM[V]
392 Data Dictionary
QryLogTDWM[V]
The QryLogTDWM stores the defined default row.
Corresponding System Table
The corresponding system table for this view is DBC.DBQLogTbl.
Usage Notes
The non-unique primary index for this view is a combination of two fields: ProcID and CollectTimeStamp. This combination causes each dispatcher to write its DBQL cache entries to a single AMP. This is important for database efficiency.
View Name User Type Columns Selected
DBC.QryLogTDWM[V] Teradata DatabaseAdministrator
ProcID CollectTimeStamp QueryID UserID UserNameDefaultDatabase AcctStringLastStateChange DelayTime WDID OpenvIDSysConID LSN NoClassification WDOverride SLGMet ExceptionValue FinalWDID TDWMEstMaxRows TDWMEstLastRows TDWMEstTotalTime TDWMAllAmpFlag TDWMConfLevelUsed
Chapter 3: System Views: Usage and ExamplesQryLogTDWM[V]
Data Dictionary 393
Example
The following SELECT statement retrieves the main view for QryLogTDWM:
SELECT * from DBC.QryLogTDWM;
The output of this statement is:
ProcID 16383 CollectTimeStamp 2007-10-10 10:23:32 QueryID 163831422988553055 UserID 00000100 UserName DBC DefaultDatabase DBC AcctString DBC LastStateChange 2007-10-09 17:25:48.90 DelayTime ? WDID 1 OpEnvID 1 SysConID 1 LSN ? NoClassification WDOverride SLGMet T ExceptionValue ? FinalWDID 1 TDWMEstMaxRows 6 TDWMEstLastRows 6 TDWMEstTotalTime 0.033949 TDWMAllAmpFlag TTDWMConfLevelUsed N
Chapter 3: System Views: Usage and ExamplesQryLogTDWMSum[V]
394 Data Dictionary
QryLogTDWMSum[V]
Each row in the QryLogTDWMSum view contains the summary of the workload definition activity per WD/WDPeriod per vproc for a pre-determined period.
Corresponding System Table
The corresponding system table for this view is DBC.TDWMSummaryLog.
Usage Notes
This view contains a historical record of WD activity. The default option is for a WD to log summary information.
Example
The following SELECT statement retrieves the main view for QryLogTDWMSum:
SELECT * from DBC.QryLogTDWMSum;
The output of this statement is:
ProcID 16383CollectTimeStamp 2005-04-07 11:17:04 WDID 1 OpEnvID ? SysConID ? StartColTime 2005-04-07 11:15:03.89
View Name User Type Columns Selected
DBC.QryLogTDWMSum[V] Teradata DatabaseAdministrator
ProcIDCollectTimeStampWDIDOpEnvIDSysConIDStartColTimeArrivalsActiveCountCompletionsMinRespTimeMaxRespTimeAvgRespTimeMinCPUTimeMaxCPUTimeAvgCPUTimeDelayedCountAvgDelayTimeExceptionCountAbortCountErrorCountOtherCountMetSLGCount
Chapter 3: System Views: Usage and ExamplesQryLogTDWMSum[V]
Data Dictionary 395
Arrivals 209 ActiveCount 1 Completions 208 MinRespTime .00 MaxRespTime 1.70 AvgRespTime .05 MinCPUTime .00 MaxCPUTime 40 AvgCPUTime .03 DelayedCount 0 AvgDelayTime 0 ExceptionCount 0 AbortCount 0 ErrorCount 0 OtherCount 0 MetSLGCount 208
Chapter 3: System Views: Usage and ExamplesRCC_Configuration[V][X]
396 Data Dictionary
RCC_Configuration[V][X]
The RCC_Configuration view is the product of a join on the Events table and the Configuration table (see Events[V][X] and Events_Configuration[V][X]). It provides information about checkpoint statements and client system utility functions that did not affect all AMPs.
Corresponding System Tables
The corresponding system table for DBC.RCC_Configuration[V] is DBC.RCConfiguration.
The corresponding system tables for DBC.RCC_Configuration[V]X are:
• DBC.AccessRights
• DBC.DBase
• DBC.Owners
• DBC.RCConfiguration
• DBC.RCEvent
• DBC.RoleGrants
• DBC.Roles
The X 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;
View Name User Type Columns Selected
DBC.RCC_Configuration[V][X] Operations Control EventNumLogProcessorPhyProcessorVprocProcessorStateRestartSeqNum
Chapter 3: System Views: Usage and ExamplesRCC_Configuration[V][X]
Data Dictionary 397
EventNum LogProcessor PhyProcessor-------- ------------ ------------
21 1 1-075 1 1-088 1 1-0. . .. . .21 2 1-275 2 1-2. . .. . .
Chapter 3: System Views: Usage and ExamplesRCC_Media[V][X]
398 Data Dictionary
RCC_Media[V][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
The corresponding system table for DBC.RCC_Media[V] is DBC.RCMedia.
The corresponding system tables for DBC.RCC_Media[V]X are:
• DBC.AccessRights
• DBC.DBase
• DBC.Owners
• DBC.RCEvent
• DBC.RCMedia
• DBC.RoleGrants
• DBC.Roles
The X 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[V][X] Operations Control EventNumVolSerialIdVolSequenceNumDupeDumpSet
Chapter 3: System Views: Usage and ExamplesRepTables[V][X]
Data Dictionary 399
RepTables[V][X]
The RepTables view returns all the replication groups defined in the system and all their member tables.
Corresponding System Tables
The corresponding system tables for RepTables[V] are:
• DBC.RepGroup
• DBC.TVM
The corresponding system tables for RepTables[V]X are:
• DBC.AccessRights
• DBC.Dbase
• DBC.Owners
• DBC.RepGroup
• DBC.RoleGrants
• DBC.Roles
• DBC.TVM
Example
The following SELECT statement selects all rows and all columns from the RepTables view.
==> sel * from dbc.reptables;
*** Query completed. 2 rows found. 2 columns returned. *** Total elapsed time was 1 second.
GroupName TableName------------------------------ ------------------------------repas_02 as_09repas_02 as_05
View Name User Type Columns Selected
DBC.RepTables[V][X] All GroupNameTableName
Chapter 3: System Views: Usage and ExamplesRestrictedWords[V]
400 Data Dictionary
RestrictedWords[V]
The RestrictedWords view returns a list of words that can be restricted from being part of a password string.
For a complete list of restricted words, see Security Administration.
Corresponding System Tables
The corresponding system table for RestrictedWords[V] is DBC.PasswordRestrictions.
View Name User Type Columns Selected
DBC.RestrictedWords[V] All RestrictedWord
Chapter 3: System Views: Usage and ExamplesRI_Child_Tables[V][X]
Data Dictionary 401
RI_Child_Tables[V][X]
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 System Tables
The corresponding tables for DBC.RI_Child_Tables[V] is DBC.ReferencingTbl.
The corresponding tables for DBC.RI_Child_Tables[V]X are:
• DBC.AccessRights
• DBC.Dbase
• DBC.Owners
• DBC.ReferencingTbls
• DBC.RoleGrants
• DBC.Roles
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[V][X] All users IndexIDIndexNameChildDbIDChildTIDChildKeyFIDParentDbIDParentTIDParentKeyFIDInconsistencyFlagCreatorNameCreateTimeStamp
Chapter 3: System Views: Usage and ExamplesRI_Distinct_Children[V][X]
402 Data Dictionary
RI_Distinct_Children[V][X]
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
The corresponding system tables for DBC.RI_Distinct_Children[V] are:
• DBC.DBase
• DBC.ReferencingTbls
• DBC.TVM
The corresponding system tables for DBC.RI_Distinct_Children[V]X are:
• DBC.AccessRights
• DBC.DBase
• DBC.Owners
• DBC.ReferencingTbls
• DBC.RoleGrants
• DBC.Roles
• DBC.TVM
View Name User Type Columns Selected
DBC.RI_Distinct_Children[V][X] All users IndexIDIndexNameChildDBChildTableParentDBParentTableInconsistencyFlagCreatorNameCreateTimeStamp
Chapter 3: System Views: Usage and ExamplesRI_Distinct_Parents[V][X]
Data Dictionary 403
RI_Distinct_Parents[V][X]
The RI_Distinct_Parents provides information about tables in parent-child order without the duplication that could result from multi-column foreign keys.
Corresponding System Tables
The corresponding system tables for DBC.RI_Distinct_Parents[V] are:
• DBC.Dbase
• DBC.ReferencedTbls
• DBC.TVM
The corresponding system tables for DBC.RI_Distinct_Parents[V]X are:
• DBC.AccessRights
• DBC.Dbase
• DBC.Owners
• DBC.ReferencedTbls
• DBC.RoleGrants
• DBC.Roles
• DBC.TVM
View Name User Type Columns Selected
DBC.RI_Distinct_Parents[V][X] All users IndexIDIndexNameParentDBParentTableChildDBChildTableInconsistencyFlagCreatorNameCreateTimeStamp
Chapter 3: System Views: Usage and ExamplesRI_Parent_Tables[V][X]
404 Data Dictionary
RI_Parent_Tables[V][X]
The RI_Parent_Tables view provides information about all tables in parent-child order.
Corresponding System Tables
The corresponding system table for DBC.RI_Parent_Tables[V] is DBC.ReferencedTbls.
The corresponding system tables for DBC.RI_Parent_Tables[V]X are:
• DBC.AccessRights
• DBC.DBase
• DBC.Owners
• DBC.ReferencedTbls
• DBC.RoleGrants
• DBC.Roles
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[V][X] All users IndexIDIndexNameParentDbIDParentTIDParentKeyFIDChildDbIDChildTIDChildKeyFIDInconsistencyFlagCreatorNameCreateTimeStamp
Chapter 3: System Views: Usage and ExamplesRoleInfo[V][X]
Data Dictionary 405
RoleInfo[V][X]
The RoleInfo view returns the names of the role creators corresponding to each role.
Corresponding System Table
The corresponding system table for this view is DBC.Dbase.
Example
The following SELECT statement returns the names of the role creators:
==> SELECT rolename (char(8)), creatorname (char(8)), commentstring (char(20)), createtimestamp, ExtRole from dbc.roleinfo;
*** Query completed. 2 rows found. 4 columns returned.*** Total elapsed time was 1 second.
RoleName CreatorName CommentString CreateTimeStamp ExtRole-------- ----------- -------------------- ------------------- -------r1 u1 Comments on r1 2002-08-13 10:26:19 Nr2 u2 Comments on r2 2002-08-13 10:26:25 Y
View Name User Type Columns Selected
DBC.RoleInfo[V][X] Teradata DatabaseSecurity Administrator
[X]End User
RoleNameCreatorNameCommentStringCreateTimeStampExtRole
Chapter 3: System Views: Usage and ExamplesRoleMembers[V][X]
406 Data Dictionary
RoleMembers[V][X]
The RoleMembers view lists each role that has members and all of its members. The RoleMembersX view lists all roles, if any, directly granted to the user.
Corresponding System Tables
The corresponding system tables for this view are:
• DBC.Dbase
• DBC.RoleGrants
• DBC.Roles
Usage Notes
The RoleMembersX view does not have the Grantee and GranteeKind columns.
Roles without members are excluded from the result set of RoleMembers.
Example
The following query lists all roles and their members:
SELECT CAST(rolename AS CHAR(15)), CAST(grantee AS CHAR(20)),
CAST(grantor AS CHAR(20)),whengranted
FROM dbc.rolemembers ORDER BY 1,2;*** Query completed. 113 rows found. 4 columns returned.*** Total elapsed time was 1 second.
RoleName Grantee Grantor WhenGranted---------- -------- -------- --------------------role_a user_1 DBA 97-10-15 14:32:59role_a user_2 DBA 97-10-15 11:00:01role_b user_1 SysFe 98-04-24 09:10:15. . . . . . . . . . . .
View Name User Type Columns Selected
DBC.RoleMembers[V][X] Teradata DatabaseSecurityAdministrator
[X]End User
RoleNameGranteeGranteeKindGrantorWhenGrantedDefaultRoleWithAdmin
Chapter 3: System Views: Usage and ExamplesSecurityDefaults[V]
Data Dictionary 407
SecurityDefaults[V]
The SecurityDefaults view describes the password features selected for the site.
Corresponding System Table
The corresponding system table for this view is DBC.SysSecDefaults.
Related Topics
For more information on controlling access, space, and ownership, see the following manuals:
• Database Administration
• Database Design
• Security Administration
View Name User Type Columns Selected
DBC.SecurityDefaults[V] Teradata DatabaseSecurityAdministrator
ExpirePasswordPasswordMinCharPasswordMaxCharPasswordDigitsPasswordSpecCharPasswordRestrictWordsMaxLogonAttemptsLockedUserExpirePasswordReuse
Chapter 3: System Views: Usage and ExamplesSecurityLog[V][X]
408 Data Dictionary
SecurityLog[V][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.
Corresponding System Tables
The corresponding system table for DBC.SecurityLog[V] is DBC.AccLogTbl.
The corresponding system tables for DBC.SecurityLog[V]X are:
• DBC.AccLogTbl
• DBC.DBase
• DBC.Owners
This view also references the userdb view.
Note: Note that the column named DatabaseName was previously named ObjectName.
Usage Notes
For an explanation of the BEGIN/END LOGGING statements, see SQL Reference: Data Definition Statements.
View Name User Type Columns Selected
DBC.SecurityLog[V][X] Teradata DatabaseSecurityAdministrator
LogDateLogTimeLogTypeUserNameAccountNameDatabaseNameTableNameText
Chapter 3: System Views: Usage and ExamplesSessionInfo[V][X]
Data Dictionary 409
SessionInfo[V][X]
The SessionInfo view provides information about users who are currently logged on.
Corresponding System Table
The corresponding system table for this view is DBC.SessionTbl.
Usage Notes
Information about current session pools, which are a collection of sessions that are logged on to the Teradata Database under the same logonid, may be accessed by entering the DISPLAY POOL command. For more information on DISPLAY POOL, see Teradata Director Program Reference.
Note that AccountName is the current unexpanded account name for the session.
Example
The following SELECT statement displays information on all current sessions:
==> SELECT UserName, SessionNo, DefaultDatabase, LogonSourceFROM DBC.SessionInfo;
View Name User Type Columns Selected
DBC.SessionInfo[V][X] Teradata DatabaseAdministrator
Teradata DatabaseSecurity Administrator
Supervisory
[X]End User
UserNameAccountNameSessionNoDefaultDatabaseIFPNoPartitionLogicalHostIdHostNoCurrentCollationLogonDateLogonTimeLogonSequenceNoLogonSourceExpiredPasswordTwoPCModeTransaction_ModeCurrentRoleProfileNameLogonAcctLDAPAuditTrailIdCurIsolationLevelQueryBand
Chapter 3: System Views: Usage and ExamplesSessionInfo[V][X]
410 Data Dictionary
UserName SessionNo DefaultDatabase LogonSource--------- --------- --------------- ------------BAS 1,020 BAS VM TDPMSOFTDOC 1,016 Personnel MVS TDPGUserTest 1,008 DBC
Example: LogonSource
The following screen displays LogonSource information from the current sessions:
==>sel logonsource from dbc.sessiontbl;
MVS TDRM ASG TSO ASG SOCAL IKJEFT01MVS TDRM ASG TSO ASG SOCAL IKJEFT01(TCP/IP) A4D1 153.64.116.182 CS4300S1 2345 ROOT BTEQ 01 LSS(TCP/IP) A4D0 153.64.116.182 CS4300S1 2345 ROOT BTEQ 01 LSSMVS TDRM ASG TSO ASG SOCAL IKJEFT01(TCP/IP) A4D2 153.64.116.182 CS4300S1 2345 ROOT BTEQ 01 LSSMVS TDRM ASG TSO ASG SOCAL IKJEFT01MVS TDRM ASG TSO ASG SOCAL IKJEFT01MVS TDRM ASG TSO ASG SOCAL IKJEFT01(TCP/IP) A4D3 153.64.116.182 CS4300S1 2345 ROOT BTEQ 01 LSSMVS TDRM ASG TSO ASG SOCAL IKJEFT01MVS TDRM ASG TSO ASG SOCAL IKJEFT01(TCP/IP) A4D4 153.64.116.182 CS4300S1 2345 ROOT BTEQ 01 LSS
Chapter 3: System Views: Usage and ExamplesShowColChecks[V][X]
Data Dictionary 411
ShowColChecks[V][X]
The ShowColChecks view provides information about column constraints.
Corresponding System Tables
The corresponding system tables for DBC.ShowColChecks[V] are:
• DBC.DBase
• DBC.TVFields
• DBC.TVM
The corresponding system tables for DBC.ShowColChecks[V]X are:
• DBC.DBase
• DBC.Owners
• DBC.RoleGrants
• DBC.Roles
• DBC.TVFields
• DBC.TVM
View Name User Type Columns Selected
DBC.ShowColChecks[V][X] End User
Teradata DatabaseAdministrator
DatabaseNameTableNameColumnNameColCheckCreatorNameCreateTimeStamp
Chapter 3: System Views: Usage and ExamplesShowTblChecks[V][X]
412 Data Dictionary
ShowTblChecks[V][X]
The ShowTblChecks view provides information about table constraints.
If you look at the ShowTblChecks view and the Table_LevelConstraints view, they have the same columns selected. The main difference is ShowTblChecks selects the uppercased databasename and tablename while Table_LevelConstraints selects the databasename and tablename as they were entered by the user. Also the column names are named with some differences.
Corresponding System Tables
The corresponding system tables for DBC.ShowTblChecks[V] are:
• DBC.DBase
• DBC.TableContraints
• DBC.TVM
The corresponding system tables for DBC.ShowTblChecks[V]X are:
• DBC.DBase
• DBC.Owners
• DBC.RoleGrants
• DBC.Roles
• DBC.TableConstraints
• DBC.TVM
View Name User Type Columns Selected
DBC.ShowTblChecks[V][X] End User
Teradata DatabaseAdministrator
DatabaseNameTableNameCheckNameTblCheckCreatorNameCreateTimeStamp
Chapter 3: System Views: Usage and ExamplesSoftware_Event_Log[V]
Data Dictionary 413
Software_Event_Log[V]
The Software_Event_Log view provides information about logged software events originating in the Parallel Data Extensions (PDE) or the Teradata Database.
Corresponding System Table
The corresponding system table for this view is DBC.SW_Event_Log.
Usage Notes
For Database Query Manager, the following fields are not used:
• Category
• Severity
• PMA
• Vproc
• Partition
• Task
• TheFunction
• SW_Version
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’ ;
View Name User Type Columns Selected
DBC.Software_Event_Log[V] Operations Control TheDate TheTime Event_Tag CategorySeverityPMAVprocPartitionTaskTheFunction SW_Version LineText
Chapter 3: System Views: Usage and ExamplesSoftware_Event_Log[V]
414 Data Dictionary
The result has the following form:
TheDate TheTime Category Severity-------- -------- -------- --------92/08/20 10:10:30 4 50
Chapter 3: System Views: Usage and ExamplesTable_LevelConstraints[V][X]
Data Dictionary 415
Table_LevelConstraints[V][X]
The Table_LevelConstraints view provides information about table constraints.
If you look at the ShowTblChecks view and the Table_LevelConstraints view, they have the same columns selected. The main difference is ShowTblChecks selects the uppercased databasename and tablename while Table_LevelConstraints selects the databasename and tablename as they were entered by the user. Also, the column names are named with some differences.
Corresponding System Tables
The corresponding system tables for DBC.Table_LevelConstraints[V] are:
• DBC.DBase
• DBC.TableContraints
• DBC.TVM
The corresponding system tables for DBC.Table_LevelConstraints[V]X are:
• DBC.DBase
• DBC.Owners
• DBC.RoleGrants
• DBC.Roles
• DBC.TableContraints
• DBC.TVM
View Name User Type Columns Selected
DBC.Table_LevelConstraints[V][X] End User
Teradata DatabaseAdministrator
DatabaseNameTableNameConstraintNameConstraintTextCreatorNameCreateTimeStamp
Chapter 3: System Views: Usage and ExamplesTables[V][X]
416 Data Dictionary
Tables[V][X]
The Tables view provides information about tables, views, stored procedures, join indexes, macros, user-defined types, user-defined methods, and user-defined functions.
Corresponding System Tables
The corresponding system tables for DBC.Tables[V] are:
• DBC.DBase
• DBC.TVM
The corresponding system tables for DBC.Tables[V]X are:
• DBC.AccessRights
• DBC.DBase
• DBC.Owners
• DBC.RoleGrants
• DBC.Roles
• DBC.TVM
Note: The DBC.TVM table contains one row for each table, view, stored procedures, join indexes, macros, user-defined types, user-defined methods, or user-defined functions.
View Name User Type Columns Selected
DBC.Tables[V][X] [X]End User
Teradata DatabaseAdministrator
DatabaseNameTableNameVersionTableKindProtectionTypeJournalFlagCreatorNameRequestTextCommentStringParentCountChildCountNamedTblCheckCountUnnamedTblCheckExistPrimaryKeyIndexIdRepStatusCreateTimeStampLastAlterNameLastAlterTimeStampRequestTxtOverFlowAccessCountLastAccessTimeStampUtilVersionQueueFlagCommitOptTransLog
Chapter 3: System Views: Usage and ExamplesTables[V][X]
Data Dictionary 417
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 Database 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.
If the table is renamed, the RequestText still contains the old table name. The new table name is not put in the RequestText.
The UtilVersion column may be zero or null for tables created prior to V2R6.0. For tables created in V2R6.0 or later, both Version and UtilVersion are initially one.
The following table shows when the UtilVersion column is modified, and how it’s modified:
The Version column is increased by one for any data definition change other than enabling or disabling journaling for the table. Version in the above table is the version after it’s been incremented.
The following table shows how the UtilVersion column is checked when selected partitions are restored or copied:
Note: To restore or copy selected partitions, the table must already exist.
Example
The following SELECT statement displays information about tables, views, and macros in the Personnel database.
UtilVersion Current Value Data Definition ChangeNew Value or UtilVersion
Any value Significant change (by an ALTER TABLE statement) to keep an archive from being restored or copied.
= Version
Null or zero Not significant Version -1
Any other value Not significant No change
UtilVersion Value Requirements
Null or zero The Version of the archive must match the Version of the table.
Any other value If the archive UtilVersion is zero, the Version of the Archive must match the UtilVersion of the table; otherwise, the UtilVersion column of the archive must equal the UtilVersion of the table.
Chapter 3: System Views: Usage and ExamplesTables[V][X]
418 Data Dictionary
==> SELECT TableName,CreatorName,TableKind,ProtectionType FROM DBC.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
Chapter 3: System Views: Usage and ExamplesTables2[V][X]
Data Dictionary 419
Tables2[V][X]
The Tables2 view provides ID definition and RI count 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, and so forth) provided by the Tables view.
Corresponding System Table
The corresponding system table for DBC.Tables2[V] is DBC.TVM.
The corresponding system tables for DBC.Tables2[V]X are:
• DBC.AccessRights
• DBC.Owners
• DBC.RoleGrants
• DBC.Roles
• DBC.TVM
View Name User Type Columns Selected
DBC.Tables2[V][X] Teradata DatabaseAdministrator
Supervisory
TVMNameTVMIdDatabaseIdParentCountChildCount
Chapter 3: System Views: Usage and ExamplesTableSize[V][X]
420 Data Dictionary
TableSize[V][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, hash index, or account.
Corresponding System Tables
The corresponding system tables for DBC.TableSize[V] are:
• DBC.DatabaseSpace
• DBC.DBase
• DBC.TVM
The corresponding system tables for DBC.TableSize[V]X are:
• DBC.AccessRights
• DBC.DatabaseSpace
• DBC.DBase
• DBC.Owners
• DBC.RoleGrants
• DBC.Roles
• DBC.TVM
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 Database (or for all AMPs if the SUM aggregate is used).
View Name User Type Columns Selected
DBC.TableSize[V][X] End User
Teradata DatabaseAdministrator
VprocDatabaseNameAccountName (unexpanded account name)TableNameCurrentPermPeakPerm
Chapter 3: System Views: Usage and ExamplesTableSize[V][X]
Data Dictionary 421
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
Chapter 3: System Views: Usage and ExamplesTableText[V][X]
422 Data Dictionary
TableText[V][X]
The TableText view provides complete RequestText for an object of T, V, and M kinds when the RequestTxtOverFlow in the TVM for the object is set to ’R.’
Corresponding System Tables
The corresponding system tables for DBC.TableText[V] are:
• DBC.DBase
• DBC.TextTbl
• DBC.TVM
The corresponding system tables for DBC.TableText[V]X are:
• DBC.AccessRights
• DBC.DBase
• DBC.Owners
• DBC.RoleGrants
• DBC.Roles
• DBC.TextTbl
• DBC.TVM
Usage Notes
The Request Text data reflects the definitions specified by the user for the object.
View Name User Type Columns Selected
DBC.TableText[V][X] End User
Teradata DatabaseAdministrator
DatabaseNameTableNameTableKindRequestTextLineNo
IF the request text … THEN the request text is saved in …
is up to 12500 characters TVM
exceeds 12500 characters
The RequestTxtOverFlow flag is set to ’R.’
DBC.TextTbl
This view returns the complete text of the object definition.
Note: Users do not need to use this view if there is no overflow in TVM.
Chapter 3: System Views: Usage and ExamplesTableText[V][X]
Data Dictionary 423
The Request Text for an object could be stored in one or more rows depending on the size of the text. The LineNo column provides the sequence of multiple rows stored in the TextTbl for the object.
To put the text in a proper sequence, the user should select the text using ORDER BY clause on LineNo from this view.
Example
The following SELECT statement displays information about tables, views, and macros in the Personnel database, assuming that text for the database object is more than 12500 characters.
SELECT TableName,TableKind, LineNo, RequestText( char(50)) FROMDBC.TableText WHERE DatabaseName = 'Personnel' ORDER BY TableName, LineNo;
Chapter 3: System Views: Usage and ExamplesTriggers[V][X]
424 Data Dictionary
Triggers[V][X]
The Triggers view provides information about event-driven, specialized procedures attached to a single table and stored in the database.
Corresponding System Tables
The corresponding system tables for DBC.Triggers[V] are:
• DBC.DBase
• DBC.TriggersTbl
• DBC.TVM
The corresponding system tables for DBC.Triggers[V]X are:
• DBC.AccessRights
• DBC.DBase
• DBC.Owners
• DBC.RoleGrants
• DBC.Roles
• DBC.TriggersTbl
• DBC.TVM
Usage Notes
A trigger is defined by a CREATE TRIGGER data definition statement. An INSERT, UPDATE, or DELETE statement on the specified table whether directly or through a view based on the specified table causes the database to execute the trigger.
View Name User Type Columns Selected
DBC.Triggers[V][X] Teradata DatabaseAdministrator
DatabaseNameSubjectTableDatabaseNameTableNameTriggerNameEnabledFlagActionTimeEventKindOrderNumberTriggerCommentRequestTextCreatorNameCreateTimeStampLastAlterNameLastAlterTimeStampAccessCountLastAccessTimeStampCreateTxtOverflow
Chapter 3: System Views: Usage and ExamplesTriggers[V][X]
Data Dictionary 425
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.
For more information on triggers, see SQL Reference: Data Definition Statements.
Example 1
The following SELECT returns the following:
• Name of the database in which the triggering table is defined for those cases in which a trigger is defined in a different database than the triggering table
• Names of the triggering tables
• Names of the database in which the trigger is defined
• Trigger names
This query identifies those triggers for which the trigger must be dropped if the database containing the triggering table is deleted.
SELECT SubjectTableDatabaseName, TableName, DatabaseName, TriggerName FROM TriggersWHERE DatabaseName <> SubjectTableDatabaseNameORDER BY 1, 2, 3, 4;
Example 2
This query identifies those triggers for which the trigger must be dropped if the database containing the triggering table is deleted.
SELECT SubjectTableDatabaseName, TableName, DatabaseName, TriggerName FROM TriggersWHERE DatabaseName <> SubjectTableDatabaseName
ORDER BY 1, 2, 3, 4;
Chapter 3: System Views: Usage and ExamplesUserGrantedRights[V]
426 Data Dictionary
UserGrantedRights[V]
The UserGrantedRights view provides information about objects on which the current user has explicitly granted privileges to other users.
Corresponding System Tables
The corresponding system tables for this view are:
• DBC.AccessRights
• DBC.DBase
• DBC.TVFields
• DBC.TVM
This view also references the ownerdb view.
Example
The following SELECT statement displays all privileges 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[V] End User DatabaseNameTableNameColumnNameGranteeAccessRightGrantAuthorityAllnessFlagCreatorNameCreateTimeStamp
Chapter 3: System Views: Usage and ExamplesUserRights[V]
Data Dictionary 427
UserRights[V]
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, macros, user-defined types, user-defined methods, or user-defined functions.
Corresponding System Tables
Corresponding system tables for this view include the following:
• DBC.AccessRights
• DBC.DBase
• DBC.TVFields
• DBC.TVM
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 of a user due to ownership of objects, nor does it return information about privileges inherited by a user from PUBLIC or roles.
To obtain information about privileges inherited from roles, use the view UserRoleRights. For implicit privileges, use the views Children[X] and Tables[X] to determine all the objects owned by a user.
Example
The following SELECT statement displays information about all tables in the Personnel database on which privileges were granted to the requesting user.
View Name User Type Columns Selected
DBC.UserRights[V] End User DatabaseNameTableNameColumnNameAccessRightGrantAuthorityGrantorNameCreatorNameCreateTimeStamp
Chapter 3: System Views: Usage and ExamplesUserRights[V]
428 Data Dictionary
==> SELECT * FROM DBC.UserRightsWHERE DatabaseName=’Personnel’AND TableName = ’All’ ;
DatabaseName TableName AccessRight GrantorName------------ --------- ----------- -----------Personnel Employee R DBCPersonnel Employee U DBCPersonnel Employee I DBC
Chapter 3: System Views: Usage and ExamplesUserRoleRights[V]
Data Dictionary 429
UserRoleRights[V]
The UserRoleRights view lists all privileges granted to the current role of the user and its nested roles.
Corresponding System Tables
The corresponding system tables for this view are:
• DBC.AccessRights
• DBC.Dbase
• DBC.Roles
• DBC.TVFields
• DBC.TVM
Usage Notes
The UserRoleRights view is similar to the AllRoleRights view. However, UserRoleRights has additional WHERE conditions that restrict the result set to rows belonging to the current role of the user and all roles nested within that.
Example
The following SELECT statement returns all privileges granted to the current role of the user and the roles nested within the current role .
==> SELECT CAST(RoleName as CHAR(16)) as RoleName,CAST(DatabaseName as CHAR(15)) as Databases,CAST(TableName as CHAR(15)) as TVMs --,CAST(ColumnName as CHAR(10)) as Columns,CAST(AccessRight as CHAR(5)) as AccRights,CAST(GrantorName as CHAR(15)) as Grantor
FROM DBC.UserRoleRightsORDER BY 1,2,3,5;
*** Query completed. 2 rows found. 5 columns returned. *** Total elapsed time was 1 second.
View Name User Type Columns Selected
DBC.UserRoleRights[V] End User RoleNameDatabaseNameTableNameColumnNameAccessRightGrantorNameCreateTimeStamp
Chapter 3: System Views: Usage and ExamplesUserRoleRights[V]
430 Data Dictionary
RoleName Databases TVMs AccRights Grantor-------------- --------------- --------------- --------- ---------roles017_r1f roles017_3_db roles017_3_v2 R roles017_3roles017_r2d roles017_3_db roles017_3_v2 R roles017_3
Chapter 3: System Views: Usage and ExamplesUsers[V]
Data Dictionary 431
Users[V]
The Users view provides information about username space that the requesting user created or owns.
Corresponding System Tables
The corresponding system tables for this view are:
• DBC.AccessRights
• DBC.DBase
• DBC.Owners
• DBC.Profiles
This view also references the userdb view.
View Name User Type Columns Selected
DBC.Users[V] End User
Teradata DatabaseAdministrator
Supervisory
UserNameCreatorNamePasswordLastModDatePasswordLastModTimeOwnerNamePermSpaceSpoolSpaceTempSpaceProtectionTypeJournalFlagStartupStringDefaultAccountDefaultDatabaseCommentStringDefaultCollationPasswordChgDateLockedDateLockedTimeLockedCountTimeZoneHourTimeZoneMinuteDefaultDateFormCreateTimeStampLastAlterNameLastAlterTimeStampDefaultCharTypeRoleNameProfileNameAccessCountLastAccessTimeStamp
Chapter 3: System Views: Usage and ExamplesUsers[V]
432 Data Dictionary
Usage Notes
The default account name is the unexpanded account name that is defined as the default for the user.
This may be overridden by the default account in the profile if the user is assigned to a profile when the user logs on. During a session, the account name may be changed. For the current account name of the session, see SessionInfo[X].
Example
The following SELECT statement displays information about all users owned or created by the current user, Jones.
==> SELECT UserName,CreatorName,PermSpace,SpoolSpace FROM DBC.Users;
UserName CreatorName PermSpace SpoolSpace -------- ----------- --------- ---------- Jones sysadmin 1,000,000 1,000,000 Peterson Jones 100,000 1,000,000 Moffit Jones 100,000 1,000,000 Chin Jones 100,000 1,000,000 Greene Jones 100,000 1,000,000
Related Topics
See Database Design for more information on controlling access, space, and ownership.
Chapter 3: System Views: Usage and ExamplesUser_Default_Journals[V][X]
Data Dictionary 433
User_Default_Journals[V][X]
The User_Default_Journals view provides information on user databases that have a default journal specification.
Corresponding System Tables
The corresponding system tables for DBC.User_Default_Journals[V] are:
• DBC.DBase
• DBC.TVM
The corresponding system tables for DBC.User_Default_Journals[V]X are:
• DBC.AccessRights
• DBC.DBase
• DBC.Owners
• DBC.RoleGrants
• DBC.Roles
• DBC.TVM
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[V][X] [X]End User
Teradata DatabaseAdministrator
UserNameJournal_DBJournalName
Data Dictionary 435
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 Resource Usage Macros and 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. Accessing system tables via system views is the preferred method rather than direct access; this is because system views provide a more consistent image of the Data Dictionary across releases.
Special Table Information
DBC.ALL Table
The purpose of the DBC.ALL table is to 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 appears 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, hash index, macro, user-defined type, user-defined method, user-defined function, and external stored procedure in the system.
DBC.TVFields Table
The DBC.TVFields table contains one row for each occurrence of the following objects in the system:
• Column of a table, view, join index, and hash index
Chapter 4: System TablesNon-Hashed Tables
436 Data Dictionary
• Parameter for a macro, stored procedure, user-defined type, user-defined method, user-defined function, and external stored procedure
ResUsage Tables
ResUsage tables store data that is gathered from specified data collection and logging phases of Teradata Database 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 Teradata development, support, and field engineers, are described in appendices of Resource Usage Macros and Tables.
Non-Hashed Tables
When a table is non-hashed, it means that all of the rows for that table are on a single AMP. For example, the only space that the DBC.DatabaseSpace table keeps track of is for a single AMP. The fact is that there is a DBC.DatabaseSpace table on every AMP, but each copy of the table contains no information about the other AMPs. Similarly the tables containing recovery information only contain the information necessary to recover any activity/transaction that occurred on this AMP. That sort of information is not stored anywhere else. If an AMP fails, having the last transaction rollback information or the most recent DatabaseSpace for the failed AMP stored on a different AMP does not help in any way. The failed AMP has to be recovered, and the recovery process obsoletes any information about this AMP that was saved elsewhere.
The following table lists and describes the non-hashed and NO FALLBACK Data Dictionary Tables.
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
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 437
Data Dictionary Fallback and Non-Fallback Tables
The following table lists all of the fallback protected and non-fallback tables of the database DBC, except for the ResUsage tables that are explained in detail in the 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.
Some column formats are “explicit”; others are not. The following explains what “explicit” means, and what it means when this term is not specified.
"Explicit" means that the format string is specified by the table initializer program. When "explicit" is not specified, the format is taken from the default format for the data type for the column.
If the table column is the same as the view column, you can find the explanation of the column in Chapter 2; otherwise, this chapter gives the column explanation where the column is listed.
DBC.AccessRights
The DBC.AccessRights table contains the privilege for users and databases.
DBC.TransientJournal Backout uncommitted transactions
DBC.UtilityLockJournalTable Host utility lock records
DBC.ReconfigJournal Reserved for future use
Non-Hashed, NO FALLBACK Tables Description
Columns Referenced Column(s) Data Type Format
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 SMALLINTNOT NULL
---,--9 (explicit)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
438 Data Dictionary
DBC.AccLogRuleTbl
The DBC.AccLogRuleTbl table controls the logging of access privilege checks for the specified users or references to the specified objects.
AccessRight None CHAR(2)LATINUPPERCASENOT NULL
X(2)
WithGrant None CHAR(1)LATINUPPERCASENOT NULL
X(1)
GrantorID Dbase.DatabaseId BYTE(4)NOT NULL
X(8)
AllnessFlag None CHAR(1)LATINUPPERCASENOT NULL
X(1)
CreateUID Dbase.DatabaseId BYTE(4) X(8)
CreateTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
LastAccessTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
AccessCount None INTEGER --,---,---,--9 (explicit)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
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 SMALLINTNOT NULL
---,--9 (explicit)
AcrCheckPoint None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrCreateDataBase None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 439
AcrCreateMacro None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrCreateTable None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrCreateUser None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrCreateView None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrDelete None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrDropDatabase None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrDropMacro None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrDropTable None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrDropUser None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrDropView None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrDump None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
440 Data Dictionary
AcrExecute None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrGrant None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrInsert None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrIndex None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrReference None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrRestore None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrSelect None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrUpdate None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrCreateTrigger None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrDropTrigger None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrCreateProcedure None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 441
AcrDropProcedure None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrExecuteProcedure None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrCreateRole None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrDropRole None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrCreateProfile None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrDropProfile None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
ArcCreateFunction None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
ArcDropFunction None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
ArcAlterFunction None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrExecuteFunction None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrAlterProcedure None CHAR(3)LATINNOT NULL
X(3)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
442 Data Dictionary
AcrRepControl None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
CreateUID Dbase.DatabaseId BYTE(4) X(8)
CreateTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
LastAccessTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
AccessCount None INTEGER --,---,---,--9 (explicit)
AcrUDTUsage None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrUDTType None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrUDTMethod None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrCreExtProcedure None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrAlterExtProcedure None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrCreAuthorization None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
AcrDropAuthorization None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 443
DBC.AccLogTbl
The DBC.AccLogTbl table contains the result of the logging activity controlled by the AccLogRuleTbl.
Columns Referenced Column(s) Data Type Format
LogonDate None DATENOT NULL
YYYY/MM/DD (explicit)
LogonTime None FLOATNOT NULL
99:99:99 (explicit)
TheDate None DATENOT NULL
YYYY/MM/DD (explicit)
TheTime None FLOATNOT NULL
99:99:99 (explicit)
LogicalHostId None SMALLINTNOT NULL
ZZZ9 (explicit)
IFPNo None SMALLINTNOT NULL
-(5)9
SessionNo None INTEGERNOT NULL
--,---,---,--9 (explicit)
UserId Dbase.DatabaseId BYTE(4)NOT NULL
X(8)
UserName SessionTbl.AuditTrailId VARCHAR(128) UNICODENOT CASESPECIFICNOT NULL
X(128)
AccountName None VARCHAR(128) UNICODENOT CASESPECIFICNOT NULL
X(128)
AccLogResult None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
SeqInHash
Returns a number used to keep rows in the table with the same hash and possibly the same values for the other non-prime index fields. It is a sequence number to make sure that the rows in the table are not duplicates.
None INTEGERNOT NULL
--,---,---,--9 (explicit)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
444 Data Dictionary
AccessType None CHAR(2)LATINNOT CASESPECIFICNOT NULL
X(2)
Accesskind None BYTEINTNOT NULL
--9 (explicit)
Frequency None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
EventCount None INTEGER --,---,---,--9 (explicit)
OwnerName Dbase.DatabaseName VARCHAR(128) UNICODENOT CASESPECIFIC
X(128)
DatabaseName Dbase.DatabaseName VARCHAR(128) UNICODENOT CASESPECIFICNOT NULL
X(128)
TVMName TVM.TVMName VARCHAR(128) UNICODENOT CASESPECIFIC
X(128)
ColumnName None VARCHAR(128) UNICODENOT CASESPECIFIC
X(128)
ObjectLevel None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
ObjectId Dbase.DatabaseIdTVM.TVMId
BYTE(4)NOT NULL
X(8)
ColumnId None SMALLINT ---,--9 (explicit)
StatementKind None SMALLINT ---,--9 (explicit)
StatementType None VARCHAR(20)LATINNOT CASESPECIFICNOT NULL
X(20)
StatementText None VARCHAR(8192) UNICODENOT CASESPECIFIC
X(8192)
QueryBand None VARCHAR(6160) UNICODENOT CASESPECIFIC
X(6160)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 445
DBC.Accounts
The DBC.Accounts table contains a row for each account with which a user can log on.
DBC.Acctg
The DBC.Acctg table contains a row for each account a user owns on each AMP.
Note: This is a non-fallback and non-hashed table.
Columns Referenced Column(s) Data Type Format
UserId (NUPI)
Note: This column can have a user or profile ID.
None BYTE(4)NOT NULL
X(8)
AccountName None VARCHAR(128) UNICODENOT CASESPECIFICNOT NULL
X(128)
RowType None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
Columns Referenced Column(s) Data Type Format
AccountName (UPI) None VARCHAR(128) UNICODENOT CASESPECIFICNOT NULL
X(128)
UserName (UPI) Dbase.DatabaseName VARCHAR(128) UNICODENOT CASESPECIFICNOT NULL
X(128)
CPU None FLOATNOT NULL
---,---,---,--9.99 (explicit)
IO None FLOATNOT NULL
--,---,---,--9 (explicit)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
446 Data Dictionary
DBC.ArchiveLoggingObjsTbl
The DBC.ArchiveLoggingObjsTbl table records tables that have online archive logs and their online archive logging levels.
Note: Users can only retrieve the information in this table via its system views, which are DBC.ArchiveLoggingObjsV and DBC.ArchiveLoggingObjsVX.
CPUNorm
Returns the normalized cpu usage and is calculated as follows:
CPU x scaling factor
The following shows an example:
If the system is NCR 5400, which has a scaling factor of 10.14 and the cpu usage is 3.22, the cpunorm is 32.65.
None FLOATNOT NULL
---,---,---,--9.99 (explicit)
Vproc None SMALLINTNOT NULL
-(5)9
VprocType None CHAR(4)LATINNOT CASESPECIFICNOT NULL
X(4)
Model None CHAR(4)LATINNOT CASESPECIFICNOT NULL
X(4)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
DatabaseId (NUPI) None BYTE(4)NOT NULL
X(8)
TableId (USI) None BYTE (6)NOT NULL
X(12)
LogLevel None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
CreateUID None BYTE(4)NOT NULL
X(8)
CreateTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 447
DBC.CollationTbl
The DBC.CollationTbl table contains user-definable collation definitions.
LogSyncPoint
Indicates the synchronization point for a set of tables or databases.
None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
CommentString
Note: This field is not used.
None VARCHAR(255)UNICODENOT CASESPECIFIC
X(255)
Dummy1
Note: This field is not used.
None INTEGER --,---,---,--9
Dummy2
Note: This field is not used.
None INTEGER --,---,---,--9
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
CollName (UPI) None VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
CollInstall None CHAR(1)LATINNOT CASESPECIFICNOT 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)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
448 Data Dictionary
DBC.ColumnCorrelation
The DBC.ColumnCorrelation table stores the column correlation information.
Columns Referenced Column(s) Data Type Format
CorrelationName
Returns the name of the column correlation.
None VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
LeftDBId
Returns the database ID of the relation containing the fields on the left side of the correlation.
Dbase.DatabaseID BYTE(4)NOT NULL
X(8)
LeftTVId
Returns the ID of the relation containing the fields on the left side of the correlation.
TVM.TVMId BYTE(6)NOT NULL
X(12)
LeftFieldKey
Returns the field ID list of the left side of the correlation.
None VARCHAR(255)LATINNOT NULLNOT CASESPECIFIC
X(255)
RightDBId
Returns the database ID of the relation containing the fields on the right side of the correlation.
Dbase.DatabaseID BYTE(4) X(8)
RightTVId
Returns the ID of the relation containing the fields on the right side of the correlation.
TVM.TVMId BYTE(6) X(12)
RightFieldKey
Returns the field ID list of the right side of the correlation.
None VARCHAR(255)LATINNOT CASESPECIFICNOT NULL
X(255)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 449
AvgNCorr
Returns the average NCorr value for the correlation.
Note: Column correlation captures the value mapping relationship of two columns. It is denoted as NCorr(C1 -> C2) where C1 and C2 are two columns or two sets of columns.
None FLOATNOT NULL
-----,---,---,--9.99 (explicit)
MaxNCorr
Returns the maximum NCorr value for the correlation.
None FLOAT -----,---,---,--9.99 (explicit)
MinNCorr
Returns the minimum NCorr value for the correlation.
None FLOAT -----,---,---,--9.99 (explicit)
SamplePCT
Returns the sampling percentage used for scanning the relation when creating the column correlation.
None FLOATNOT NULL
----,---,---,---,--9.9999 (explicit)
CommentString
Returns any user-supplied text for the column correlation.
None VARCHAR(255)UNICODENOT CASESPECIFIC
X(255)
CorrelationEnabled
Returns whether this correlation is enabled (Y) or disabled (N).
None CHAR(1)LATINNOT CASESPECIFICUPPERCASENOT NULL
X(1)
CreateUID
Returns the user id of the creator of the correlation.
Dbase.DatabaseID BYTE(4)NOT NULL
X(8)
CreateTimeStamp
Returns the date and time when the correlation was created.
None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
450 Data Dictionary
DBC.ConstantDefs
The DBC.ConstantDefs table defines the set of individual constants that make up a cost profile type including a description of the constant and the default value.
Note: This table is constructed at installation time, and it may not be customized for any reason.
Note: This table is for internal use only.
LastAlterUID
Returns the user id who last altered the correlation.
Dbase.DatabaseID BYTE(4) X(8)
LastAlterTimeStamp
Returns the date and time when this correlation was last altered.
None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
AlterCount
Returns the number of times this correlation has been altered.
None INTEGER --,---,---,--9 (explicit)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
ProfileTypeId (NUPI, USI)
None INTEGERNOT NULL
--,---,---,--9 (explicit)
ConstId (USI) None INTEGERNOT NULL
--,---,---,--9 (explicit)
ConstName None CHAR(64)LATINNOT CASESPECIFICNOT NULL
X(64)
ConstCat
These are the values:
• I = the constant is an initialization parameter.
• C = the constant is a cost predication parameter.
None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
ConstVal None FLOAT ----,---,---,---,--9.9999 (explicit)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 451
DBC.ConstantValues
The DBC.ConstantValues table contains the actual values specified for each cost profile instance.
Note: This table is for internal use only.
DBC.ConstraintNames
The DBC.ConstraintNames table contains a row for each named index or referential constraint defined on a table in the system.
ConstString None VARCHAR(2048)LATINCASESPECIFIC
X(2048)
ConstDesc None VARCHAR(2048)LATINNOT CASESPECIFIC
X(2048)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
ProfileId (NUPI, USI) None INTEGERNOT NULL
--,---,---,--9 (explicit)
ProfileCat None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
ConstId (USI) None INTEGERNOT NULL
--,---,---,--9 (explicit)
ConstVal None FLOAT ----,---,---,---,--9.9999 (explicit)
ConstString None VARCHAR(2048)LATINCASESPECIFIC
X(2048)
Columns Referenced Column(s) Data Type Format
DatabaseId (NUPI) Dbase.DatabaseId BYTE(4)NOT NULL
X(8)
TableId (NUPI) TVM.TVMId BYTE(6)NOT NULL
X(12)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
452 Data Dictionary
Name None VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
NameI None VARCHAR(128) UNICODEUPPERCASENOT CASESPECIFICNOT NULL
X(128)
ConstraintType
These are the possible values:
P=Nonpartitioned Primary Index
Q=Partitioned Primary Index
S=Hash-Ordered Secondary Index without ALL
K=Primary Key
U=Unique constraint
R=References constraint
V=Value-Ordered Secondary Index without ALL
H=Hash-Ordered Secondary Index with ALL
O=Value-Ordered Secondary with ALL
None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
IndexId None SMALLINT ---,--9 (explicit)
CreateUID Dbase.DatabaseId BYTE(4) X(8)
CreateTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
LastAccessTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
AccessCount None INTEGER --,---,---,--9 (explicit)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 453
DBC.CostProfiles
The DBC.CostProfiles table contains Teradata-supplied and user-defined cost profile instances.
Teradata-supplied profiles cannot be modified, although they may be copied to a user-defined profile that can be modified.
Note: This table is for internal use only.
DBC.CostProfileTypes
The DBC.CostProfileTypes table defines the cost profile type name, ID, and description.
The cost profile type definitions are fixed by Teradata and must not be changed.
This table is used to define Optimizer cost profiles.
Note: This table is for internal use only.
Columns Referenced Column(s) Data Type Format
ProfileId (UPI) None INTEGERNOT NULL
--,---,---,--9 (explicit)
ProfileName (USI) None CHAR(30)LATINNOT CASESPECIFICNOT NULL
X(30)
ProfileTypeId CostProfileTypes.ProfileTypeId INTEGERNOT NULL
--,---,---,--9 (explicit)
ProfileCat
These are the values:
F = Teradata-supplied profile instances, or profile instances that are fixed and cannot be changed.
V = user-defined profile instances, or profile instances that can be modified.
None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
ProfileDesc None VARCHAR(2048)LATINNOT CASESPECIFIC
X(2048)
Columns Referenced Column(s) Data Type Format
ProfileTypeId (UPI) None INTEGERNOT NULL
--,---,---,--9 (explicit)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
454 Data Dictionary
DBC.DataBaseSpace
The DBC.DataBaseSpace table performs space accounting for each database and each table in a database.
Note: This is a non-fallback and non-hashed table.
ProfileTypeName (USI) None CHAR(30)LATINNOT CASESPECIFICNOT NULL
X(30)
ProfileTypeDesc None CHAR(2048)LATINNOT CASESPECIFIC
X(2048)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
DatabaseId (UPI) Dbase.DatabaseId BYTE(4)NOT NULL
X(8)
TableId (UPI) None BYTE(6)NOT NULL
X(12)
Vproc None SMALLINTNOT NULL
-(5)9
MaxPermSpace None FLOATNOT NULL
----,---,---,---,--9 (explicit)
MaxSpoolSpace None FLOATNOT NULL
----,---,---,---,--9 (explicit)
PeakPermSpace None FLOATNOT NULL
----,---,---,---,--9 (explicit)
PeakSpoolSpace None FLOATNOT NULL
----,---,---,---,--9 (explicit)
CurrentPermSpace None FLOATNOT NULL
----,---,---,---,--9 (explicit)
CurrentSpoolSpace None FLOATNOT NULL
----,---,---,---,--9 (explicit)
MaxTempSpace None FLOATNOT NULL
----,---,---,---,--9 (explicit)
PeakTempSpace None FLOATNOT NULL
----,---,---,---,--9 (explicit)
CurrentTempSpace None FLOATNOT NULL
----,---,---,---,--9 (explicit)
MaxProfileSpoolSpace None FLOAT ----,---,---,---,--9 (explicit)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 455
DBC.Dbase
The DBC.Dbase table contains a row for each database and user in the system.
MaxProfileTempSpace None FLOAT ----,---,---,---,--9 (explicit)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
DatabaseNameI (UPI) None VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFICNOT NULL
X(128)
DatabaseId (USI) Accounts.UserId
Databasespace.Databaseid
Accessrights.UserId
Owners.ownerid
TVM.databaseId
ReferencingTbls.ReferencingDbId
DBCAssociation.DatabaseId
Owners.owneeid
ReferencedTbls.ReferencedDbId
TableConstraints.DbaseId
Triggerstbl.DatabaseId
UDFInfo.DatabaseId
BYTE(4)NOT NULL
X(8)
OwnerId Dbase.DatabaseId BYTE(4)NOT NULL
X(8)
EncryptionFlag
Returns the specification of the encryption methods used.
These are the values:
• DES (Data Encryption Standard)
• SHA (Secure Hash Algorithm)
None BYTE(1) X(2)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
456 Data Dictionary
PasswordSalt
Returns a generated value that is used during the encryption process.
None BYTE(2) X(4)
EncryptedPassword
Returns the one-way encrypted form of the user's password.
None VARBYTE(512) X(1024)
PasswordModTime
Returns the time and date of the last time the password was modified.
None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
ProtectionType None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
JournalFlag None CHAR(2)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(2)
PermSpace None FLOATNOT NULL
----,---,---,---,--9 (explicit)
SpoolSpace None FLOATNOT NULL
----,---,---,---,--9 (explicit)
StartupString None VARCHAR(255)UNICODENOT CASESPECIFIC
X(255)
CommentString None VARCHAR(255)UNICODENOT CASESPECIFIC
X(255
AccountName
This is the default account. Other accounts available to users are in DBC.Accounts.
Note that if there is a profile for the user, and it specifies a default account, that account supersedes this account name.
None VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 457
CreatorName Dbase.DatabaseName VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
DatabaseName RCEvent.DatabaseName
AcclogTbl.UserName
VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
JournalId None BYTE(6) X(12)
Version None SMALLINTNOT NULL
---,--9 (explicit)
OwnerName Dbase.DatabaseName VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
NumFallBackTables None SMALLINTNOT NULL
---,--9 (explicit)
NumLogProtTables None SMALLINTNOT NULL
---,--9 (explicit)
DefaultDatabase Dbase.DatabaseName VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
LogonRules None SMALLINTNOT NULL
---,--9 (explicit)
AccLogRules None SMALLINTNOT NULL
---,--9 (explicit)
AccLogUsrRules None SMALLINTNOT NULL
---,--9 (explicit)
DefaultCollation None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
RowType None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
PasswordChgDate None INTEGER --,---,---,--9 (explicit)
LockedDate None INTEGER --,---,---,--9 (explicit)
LockedTime None SMALLINT ---,--9 (explicit)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
458 Data Dictionary
LockedCount None BYTEINT ---9 (explicit)
UnResolvedRICount None SMALLINTNOT NULL
---,--9 (explicit)
TimeZoneHour None BYTEINT ---9 (explicit)
TimeZoneMinute None BYTEINT ---9 (explicit)
DefaultDateForm None CHAR(1)LATINUPPERCASENOT CASESPECIFIC
X(1)
CreateUID Dbase.DatabaseId BYTE(4) X(8)
CreateTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
LastAlterUID Dbase.DatabaseId BYTE(4) X(8)
LastAlterTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
TempSpace None FLOATNOT NULL
----,---,---,---,--9 (explicit)
LastAccessTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
AccessCount None INTEGER --,---,---,--9 (explicit)
DefaultCharType None SMALLINT ---,--9 (explicit)
RoleName None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
ProfileName None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
UDFLibRevision None INTEGERNOT NULL
--,---,---,--9 (explicit)
AppCat1Revision
Returns the current library revision number of the CLI application for a database.
The revision number starts from 0.
None INTEGERNOT NULL
--,---,---,--9 (explicit)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 459
DBC.DBCAssociation
The DBC.DBCAssociation table contains the results of the porting of a data table between Teradata systems by Archive/Recovery software.
AppCat2Revision
Returns the current library revision number of the ODBC application for a database.
The revision number starts from 0.
None INTEGERNOT NULL
--,---,---,--9 (explicit)
AppCat3Revision
Returns the current library revision number of the JAVA application for a database.
The revision number starts from 0.
None INTEGERNOT NULL
--,---,---,--9 (explicit)
AppCat4Revision
Returns the current library revision number of the NET application for a database.
The revision number starts from 0.
None INTEGERNOT NULL
--,---,---,--9 (explicit)
JarLibRevision
Functions in a similar way to the existing UDFLibRevision column for UDFs, UDMs, UDTs and XSPs.
The JarLibRevision column is updated whenever Jar objects in the database of the user are installed, replaced, removed, or redistributed.
None INTEGERNOT NULL
--,---,---,--9 (explicit)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
TVMId (UPI) TVM.TVMId BYTE(6)NOT NULL
X(12)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
460 Data Dictionary
DatabaseId Dbase.DatabaseId BYTE(4)NOT NULL
X(8)
JournalId None BYTE(6) X(12)
EventNum None INTEGERNOT NULL
--,---,---,--9 (explicit)
Original_DatabaseName None VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
Original_DataBaseId None BYTE(4)NOT NULL
X(8)
Original_TVMNameI None VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFICNOT NULL
X(128)
Original_LogicalHostId None SMALLINT ZZZ9 (explicit)
Original_SessionNo None INTEGER --,---,---,--9 (explicit)
Original_TVMId None BYTE(6)NOT NULL
X(12)
Original_TableKind None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
Original_ProtectionType None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
Original_TempFlag None CHAR(1)LATINUPPERCASENOT CASESPECIFIC
X(1)
Original_HashFlag None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
Original_NextIndexId None SMALLINTNOT NULL
---,--9 (explicit)
Original_NextFieldId None SMALLINTNOT NULL
---,--9 (explicit)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 461
DBC.DBCInfoTbl
The DBC.DBCInfoTbl table contains current information, such as the database version, PDE release, and language support mode.
Original_Version
Returns the original version of the imported object.
None SMALLINTNOT NULL
---,--9 (explicit)
Original_RequestText None VARCHAR(12500)UNICODE
X(255) (explicit)
Original_CommentString None VARCHAR(255)UNICODENOT CASESPECIFIC
X(255)
Original_CreatorName None VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
Original_TVMName None VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
Original_JournalFlag None CHAR(2)LATINNOT CASESPECIFICNOT NULL
X(2)
Original_JournalID None BYTE(6) X(12)
Original_UtilVersion
Returns the original utility version of the imported object.
None SMALLINT ---,--9 (explicit)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
InfoKey (UPI) None VARCHAR(30)LATINNOT CASESPECIFICNOT NULL
X(30)
InfoData None VARCHAR(16384)UNICODENOT CASESPECIFIC
X(16384)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
462 Data Dictionary
DBC.DBQLExplainTbl
The DBC.DBQLExplainTbl table contains the explain of the query. Since the explain can be larger than 64KB, it may use multiple rows to hold the data.
DBC.DBQLObjTbl
The DBC.DBQLObjTbl table is populated if object information is requested for the query in addition to the default information row.
A row for each object (database, table, column, and index) is used. If the object is a secondary index, its number and use are logged.
Columns Referenced Column(s) Data Type Format
ProcID (NUPI) None DECIMAL(5,0)NOT NULL
-(5)9 (explicit)
CollectTimestamp (NUPI)
None TIMESTAMP(2) NOT NULL
YYYY-MM-DDBHH:MI:SS
QueryID None DECIMAL(18,0)NOT NULL
--Z(17)9
ExpRowNo None INTEGERNOT NULL
--,---,---,--9 (explicit)
ExplainText None VARCHAR (31000) UNICODENOT CASESPECIFICNOT NULL
X(31000)
Columns Referenced Column(s) Data Type Format
ProcID (NUPI) None DECIMAL(5,0)NOT NULL
-(5)9 (explicit)
CollectTimestamp (NUPI)
None TIMESTAMP(2)NOT NULL
YYYY-MM-DDBHH:MI:SS
QueryID None DECIMAL(18,0)NOT NULL
--Z(17)9
ObjectDatabaseName None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
ObjectTableName None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
ObjectColumnName None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 463
ObjectID None BYTE(4)NOT NULL
X(8)
ObjectNum None INTEGER --,---,---,--9 (explicit)
ObjectType
These are the object types:
• Agg = User defined aggregate function
• AgS = User defined aggregate STAT function
• Aut = Security Authorization
• Col = Column
• DB = Database
• Hix = Hash Index
• Idx = Index
• JIx = Join Index
• Jrl = Journal
• Mac = Macro
• NoT = No Type (Unknown)
• SP = Stored Procedure
• Sta = User defined STAT function
• Tab = Table
• TbF = Table function
• Tmp = Temporary
• Trg = Trigger
• UDF = User defined function
• UDM = User defined method
• UDT = User defined type
• Viw = View
• Vol = Volatile
• XSP = External Stored Procedure
None CHAR(3)LATINNOT CASESPECIFICNOT NULL
X(3)
FreqofUse None INTEGER --,---,---,--9 (explicit)
TypeofUse None BYTEINT --9 (explicit)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
464 Data Dictionary
DBC.DBQLogTbl
The DBC.DBQLogTbl table specifies the main table for DBQL.
Columns Referenced Column(s) Data Type Format
ProcID (NUPI) None DECIMAL(5,0)NOT NULL
-(5)9 (explicit)
CollectTimestamp (NUPI) None TIMESTAMP(2)NOT NULL
YYYY-MM-DDBHH:MI:SS
QueryID None DECIMAL(18,0)NOT NULL
--Z(17)9
UserID None BYTE(4)NOT NULL
X(8)
AcctString None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
ExpandAcctString None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
SessionID None INTEGERNOT NULL
--,---,---,--9 (explicit)
LogicalHostID None SMALLINTNOT NULL
ZZZ9 (explicit)
RequestNum
Returns the client request number for all queries.
For stored procedure CALL statements, the request number for the statements that occur within the stored procedure all reports the same number as the CALL itself.
None INTEGERNOT NULL
--,---,---,--9 (explicit)
InternalRequestNum None INTEGER NOT NULL
--,---,---,--9
LogonDateTime None TIMESTAMP(2)NOT NULL
YYYY-MM-DDBHH:MI:SS
AcctStringTime None FLOAT 99:99:99 (explicit)
AcctStringHour None SMALLINT --9 (explicit)
AcctStringDate None DATE YY/MM/DD (explicit)
LogonSource None CHAR(128)LATINNOT CASESPECIFIC
X(128)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 465
AppID None CHAR(30)UNICODENOT CASESPECIFIC
X(30)
ClientID None CHAR(30)UNICODENOT CASESPECIFIC
X(30)
ClientAddr None CHAR(30)LATINNOT CASESPECIFIC
X(30)
QueryBand None VARCHAR(6160)UNICODENOT CASESPECIFIC
X(6160)
ProfileID None BYTE(4) X(8)
StartTime None TIMESTAMP(2)NOT NULL
YYYY-MM-DDBHH:MI:SS.S(F)Z (explicit)
FirstStepTime None TIMESTAMP(2)NOT NULL
YYYY-MM-DDBHH:MI:SS.S(F)Z (explicit)
FirstRespTime None TIMESTAMP(2) YYYY-MM-DDBHH:MI:SS.S(F)Z (explicit)
LastStateChange None TIMESTAMP(2) YYYY-MM-DDBHH:MI:SS.S(F)Z (explicit)
NumSteps None SMALLINTNOT NULL
---,--9 (explicit)
NumStepswPar None SMALLINT ---,--9 (explicit)
MaxStepsInPar None SMALLINT ---,--9 (explicit)
NumResultRows None FLOAT ----,---,---,---,--9 (explicit)
TotalIOCount None FLOAT ----,---,---,---,--9 (explicit)
AMPCPUTime None FLOAT ----,---,---,---,--9.999 (explicit)
ParserCPUTime None FLOAT ----,---,---,---,--9.999 (explicit)
UtilityByteCount
Note: This field is not used.
None FLOAT ----,---,---,---,--9 (explicit)
UtilityRowCount None FLOAT ----,---,---,---,--9 (explicit)
ErrorCode None INTEGER --,---,---,--9 (explicit)
ErrorText None VARCHAR(1024)UNICODENOT CASESPECIFIC
X(255)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
466 Data Dictionary
WarningOnly None CHAR(1)LATINNOT CASESPECIFIC
X(1)
DelayTime None INTEGER --,---,---,--9 (explicit)
AbortFlag None CHAR(1)LATINNOT CASESPECIFIC
X(1)
CacheFlag None CHAR(1)LATINNOT CASESPECIFIC
X(1)
StatementType None CHAR(20)LATINNOT CASESPECIFIC
X(20)
QueryText None VARCHAR(10000) UNICODENOT CASESPECIFIC
X(10000)
NumOfActiveAMPs None INTEGER --,---,---,--9 (explicit)
MaxAMPCPUTime None FLOAT ----,---,---,---,--9.999 (explicit)
MaxCPUAmpNumber None SMALLINT ---,--9 (explicit)
MinAmpCPUTime None FLOAT ----,---,---,---,--9.999 (explicit)
MaxAmpIO (renamed from HotAmpIO)
None FLOAT ----,---,---,---,--9 (explicit)
MaxIOAmpNumber None SMALLINT ---,--9 (explicit)
MinAmpIO (renamed from LowAmpIO)
None FLOAT ----,---,---,---,--9 (explicit)
SpoolUsage
If the spool usage is zero, no spool was used.
If the spool usage is null, the data returned to DBQL was invalid.
None FLOAT ----,---,---,---,--9 (explicit)
WDID None INTEGER --,---,---,--9 (explicit)
OpEnvID None INTEGER --,---,---,--9 (explicit)
SysConID None INTEGER --,---,---,--9 (explicit)
LSN None INTEGER --,---,---,--9 (explicit)
NoClassification None CHAR(1)LATINNOT CASESPECIFIC
X(1)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 467
WDOverride None CHAR(1)LATINNOT CASESPECIFIC
X(1)
SLGMet None CHAR(1)LATINNOT CASESPECIFIC
X(1)
ExceptionValue None INTEGER --,---,---,--9 (explicit)
FinalWDID None INTEGER --,---,---,--9 (explicit)
TDWMEstMaxRows None FLOAT ----,---,---,---,--9 (explicit)
TDWMEstLastRows None FLOAT ----,---,---,---,--9 (explicit)
TDWMEstTotalTime None FLOAT ----,---,---,---,--9 (explicit)
TDWMAllAmpFlag None CHAR(1)LATINNOT CASESPECIFIC
X(1)
TDWMConfLevelUsed None CHAR(1)LATINNOT CASESPECIFIC
X(1)
TDWMRuleId None INTEGER --,---,---,--9 (explicit)
UserName None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
DefaultDatabase None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
AMPCPUTimeNorm None FLOAT ----,---,---,---,--9.999 (explicit)
ParserCPUTimeNorm None FLOAT ----,---,---,---,--9.999 (explicit)
MaxAMPCPUTimeNorm None FLOAT ----,---,---,---,--9.999 (explicit)
MaxCPUAmpNumberNorm None SMALLINT ---,--9 (explicit)
MinAmpCPUTimeNorm None FLOAT ----,---,---,---,--9.999 (explicit)
EstResultRows None FLOAT ----,---,---,---,--9 (explicit)
EstProcTime None FLOAT ----,---,---,---,--9.999 (explicit)
EstMaxRowCount None FLOAT ----,---,---,---,--9 (explicit)
ExtraField1 None INTEGER --,---,---,--9 (explicit)
ExtraField2 None INTEGER --,---,---,--9 (explicit)
ExtraField3 None SMALLINT ---,--9 (explicit)
ExtraField4 None TIMESTAMP(2) YYYY-MM-DDBHH:MI:SS.S(F)Z
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
468 Data Dictionary
DBC.DBQLRuleCountTbl
The DBC.DBQLRuleCountTbl table is reserved for internal use only.
DBC.DBQLRuleTbl
The DBC.DBQLRuleTbl table specifies the rule table for DBQL.
ExtraField5 None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
ExtraField6 None FLOAT ----,---,---,---,--9 (explicit)
ExtraField7 None FLOAT ----,---,---,---,--9 (explicit)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
CountNameString None CHAR(8)LATINNOT CASESPECIFICNOT NULL
X(30) (explicit)
NumberOfRules None INTEGER --,---,---,--9 (explicit)
Columns Referenced Column(s) Data Type Format
UserID (NUPI) None BYTE(4)NOT NULL
X(8)
AccountString (NUPI) None VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
ExplainFlag None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
ObjFlag None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
SqlFlag None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 469
DBC.DBQLSqlTbl
The DBC.DBQLSqlTbl table is populated if the SQL is requested for the query in addition to the default information row. If the additional SQL text is greater than 64KB, multiple rows are generated.
StepFlag None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
SummaryFlag None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
ThresholdFlag None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
TextSizeLimit None INTEGER --,---,---,--9 (explicit)
SummaryVal1 None SMALLINT ---,--9 (explicit)
SummaryVal2 None SMALLINT ---,--9 (explicit)
SummaryVal3 None SMALLINT ---,--9 (explicit)
ThreshValue None SMALLINT ---,--9 (explicit)
CreateID None BYTE(4)NOT NULL
X(8)
TimeCreated None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
TimeAccessed None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
ProcID (NUPI) None DECIMAL(5,0)NOT NULL
-(5)9 (explicit)
CollectTimestamp (NUPI)
None TIMESTAMP(2)NOT NULL
YYYY-MM-DDBHH:MI:SS
QueryID None DECIMAL(18,0)NOT NULL
--Z(17)9
SqlRowNo None INTEGERNOT NULL
--,---,---,--9 (explicit)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
470 Data Dictionary
DBC.DBQLStepTbl
The DBC.DBQLStepTbl table is populated by step level information. If the step information of the query is requested, a step table is populated with a row for each step.
SqlTextInfo None VARCHAR (31000)UNICODENOT CASESPECIFICNOT NULL
X(31000)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
ProdID (NUPI) None DECIMAL(5,0)NOT NULL
-(5)9 (explicit)
CollectTimestamp (NUPI) None TIMESTAMP(6)NOT NULL
YYYY-MM-DDBHH:MI:SS (explicit)
QueryID None DECIMAL(18,0)NOT NULL
--Z(17)9
StepLev1Num None SMALLINTNOT NULL
---,--9 (explicit)
StepLev2Num None SMALLINT ---,--9 (explicit)
StepName None CHAR(6)LATINNOT CASESPECIFICNOT NULL
X(6)
StepStartTime None TIMESTAMP(6) YYYY-MM-DDBHH:MI:SS.S(F)Z (explicit)
StepStopTime None TIMESTAMP(6) YYYY-MM-DDBHH:MI:SS.S(F)Z (explicit)
EstProcTime None FLOAT ----,---,---,---,--9.999 (explicit)
EstCPUCost None FLOAT ----,---,---,---,--9.999 (explicit)
CPUtime None FLOAT ----,---,---,---,--9.999 (explicit)
IOcount None FLOAT ----,---,---,---,--9 (explicit)
EstRowCount None FLOAT ----,---,---,---,--9 (explicit)
RowCount None FLOAT ----,---,---,---,--9 (explicit)
RowCount2 None FLOAT ----,---,---,---,--9 (explicit)
NumOfActiveAMPs None INTEGER --,---,---,--9 (explicit)
MaxAmpCPUTime None FLOAT ----,---,---,---,--9.999 (explicit)
MaxCPUAmpNumber None SMALLINT ---,--9 (explicit)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 471
MinAmpCPUTime None FLOAT ----,---,---,---,--9.999 (explicit)
MaxAmpIO (renamed from HotAmpIO)
None FLOAT ----,---,---,---,--9 (explicit)
MaxIOAmpNumber None SMALLINT ---,--9 (explicit)
MinAmpIO (renamed from LowAmpIO)
None FLOAT ----,---,---,---,--9 (explicit)
SpoolUsage None FLOAT ----,---,---,---,--9 (explicit)
MaxAMPSpool None FLOAT ----,---,---,---,--9 (explicit)
MaxSpoolAmpNumber None SMALLINT ---,--9 (explicit)
MinAMPSpool None FLOAT ----,---,---,---,--9 (explicit)
StepWD None INTEGER --,---,---,--9 (explicit)
LSN None INTEGER --,---,---,--9 (explicit)
UtilityTableId None BYTE(4)NOT NULL
X(8)
RowsWComprColumns None FLOAT ----,---,---,---,--9 (explicit)
EstIOCost None FLOAT ----,---,---,---,--9.999 (explicit)
EstNetCost None FLOAT ----,---,---,---,--9.999 (explicit)
EstHRCost None FLOAT ----,---,---,---,--9.999 (explicit)
CPUTimeNorm None FLOAT ----,---,---,---,--9.999 (explicit)
MaxAmpCPUTimeNorm None FLOAT ----,---,---,---,--9.999 (explicit)
MaxCPUAmpNumberNorm None SMALLINT ---,--9 (explicit)
MinAmpCPUTimeNorm None FLOAT ----,---,---,---,--9.999 (explicit)
ExtraField1
Contains the number of rows deleted by the MultiLoad EXE step.
None FLOAT ----,---,---,---,--9 (explicit)
ExtraField2 None FLOAT ----,---,---,---,--9 (explicit)
ExtraField3 None INTEGER --,---,---,--9 (explicit)
ExtraField4 None INTEGER --,---,---,--9 (explicit)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
472 Data Dictionary
DBC.DBQLSummaryTbl
The DBC.DBQLSummaryTbl table is populated only if summary information is requested or a threshold value is used. For the summary case, a row exists for each collection if the count of the queries run in that time frame (LowHist to HighHist) is greater than 0.
For threshold, one row (with LowHist=ThreshValue and HighHist=0) exists for the collection if there were queries shorter than LowHist seconds.
Columns Referenced Column(s) Data Type Format
ProcID (NUPI) None DECIMAL(5,0)NOT NULL
-(5)9 (explicit)
CollectTimeStamp (NUPI)
None TIMESTAMP(2) NOT NULL
YYYY-MM-DDBHH:MI:SS
UserID None BYTE(4) X(8)
AcctString None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
LogicalHostID None SMALLINT ZZZ9 (explicit)
AppID None CHAR(30)UNICODENOT CASESPECIFIC
X(30)
ClientID None CHAR(30)UNICODENOT CASESPECIFIC
X(30)
ClientAddr None CHAR(30)LATINNOT CASESPECIFIC
X(30)
ProfileID None BYTE(4) X(8)
SessionID None INTEGERNOT NULL
--,---,---,--9 (explicit)
QueryCount None INTEGERNOT NULL
--,---,---,--9 (explicit)
ValueType None CHAR(1)LATINNOT CASESPECIFIC
X(1)
QuerySeconds None FLOATNOT NULL
----,---,---,---,--9.999 (explicit)
TotalIOCount None FLOAT ----,---,---,---,--9 (explicit)
AMPCPUTime None FLOAT ----,---,---,---,--9.999 (explicit)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 473
DBC.Dependency
The DBC.Dependency table stores relationships among a UDT, its dependent routines, User-Defined Casts, User-Defined Transforms, User-Defined Orderings, and any dependency on any other database object. The table also stores dependency information between JAR objects.
ParserCPUTime None FLOAT ----,---,---,---,--9.999 (explicit)
AMPCPUTimeNorm None FLOAT ----,---,---,---,--9.999 (explicit)
ParserCPUTimeNorm None FLOAT ----,---,---,---,--9.999 (explicit)
LowHist None FLOATNOT NULL
----,---,---,---,--9.999 (explicit)
HighHist None FLOATNOT NULL
----,---,---,---,--9.999 (explicit)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
Object1Id (NUPI)
Returns a system-wide unique identifier representing the referenced database object (associated with DBC.TVM.TVMId). This field contains either the identifier of a UDT with dependent routines, the identifier of a database object that references UDT-related components, or the identifier of a JAR object which is included by another JAR object in its SQL-Java path.
None BYTE(6)NOT NULL
X(12)
Object1Name
Returns the name of the object specified by the identifier Object1Id.
None VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFIC
X(128)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
474 Data Dictionary
Database1Id
Returns the Database ID associated with the database in which the referenced database object resides.
None BYTE(4)NOT NULL
X(8)
Database1Name
Returns the name of the database specified by the identifier Database1Id.
None VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFIC
X(128)
Object2Id
Returns a system-wide unique identifier of the dependent data object (associated with DBC.TVM.TVMId). This field contains either the identifier of dependent routines, the identifiers of referenced UDT-related components, or the identifier of a JAR object which is dependent upon another JAR object by having included it in its SQL-Java path.
None BYTE(6)NOT NULL
X(12)
Object2Name
Returns the name of the object specified by the identifier Object2Id.
None VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFIC
X(128)
Database2Id
Returns the Database ID associated with the database in which the dependent data object resides. This column would be checked as a result of a DELETE DATABASE.
None BYTE(4)NOT NULL
X(8)
Database2Name
Returns the name of the object specified by the identifier Database2Id.
None VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFIC
X(128)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 475
DBC.ErrorMsgs
The DBC.ErrorMsgs table stores all error messages returned to the user.
DBC.ErrorTbls
The DBC.ErrorTbls table stores data and error table relations.
RelationshipCode
The following codes define the relationship between Object1Id and Object2Id:
• RU - Reference a UDT
• RO - Reference a user-defined Ordering
• RC - Reference a user-defined Cast
• RF - Reference a UDF
• RM - Reference a UDM
• DG - Dependent auto-generated routine
• DM - Dependent method
• XR - Reference an XSP
• DJ - Dependent JAR
None CHAR(2)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(2)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
ErrorCode (UPI) None SMALLINTNOT NULL
---,--9 (explicit)
ErrorText None VARCHAR(255)UNICODENOT CASESPECIFICNOT NULL
X(255)
Columns Referenced Column(s) Data Type Format
BaseTID (USI)
Returns ID of data table for error table.
None BYTE(6)NOT NULL
X(12)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
476 Data Dictionary
DBC.EventLog
The DBC.EventLog table contains a row for every session event.
BaseDID
Returns ID of database where database resides.
None BYTE(4)NOT NULL
X(8)
ErrorTID (UPI)
Returns ID of error table.
None BYTE(6)NOT NULL
X(12)
ErrorDID
Returns ID of database where error table resides.
None BYTE(4)NOT NULL
X(8)
CreateUID
Returns ID of error table creator.
None BYTE(4)NOT NULL
X(8)
CreateTimeStamp
Returns timestamp of error table creation.
None TIMESTAMP(0)NOT NULL
YYYY-MM-DDBHH:MI:SS
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
DateFld (NUPI) None DATENOT NULL
YY/MM/DD (explicit)
TimeFld (NUPI) None FLOATNOT NULL
99:99:99.99 (explicit)
UserName
When a user tries to log on with a bad username, the system logs the username “Non-existent User.”
SessionTbl.AuditTrailId VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
AccountName Dbase.AccountName VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
Event None CHAR(12)LATINNOT CASESPECIFICNOT NULL
X(12)
LogicalHostId None SMALLINTNOT NULL
ZZZ9 (explicit)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 477
DBC.Global
The DBC.Global 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.
DBC.Hosts
The DBC.Hosts table contains one row per host that defines the default character set for that host.
IFPNo None SMALLINTNOT NULL
-(5)9
SessionNo None INTEGERNOT NULL
--,---,---,--9 (explicit)
LogonDate None DATENOT NULL
YY/MM/DD (explicit)
LogonTime None FLOATNOT NULL
99:99:99.99 (explicit)
LogonSource None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
Key (UPI) None CHAR(2)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(2)
Blob None VARBYTE(2048)NOT NULL
X(2048) (explicit)
Columns Referenced Column(s) Data Type Format
LogicalHostId (UPI) None SMALLINTNOT NULL
ZZZ9 (explicit)
HostName (USI) None VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
478 Data Dictionary
DBC.IdCol
The DBC.IdCol table contains the parameters of every identity column defined in the system.
DBC.Indexes
The DBC.Indexes table contains a row for each column that is an index.
DefaultCharSet None VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
TableId (UPI) TVM.TVMId BYTE(6)NOT NULL
X(12)
DatabaseId Dbase.DatabaseId BYTE(4)NOT NULL
X(8)
AvailValue None DECIMAL(18,0)NOT NULL
----,---,---,---,---,--9 (explicit)
StartValue None DECIMAL(18,0)NOT NULL
----,---,---,---,---,--9 (explicit)
MinValue None DECIMAL(18,0)NOT NULL
----,---,---,---,---,--9 (explicit)
MaxValue None DECIMAL(18,0)NOT NULL
----,---,---,---,---,--9 (explicit)
Increment None INTEGERNOT NULL
--,---,---,--9 (explicit)
Cyc None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
Columns Referenced Column(s) Data Type Format
TableId (NUPI) TVM.TVMId BYTE(6)NOT NULL
X(12)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 479
IndexType
Returns the type of an index as:
• P (Nonpartitioned Primary)
• Q (Partitioned 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)
• M (Multi-column statistics)
• D (Derived column partition statistics)
• 1 (field1 column of a join or hash index)
• 2 (field2 column of a join or hash index)
None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
IndexNumber None SMALLINTNOT NULL
---,--9 (explicit)
UniqueFlag None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
FieldId TVFields.FieldId SMALLINTNOT NULL
---,--9 (explicit)
FieldPosition None SMALLINTNOT NULL
---,--9 (explicit)
IndexMode None CHAR(1)LATINNOT CASESPECIFIC
X(1)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
480 Data Dictionary
DBC.InDoubtResLog
The DBC.InDoubtResLog table contains a row for each transaction that had been in doubt.
DatabaseId Dbase.DatabaseId BYTE(4)NOT NULL
X(8)
IndexStatistics None VARBYTE(16383) X(255) (explicit)
Name None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
CreateUID Dbase.DatabaseId BYTE(4) X(8)
CreateTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
LastAlterUID Dbase.DatabaseId BYTE(4) X(8)
LastAlterTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
LastAccessTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
AccessCount None INTEGER --,---,---,--9 (explicit)
JoinIndexTableID
If a table has a join or hash index defined on it, there is a row (or rows) in the DBC.Indexes table. The IndexType column contains these values:
• J
• N
If the join or hash index is created in 12.0, the JoinIndexTableID contains the table ID of the join index.
If the IndexType is not 'J' or 'N,' or the join index was created prior to 7.0, the JoinIndexTableID is NULL.
TVM.TVMId BYTE(6) X(12)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
LogicalHostId (NUPI) None SMALLINTNOT NULL
---,--9 (explicit)
SessionNumber (NUPI) None INTEGERNOT NULL
--,---,---,--9 (explicit)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 481
DBC.JARS
The DBC.JARS table contains one row for each JAR object installed on the database system.
CoordTaskId (NUPI) None VARBYTE(30)NOT NULL
X(60)
RunUnitId (NUPI) None VARBYTE(30)NOT NULL
X(60)
LogonUserName Dbase.DatabaseName VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
ResolvingUserLogonName Dbase.DatabaseName VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
CommitOrRollback None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
UserLogonDate None DATENOT NULL
YY/MM/DD (explicit)
UserLogonTime None FLOATNOT NULL
99:99:99 (explicit)
CompletionDate None DATENOT NULL
YY/MM/DD (explicit)
CompletionTime None FLOATNOT NULL
99:99:99 (explicit)
Options None CHAR(1)LATINNOT CASESPECIFIC
X(1)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
DatabaseId (NUPI)
The identifier of the database or user in which the JAR identified by JarName is defined.
Dbase.DatabaseIdTVM.DatabaseId
BYTE(4)NOT NULL
X(8)
JarId (USI)
The unique identifier for an installed JAR.
TVM.TVMId BYTE(6)NOT NULL
X(12)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
482 Data Dictionary
DBC.JAR_JAR_Usage
The DBC.JAR_JAR_USAGE table contains one row for each JAR included in the SQL-Java path of another JAR.
The SQL-Java path is created, altered, or dropped by calling SQLJ.Alter_Java_Path.
JarName
The name designator for an installed JAR.
None. VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFICNOT NULL
X(128)
JarRevision
The current revision number for the JAR identified by JarName.
None INTEGERNOT NULL
--,---,---,--9 (explicit)
ExtFileReference
The JAR’s 'locspec' argument used for the SQLJ.Install_Jar or SQLJ.Replace_Jar external stored procedures.
None VARCHAR(1000)LATINCASESPECIFIC
X(255)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
JarId (NUPI)
The unique identifier for the JAR identified by JarName.
TVM.TVMId BYTE(6)NOT NULL
X(12)
JarName
The name designator for a JAR that depends on code from another JAR.
None VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFICNOT NULL
X(128)
PathJarId
The unique identifier for a JAR, which is in the SQL-Java path of the JAR identified by JarName.
TVM.TVMId BYTE(6)NOT NULL
X(12)
PathJarName
The name designator for a JAR, which is in the SQL-Java path of the JAR identified by JarName.
None VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFICNOT NULL
X(128)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 483
DBC.LogonRuleTbl
The DBC.LogonRuleTbl table indicates what users can legally logon from what host, and whether a password is necessary.
DatabaseId
The identifier of the database or user in which the JAR identified by JarName is defined.
Dbase.DatabaseIdTVM.DatabaseId
BYTE(4)NOT NULL
X(8)
ReferencedClsName
Referenced class and package information for the JAR identified by PathJarName which is in the SQL-Java path of the JAR identified by JarName.
None VARCHAR(1000)LATINCASESPECIFIC
X(255)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
UserId (UPI) Dbase.DatabaseId BYTE(4)NOT NULL
X(8)
LogicalHostId (UPI) None SMALLINTNOT NULL
ZZZ9 (explicit)
LogonStatus None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
NullPassWord None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
CreateUID Dbase.DatabaseId BYTE(4) X(8)
CreateTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
LastAccessTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
AccessCount None INTEGER --,---,---,--9 (explicit)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
484 Data Dictionary
DBC.MDSRecoveryTbl
The DBC.MDSRecoveryTbl table contains databasename and tableid affected by DDL statements that Teradata cannot send to the Relay Services Gateway (RSG) when the Meta Data Services Gateway is down. TableID is TVM.TVMId for table level DDL and 0 for a database level DDL request.
DBC.Migration
The DBC.Migration table is an internal table.
DBC.Next
The DBC.Next table contains the next internal identifiers the DBC uses for processing.
Columns Referenced Column(s) Data Type Format
DBName (UPI) Dbase.DatabaseName VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
TVMId None BYTE(6)NOT NULL
X(12)
Columns Referenced Column(s) Data Type Format
RowNum (NUPI) None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
Field1 None BYTEINTNOT NULL
---9 (explicit)
Columns Referenced Column(s) Data Type Format
RowNum (UPI) None CHAR(1)LATINNOT CASESPECIFICNOT 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)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 485
DBC.OldPasswords
The DBC.OldPasswords table contains a history of passwords used by a user in the system.
DBC.Owners
The DBC.Owners table shows information for each database in the system.
EventNum None BYTE(4)NOT NULL
X(8)
LogonSequenceNo None BYTE(4)NOT NULL
X(8)
TempTableID None BYTE(4)NOT NULL
X(8)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
UserName (NUPI) Dbase.DatabaseName VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
PasswordDate None INTEGERNOT NULL
--,---,---,--9 (explicit)
EncryptionFlag None BYTE(1)NOT NULL
X(2)
PasswordSalt None BYTE(2)NOT NULL
X(4)
EncryptedPassword None VARBYTE(512)NOT NULL
X(1024)
Columns Referenced Column(s) Data Type Format
OwnerId (NUPI) Dbase.DatabaseId BYTE(4)NOT NULL
X(8)
OwneeId Dbase.DatabaseIdTVM.DatabaseId
BYTE(4)NOT NULL
X(8)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
486 Data Dictionary
DBC.ParentChildCorrelation
The DBC.ParentChildCorrelation table shows the parent-child date correlation.
Note: This table is in the system but is not used.
DBC.Parents
The DBC.Parents table represents the parentage for each database in the system. This table is actually the inverse of Owners.
Columns Referenced Column(s) Data Type Format
ParentDbId (NUPI) None BYTE(4)NOT NULL
X(8)
ParentTblID (NUPI) None BYTE(6)NOT NULL
X(12)
ChildDbID (NUPI) None BYTE(4)NOT NULL
X(8)
ChildTblID (NUPI) None BYTE(6)NOT NULL
X(12)
ParentTblDateFID None SMALLINTNOT NULL
---,--9 (explicit)
ChildTblDateFID None SMALLINTNOT NULL
---,--9 (explicit)
CorrelationLowerBound None INTEGERNOT NULL
--,---,---,--9 (explicit)
CorrelationUpperBound None INTEGERNOT NULL
--,---,---,--9 (explicit)
CorrelationTightness None FLOATNOT NULL
---,---,---,--9.99 (explicit)
Columns Referenced Column(s) Data Type Format
DbId Dbase.DatabaseId BYTE(4)NOT NULL
X(8)
ParentId Dbase.DatabaseId BYTE(4)NOT NULL
X(8)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 487
DBC.PasswordRestrictions
The DBC.PasswordRestrictions table restricts a password from being created that contains any word listed in the table.
DBC.Profiles
The DBC.Profiles table controls the user password security and the amount of system resources (default database, spool space, temporary space, and account) that the user is allowed to consume.
Columns Referenced Column(s) Data Type Format
RestrictedWord (UPI)
Specifies this word that cannot be contained in a password.
None VARCHAR(30)UNICODEUPPERCASENOT CASESPECIFICNOT NULL
X(30)
Columns Referenced Column(s) Data Type Format
ProfileNameI (UPI) None VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFICNOT NULL
X(128)
ProfileName None VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
ProfileId (USI) None BYTE(4)NOT NULL
X(8)
DefaultAccount None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
DefaultDataBase None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
SpoolSpace None FLOAT ----,---,---,---,--9 (explicit)
TempSpace None FLOAT ----,---,---,---,--9 (explicit)
ExpirePassword None SMALLINT ---,--9 (explicit)
PasswordMinChar None BYTEINT --9 (explicit)
PasswordMaxChar None BYTEINT --9 (explicit)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
488 Data Dictionary
PasswordDigits
The following are the possible values:
• N, n = No digits are allowed in the password string
• Y, y = Digits are allowed in the password string
• R, r = At least one digit is required in the password string
None CHAR(1)LATINUPPERCASENOT CASESPECIFIC
X(1)
PasswordSpecChar
For the possible options, see DBC.SysSecDefaults.
None CHAR(1)LATINUPPERCASENOT CASESPECIFIC
X(1)
PasswordRestrictWords
These are the possible values:
• N, n = Do not restrict any words from being contained within in a password string.
• Y, y = Restrict any word (case independent) that is listed in DBC.PasswordRestrictions from being a significant part of a password string.
None CHAR(1)LATINUPPERCASENOT CASESPECIFIC
X(1)
MaxLogonAttempts None BYTEINT ---9 (explicit)
LockedUserExpire None SMALLINT ---,--9 (explicit)
PasswordReuse None SMALLINT ---,--9 (explicit)
Version None SMALLINTNOT NULL
---,--9 (explicit)
CommentString None VARCHAR(255)UNICODENOT CASESPECIFIC
X(255)
CreateUID None BYTE(4)NOT NULL
X(8)
CreateTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 489
DBC.RCConfiguration
The DBC.RCConfiguration table contains information about the AMPs configuration for an event in the RCEvent table.
LastAlterUID None BYTE(4)NOT NULL
X(8)
LastAlterTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
CostProfName
Specifies the cost profile to be used for sessions started by any user assigned to this user profile.
Normally, when a session is started, the session and request level profiles contained in its local cost profile segment are copies of the system level cost profile.
This change extends session start-up so that if CostProfName is the name of a valid cost profile that is different from the system level cost profile, then the one named by CostProfName is activated at the session and request level. If CostProfName is not NULL but is not a valid cost profile name, then the system level cost profile is used as previously described.
CostProfiles.ProfileName CHAR(30)LATINNOT CASESPECIFIC
X(128)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
EventNum (NUPI) RCEvent.EventNum INTEGERNOT NULL
--,---,---,--9 (explicit)
LogProcessor None SMALLINT -(5)9
PhyProcessor None SMALLINT ZZZZ9 (explicit)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
490 Data Dictionary
DBC.RCEvent
The DBC.RCEvent table contains a row for each event executed by the Host Utilities.
ProcessorState None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
RestartSeqNum None SMALLINT ---,--9 (explicit)
Vproc None SMALLINT -(5)9
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
EventNum (NUPI) RCConfiguration.EventNum
RCMedia.EventNumber
INTEGERNOT NULL
--,---,---,--9 (explicit)
CreateDate None DATENOT NULL
YY/MM/DD (explicit)
CreateTime None FLOATNOT NULL
99:99:99.99 (explicit)
EventType None CHAR(30)LATINNOT CASESPECIFICNOT NULL
X(30)
UserName Dbase.DatabaseName VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
DatabaseName Dbase.DatabaseName VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
ObjectId None BYTE(4)NOT NULL
X(8)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 491
ObjectType
Returns a single character that defines the type of object involved from the list below.
• D = Total database
• T = Data table
• J = Journal table
• Q = Backup or restore of selected partitions
None CHAR(1)LATINNOT CASESPECIFIC
X(1)
AllAmpsFlag None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
RestartSeqNum RCConfiguration.RestartSeqNum
SMALLINT ---,--9 (explicit)
TableName TVM.TVMName VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
CheckPointName None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
LinkingEventNum None INTEGER --,---,---,--9 (explicit)
OperationInProcess None CHAR(1) LATINNOT CASESPECIFICNOT NULL
X(1)
DataSetName None CHAR(44)LATINNOT CASESPECIFIC
X(44)
LockMode None CHAR(1)LATINNOT CASESPECIFIC
X(1)
JournalUsed None CHAR(1)LATINNOT CASESPECIFIC
X(1)
JournalSaved None CHAR(1)LATINNOT CASESPECIFIC
X(1)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
492 Data Dictionary
DBC.RCMedia
The DBC.RCMedia table contains identification of storage media for events.
DBC.ReconfigInfo
The DBC.ReconfigInfo table is reserved for future use.
IndexPresent None CHAR(1)LATINNOT CASESPECIFIC
X(1)
DupeDumpSet RCMedia.DupeDumpSet
CHAR(1)LATINNOT CASESPECIFIC
X(1)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
EventNumber (NUPI) RCMediaEventNumber
INTEGERNOT NULL
--,---,---,--9 (explicit)
VolSerialId None CHAR(6)LATINNOT CASESPECIFICNOT NULL
X(6)
VolSequenceNum None SMALLINT ---,--9 (explicit)
DupeDumpSet None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
Columns Referenced Column(s) Data Type Format
ReconfigId (UPI) None INTEGERNOT NULL
ZZZZZZZZZ9
Description None VARCHAR(512)UNICODENOT CASESPECIFIC
X(512)
ReconfigType None BYTEINTNOT NULL
ZZ9
BeginTimeStamp None TIMESTAMP(0)NOT NULL
YYYY-MM-DDBHH:MI:SS
EndTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 493
Status None CHAR(10)LATINNOT CASESPECIFICNOT NULL
X(10)
CurrByteCount None FLOATNOT NULL
----,---,---,---,--9 (explicit)
CurrTabRedistCount None FLOATNOT NULL
----,---,---,---,--9 (explicit)
CurrTabDeleteCount None FLOATNOT NULL
----,---,---,---,--9 (explicit)
EstRemainRedistSecs None FLOATNOT NULL
----,---,---,---,--9 (explicit)
EstRemainDeleteSecs None FLOATNOT NULL
----,---,---,---,--9 (explicit)
BeginTimeStamp1 None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
EndTimeStamp1 None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
BeginTimeStamp2 None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
EndTimeStamp2 None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
BeginTimeStamp3 None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
EndTimeStamp3 None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
BeginTimeStamp4 None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
EndTimeStamp4 None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
BeginTimeStamp5 None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
EndTimeStamp5 None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
BeginTimeStamp6 None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
EndTimeStamp6 None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
BeginTimeStamp7 None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
EndTimeStamp7 None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
BeginTimeStamp8 None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
EndTimeStamp8 None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
BeginTimeStamp9 None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
EndTimeStamp9 None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
AddAmpCount None SMALLINT ZZZZ9
DelAmpCount None SMALLINT ZZZZ9
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
494 Data Dictionary
DBC.ReconfigOrder
The DBC.ReconfigOrder table is reserved for future use.
MovAmpCount None SMALLINT ZZZZ9
ModAmpCount None SMALLINT ZZZZ9
NodeCount None SMALLINTNOT NULL
ZZZZ9
TotTaskCount None SMALLINTNOT NULL
ZZZZ9
TotTableCount None INTEGERNOT NULL
ZZZZZZZZZ9
TotByteCount None FLOATNOT NULL
----,---,---,---,--9 (explicit)
TotCatchUpByteCount None FLOATNOT NULL
----,---,---,---,--9 (explicit)
TotJournalByteCount None FLOATNOT NULL
----,---,---,---,--9 (explicit)
ActualRedistSecs None FLOATNOT NULL
----,---,---,---,--9 (explicit)
ActualDeleteSecs None FLOATNOT NULL
----,---,---,---,--9 (explicit)
EstRedistSecs None FLOATNOT NULL
----,---,---,---,--9 (explicit)
EstDeleteSecs None FLOATNOT NULL
----,---,---,---,--9 (explicit)
Reserved None VARCHAR(10000)LATINNOT CASESPECIFIC
X(10000)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
DBName (UPI) None VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
TabName (UPI) None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 495
DBC.ReconfigTableStats
The DBC.ReconfigTableStats table is reserved for future use.
Phase (UPI) None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
Level None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
OrderCode None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
OrderNumber None SMALLINT ZZZZ9
CheckTableOption None BYTEINT ZZ9
Reserved None VARCHAR(10,000)LATINNOT CASESPECIFIC
X(10000)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
DBName (NUPI) None VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
TabName (NUPI) None VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
ReconfigId None INTEGERNOT NULL
ZZZZZZZZZ9
Phase None CHAR(1)LATINNOT CASESPECIFIC
X(1)
BeginTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
EndTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
TotRowCount None FLOATNOT NULL
----,---,---,---,--9 (explicit)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
496 Data Dictionary
TotByteCount None FLOATNOT NULL
----,---,---,---,--9 (explicit)
TotCPUSecs None FLOATNOT NULL
----,---,---,---,--9 (explicit)
TotIOCount None FLOATNOT NULL
----,---,---,---,--9 (explicit)
LowRowCount None FLOATNOT NULL
----,---,---,---,--9 (explicit)
LowRowCountAmp None SMALLINT ZZZZ9
HighRowCount None FLOATNOT NULL
----,---,---,---,--9 (explicit)
HighRowCountAmp None SMALLINT ZZZZ9
LowByteCount None FLOATNOT NULL
----,---,---,---,--9 (explicit)
LowByteCountAmp None SMALLINT ZZZZ9
HighByteCount None FLOATNOT NULL
----,---,---,---,--9 (explicit)
HighbyteCountAmp None SMALLINT ZZZZ9
LowCPUSecsCount None FLOATNOT NULL
----,---,---,---,--9 (explicit)
LowCPUSecsCountAmp None SMALLINT ZZZZ9
HighCPUSecsCount None FLOATNOT NULL
----,---,---,---,--9 (explicit)
HighCPUSecsCountAmp None SMALLINT ZZZZ9
LowIOCount None FLOATNOT NULL
----,---,---,---,--9 (explicit)
LowIOCountAmp None SMALLINT ZZZZ9
HighIOCount None FLOATNOT NULL
----,---,---,---,--9 (explicit)
HighIOCountAmp None SMALLINT ZZZZ9
NUSICount None SMALLINT ZZZZ9
FallbackFlag None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
DBlockSize None INTEGERNOT NULL
ZZZZZZZZZ9
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 497
PartitionCount None INTEGERNOT NULL
ZZZZZZZZZ9
ActualRedistSecs None FLOATNOT NULL
----,---,---,---,--9 (explicit)
ActualDeleteSecs None FLOATNOT NULL
----,---,---,---,--9 (explicit)
EstRedistSecs None FLOATNOT NULL
----,---,---,---,--9 (explicit)
EstDeleteSecs None FLOATNOT NULL
----,---,---,---,--9 (explicit)
FSGIOCount None FLOATNOT NULL
----,---,---,---,--9 (explicit)
FSysReadCount None FLOATNOT NULL
----,---,---,---,--9 (explicit)
FSysWriteCount None FLOATNOT NULL
----,---,---,---,--9 (explicit)
FSysMiscCount None FLOATNOT NULL
----,---,---,---,--9 (explicit)
MsgRcvCount None FLOATNOT NULL
----,---,---,---,--9 (explicit)
MsgSendCount None FLOATNOT NULL
----,---,---,---,--9 (explicit)
MsgMisCount None FLOATNOT NULL
----,---,---,---,--9 (explicit)
MsgWaitRcvTime None FLOATNOT NULL
----,---,---,---,--9 (explicit)
MsgWaitSendTime None FLOATNOT NULL
----,---,---,---,--9 (explicit)
MsgWaitMiscTime None FLOATNOT NULL
----,---,---,---,--9 (explicit)
NoMemFlushCount None INTEGERNOT NULL
ZZZZZZZZZ9
CkptFlushCount None INTEGERNOT NULL
ZZZZZZZZZ9
Reserved None VARCHAR(10,000)LATINNOT CASESPECIFIC
X(10000)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
498 Data Dictionary
DBC.ReferencedTbls
The DBC.ReferencedTbls table contains information about the parent table of a referential constraint.
DBC.ReferencingTbls
The DBC.ReferencingTbls table contains information about the child table of a referential constraint.
Columns Referenced Column(s) Data Type Format
ReferencedDbID (NUPI) Dbase.DatabaseId BYTE(4)NOT NULL
X(8)
ReferencedTblID (NUPI) TVM.TVMId
TVFields.TableId
BYTE(6)NOT NULL
X(12)
ReferenceIdx None SMALLINTNOT NULL
---,--9 (explicit)
ParentKeyFID TVFields.FieldId SMALLINTNOT NULL
---,--9 (explicit)
ReferencingDbID Dbase.DatabaseId BYTE(4)NOT NULL
X(8)
ReferencingTblID TVM.TVMId
TVFields.TableId
BYTE(6)NOT NULL
X(12)
ForeignKeyFID TVFields.FieldId SMALLINTNOT NULL
---,--9 (explicit)
InconsistentFlag None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
ReferenceIdxName None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
CreateUID Dbase.DatabaseId BYTE(4) X(8)
CreateTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
LastAccessTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
AccessCount None INTEGER --,---,---,--9 (explicit)
Columns Referenced Column(s) Data Type Format
ReferencingDbID (NUPI)
Dbase.DatabaseId BYTE(4)NOT NULL
X(8)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 499
DBC.RepBatchStatus
The DBC.RepBatchStatus table is an internal table.
ReferencingTblID (NUPI)
TVM.TVMId
TVFields.TableId
BYTE(6)NOT NULL
X(12)
ReferenceIdx None SMALLINTNOT NULL
---.--9 (explicit)
ForeignKeyFID TVFields.FieldId SMALLINTNOT NULL
---.--9 (explicit)
ReferencedDbID Dbase.DatabaseId BYTE(4)NOT NULL
X(8)
ReferencedTblID TVM.TVMId
TVMFields.TableId
BYTE(6)NOT NULL
X(12)
ParentKeyFID TVfields.FieldId SMALLINTNOT NULL
---,--9 (explicit)
InconsistentFlag None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
ReferenceIdxName None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
CreateUID Dbase.DatabaseId BYTE(4) X(8)
CreateTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
LastAccessTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
AccessCount None INTEGER --,---,---,--9 (explicit)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
RSQualifier (UPI) None INTEGERNOT NULL
--,---,---,--9 (explicit)
BatchNum None BYTEINTNOT NULL
--9 (explicit)
CompletionStatus None CHAR(1)LATINNOT CASESPECIFIC
X(1)
CommitSeqNumber None BTYE(16) X(32)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
500 Data Dictionary
DBC.Repgroup
The DBC.Repgroup table defines each replication group in the server.
Columns Referenced Column(s) Data Type Format
GroupNameI (UPI)
Returns the name of a replication group.
None VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFICNOT NULL
X(128)
GroupName
Returns the name of a replication group.
None VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFICNOT NULL
X(128)
GroupId (USI)
Returns the ID of a replication group in integer format.
None INTEGERNOT NULL
--,---,---,--9 (explicit)
GroupLockId
Returns the doubleword identifier allocated to a group.
None BYTE(4)NOT NULL
X(8)
CreateUID
Returns the ID of the user who created a group in doubleword format.
None BYTE(4)NOT NULL
X(8)
GroupOperation
Returns the active operation that a replication group is in.
None CHAR(1)LATINUPPERCASENOT CASESPECIFIC
X(1)
GroupStatus
Returns the Status of a replication group.
None CHAR(1)LATINUPPERCASE
X(1)
ProtectMode
Returns the mode of replication group. This is defined at the time when replication group starts a capture process.
None CHAR(1)LATINUPPERCASENOT CASESPECIFIC
X(1)
CreateTimeStamp
Returns a timestamp when a replication group is created.
None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 501
DBC.Repgrouptables
The DBC.Repgrouptables table lists each base table that is a member of a replication group.
LastAlterUID
Returns the user ID of the last user who creates or alters the group.
None BYTE(4) X(8)
LastAlterTimeStamp
Returns a timestamp when a group is created or altered.
None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
Version None SMALLINTNOT NULL
---,--9 (explicit)
CommentString
Returns the comments (if any) that user(s) have for a replication group.
None VARCHAR(255)UNICODENOT CASESPECIFIC
X(255)
RequestText
Returns the request text (same as that entered by users) that last alters or creates a group.
None VARCHAR(12500)UNICODENOT CASESPECIFIC
X(255) (explicit)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
GroupId (NUPI)
Returns the identifier assigned to a replication group.
None INTEGERNOT NULL
--,---,---,--9 (explicit)
BaseTblId
Returns the identifier assigned to one of the base tables of the replication group identified by GroupId.
None BYTE (6)NOT NULL
X(12)
ErrorTblId
The value for this field is always 0.
None BYTE (6)NOT NULL
X(12)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
502 Data Dictionary
DBC.Roles
The DBC.Roles table assigns privileges that allow the user to access different objects and operations.
DBC.RoleGrants
The DBC.RoleGrants table contains roles granted to users or other roles.
Columns Referenced Column(s) Data Type Format
RoleNameI (UPI) None VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFICNOT NULL
X(128)
RoleName None VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
RoleId (USI) AccessRights.UserId BYTE(4)NOT NULL
X(8)
CreateUID None BYTE(4)NOT NULL
X(8)
CommentString None VARCHAR(255)UNICODENOT CASESPECIFIC
X(255)
CreateTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
ExtRole None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
Columns Referenced Column(s) Data Type Format
GranteeId (NUPI, USI) None BYTE(4)NOT NULL
X(8)
GranteeKind None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
RoleId (USI, NUSI) Roles.RoleId BYTE(4)NOT NULL
X(8)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 503
DBC.Routine_JAR_Usage
The DBC.Routine_JAR_Usage table contains one row for each Java external stored procedure that names a JAR in its external Java reference string.
This table shows the dependency of a Java external stored procedure on a given JAR.
WithAdmin None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
GrantorID None BYTE(4)NOT NULL
X(8)
CreateTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
JarId (NUPI)
The unique identifier for the JAR identified by JarName.
TVM.TVMId BYTE(6)NOT NULL
X(12)
JarName
The name designator for a JAR that contains code that the RoutineName external stored procedure depends on.
None VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFICNOT NULL
X(128)
RoutineId (USI)
The unique identifier for the Java external stored procedure identified by RoutineName.
TVM.TVMId BYTE(6)NOT NULL
X(12)
RoutineName
The name designator for the Java external stored procedure that depends on the JAR identified by JarName.
None VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFICNOT NULL
X(128)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
504 Data Dictionary
DBC.SessionTbl
The DBC.SessionTbl table contains current user logon information.
DatabaseId
The identifier of the database or user in which both the JAR identified by JarName and the Java external stored procedure identified by RoutineName are defined.
Dbase.DatabaseIdTVM.DatabaseId
BYTE(4)NOT NULL
X(8)
Signature
The signature defined for the Java external stored procedure identified by RoutineName.
None VARCHAR(6400)LATINCASESPECIFIC
X(255)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
HostNo (UPI) TempTables.HostNo SMALLINTNOT NULL
---,--9 (explicit)
SessionNo (UPI) TempTables.SessionNo
INTEGERNOT NULL
--,---,---,--9 (explicit)
IFPNo None SMALLINTNOT NULL
-(5)9
LogonDate None DATENOT NULL
YY/MM/DD (explicit)
LogonTime None FLOATNOT NULL
99:99:99.99 (explicit)
LogonCollation None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
LogonDatabase Dbase.DatabaseName VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
CurrentCollation None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 505
CurrentDatabase Dbase.DatabaseName VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
UserName Dbase.DatabaseName VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
UserId Dbase.DatabaseId BYTE(4)NOT NULL
X(8)
AccountName Dbase.AccountName VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
StartMBox None BYTE(10) X(20)
ContMBox None BYTE(10) X(20)
AbortMBox None BYTE(10) X(20)
Partition None CHAR(16)LATINNOT CASESPECIFIC
X(20) (explicit)
PartCode None BYTEINT --9 (explicit)
LogonSource None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
LogonSequenceNo None BYTE(4) X(8)
LogicalHostId None SMALLINTNOT NULL
ZZZ9 (explicit)
ConnectFunction None SMALLINTNOT NULL
---,--9 (explicit)
Options None CHAR(10)LATINNOT CASESPECIFICNOT NULL
X(10)
ExpiredPassword None CHAR(1)LATINUPPERCASENOT CASESPECIFIC
X(1)
TimeZoneHour None BYTEINT ---9 (explicit)
TimeZoneMinute None BYTEINT ---9 (explicit)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
506 Data Dictionary
CurrentDateForm None CHAR(1)LATINUPPERCASENOT CASESPECIFIC
X(1)
DefaultCharType None SMALLINTNOT NULL
---,--9 (explicit)
RepSesOverride None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
CurrentRole Roles.RoleName VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
LogonAcct None VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
ProfileName None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
LDAP
These are the possible values:
• N = non directory-based sessions.
• P = session of an external user mapped to a perm user.
• X = session of an external user not mapped to any perm user.
None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
ExternalRoles None VARCHAR(1934)UNICODENOT CASESPECIFIC
X(464)
AuditTrailId None VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFICNOT NULL
X(128)
SessionVproc None SMALLINT ---,--9 (explicit)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 507
ExtAuth None CHAR(1)LATINNOT CASESPECIFIC
X(1)
AuthMethod None BYTEINT --9 (explicit)
AuthUser None VARCHAR(256)UNICODEUPPERCASENOT CASESPECIFIC
X(256)
MechanismOid None VARBYTE(32) X(64)
MechData None VARBYTE(528) X(1056)
IsolationLevel
Returns the isolation level of a session.
The following are the possible values:
• RU - read uncommitted
• RC - read committed
• RR - repeatable read
• SR - serializable
The default is SR.
Note: For this release, only RU and SR are supported.
None CHAR(2)LATINNOT CASESPECIFICNOT NULL
X(2)
RFU None VARBYTE(1024) X(2048)
ClientLogonDiagnostics
Note: This field is not used.
None VARCHAR(1024)LATINNOT CASESPECIFIC
X(1024)
ExtendedLogonSource
Note: This field is not used.
None VARCHAR(2048)UNICODENOT CASESPECIFIC
X(2048)
ClientAddrSource
Note: This field is not used.
None VARCHAR(60)LATINNOT CASESPECIFIC
X(60)
AppIDSource
Note: This field is not used.
None VARCHAR(256)UNICODENOT CASESPECIFIC
X(256)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
508 Data Dictionary
DBC.SW_Event_Log
The DBC.SW_Event_Log table contains information about system errors and is used by Teradata Database field engineers. The system inserts rows in response to software error conditions.
ClientIDSource
Note: This field is not used.
None VARCHAR(256)UNICODENOT CASESPECIFIC
X(256)
QueryBand
Returns the queryband set for the session.
None VARCHAR(2048)UNICODENOT CASESPECIFIC
X(2048)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
TheDate (NUPI) None DATENOT NULL
YY/MM/DD (explicit)
TheTime (NUPI) None FLOATNOT NULL
99:99:99.999999 (explicit)
Event_Tag None INTEGERNOT NULL
Z99-99999-99 (explicit)
Category None BYTEINT Z9 (explicit)
Severity None SMALLINT ZZ9 (explicit)
PMA None INTEGER ZZ9-99 (explicit)
Vproc None INTEGER -(5)9 (explicit)
Partition None BYTEINT Z9 (explicit)
Task None SMALLINT ZZZZ9 (explicit)
TheFunction None VARCHAR(32)LATINNOT CASESPECIFIC
X(32)
SW_Version None VARCHAR(64)LATINNOT CASESPECIFIC
X(64)
Line None BYTEINTNOT NULL
ZZ9 (explicit)
Text None VARCHAR(1024)UNICODENOT CASESPECIFICNOT NULL
X(255)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 509
DBC.SysSecDefaults
The DBC.SysSecDefaults table provides system default information.
Columns Referenced Column(s) Data Type Format
PrimeIndex (UPI) None BYTEINTNOT NULL
--9 (explicit)
ExpirePassword None SMALLINTNOT NULL
---,--9 (explicit)
PasswordMinChar None BYTEINTNOT NULL
--9 (explicit)
PasswordMaxChar None BYTEINTNOT NULL
--9 (explicit)
PasswordDigits
The following are the possible values:
• N, n = No digits are allowed in the password string
• Y, y = Digits are allowed in the password string but not required
• R, r = At least one digit is required in the password string
None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
510 Data Dictionary
PasswordSpecChar
The following table shows the possible options.
None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
PasswordSpecChar RULE RULE RULE RULEOption Username Upper/Lower One Alpha Spec Chars---------------- -------- ----------- --------- ----------N, n Y Y Y NY, y Y Y Y YA, a Y Y Y RB, b Y Y R NC, c Y Y R YD, d Y Y R RE, e Y R R NF, f Y R R YG, g Y R R RH, h N Y Y NI, i N Y Y YJ, j N Y Y RK, k N Y R NL, l N Y R YM, m N Y R RO, o N R R NP, p N R R YR, r N R R R
RULE KEY--------N = Not allowedY = Allowed but not requiredR = Required
PasswordRestrictWords None CHAR(1)LATINUPPERCASENOT NULL
X(1)
MaxLogonAttempts None BYTEINTNOT NULL
---9 (explicit)
LockedUserExpire None SMALLINTNOT NULL
---,--9 (explicit)
PasswordReuse None SMALLINTNOT NULL
---,--9 (explicit)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 511
DBC.SystemQTbl
The DBC.SystemQTbl table contains the type and kind of event detected and other fields to contain optional information.
Columns Referenced Column(s) Data Type Format
QEventTS (NUPI)
Returns the mandatory TimeStamp required by a Queue Table.
It is the indication when this row was inserted.
None TimeStamp(6)NOT NULL
YYYY-MMDDBHH:MI:SS.S(F)
EventComboName
Returns the name of the event combination that has become active (or inactive) due to various events occurring.
None VARCHAR(128)UNICODENOT NULLNOT CASESPECIFIC
X(128)
EventComboID
Returns the ID of the event combination that has become active (or inactive) due to various events occurring.
None INTEGER --,---,---,--9
EventComboStatus
indicates whether this row was posted because the event was activated or the event was made inactive. These are the values:
• 1 = Active
• 2 = InActive
None SMALLINT ZZZ9
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
512 Data Dictionary
DBC.TableConstraints
The DBC.TableConstraints table contains a row for each table-level constraint defined in the system.
Columns Referenced Column(s) Data Type Format
TVMId (NUPI) TVM.TVMId BYTE(6)NOT NULL
X(12)
Name None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
DBaseId Dbase.DatabaseId BYTE(4)NOT NULL
X(8)
TableCheck None VARCHAR(8192)UNICODECASESPECIFIC
X(255) (explicit)
CreateUID Dbase.DatabaseId BYTE(4) X(8)
CreateTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
LastAccessTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
AccessCount None INTEGER --,---,---,--9 (explicit)
ConstraintType
These are the possible values:
C=Explicit table-level constraint check.
Q=Implicit primary index partitioning constraint check.
None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
IndexNumber
These are the possible values:
NULL=No associated index
1=Primary index
None SMALLINT ---,--9 (explicit)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 513
DBC.TDWMEventHistory
The DBC.TDWMEventlog table provides a means by which an end user can discover the sequence of states and events that occurred at any point in time.
ConstraintCollation
These are the possible values:
A=ASCII
E=EBCDIC
M=MULTINATIONAL
C=CHARSET_COLL
J=JIS_COLL
U=Use the session collation
None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
CollName
Identifies the name of the Multinational and CHARSET_COLL collation; otherwise, it is NULL.
None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
ProcID (NUPI) None DECIMAL(5,0)NOT NULL
-(5)9 (explicit)
BufferTS (NUPI) None TIMESTAMP(2)NOT NULL
YYYY-MM-DDBHH:MI:SS (explicit)
EntryTS None TIMESTAMP(2)NOT NULL
YYYY-MM-DDBHH:MI:SS (explicit)
EntryKind None CHAR(10)LATINNOT CASESPECIFIC
X(10)
EntryID None INTEGER --,---,---,--9 (explicit)
EntryName None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
EventValue None INTEGER --,---,---,--9 (explicit)
Activity None CHAR(10)LATINNOT CASESPECIFIC
X(10)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
514 Data Dictionary
DBC.TDWMEventlog
The DBC.TDWMEventlog table contains Teradata Database events that could affect Teradata Dynamic Workload Manager (TDWM).
ActivityId None INTEGER --,---,---,--9 (explicit)
ActivityName None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
ConfigId None INTEGER --,---,---,--9 (explicit)
Spare1
Note: This field is not used.
None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
Spare2
Note: This field is not used.
None INTEGER --,---,---,--9 (explicit)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
ProcID (NUPI) None DECIMAL(5,0)NOT NULL
-(5)9 (explicit)
BufferTS (NUPI) None TIMESTAMP(2)NOT NULL
YYYY-MM-DDBHH:MI:SS (explicit)
SessionID None INTEGER --,---,---,--9 (explicit)
LogicalHostID None SMALLINT ZZZ9 (explicit)
WDID None INTEGER --,---,---,--9 (explicit)
OpenEnvID None INTEGER --,---,---,--9 (explicit)
SysConID None INTEGER --,---,---,--9 (explicit)
EventTime None TIMESTAMP(2)NOT NULL
YYYY-MM-DDBHH:MI:SS (explicit)
EventCode None INTEGERNOT NULL
--,---,---,--9 (explicit)
EventSubCode None INTEGER --,---,---,--9 (explicit)
ScopeValue None SMALLINT ZZZ9 (explicit)
EventInfo None VARCHAR(200)UNICODENOT CASESPECIFIC
X(200)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 515
DBC.TDWMExceptionLog
The DBC.TDWMExceptionLog table contains the results of the query affected by Teradata Workload Dynamic Manager exception handling.
Columns Referenced Column(s) Data Type Format
ProcID (NUPI) None DECIMAL(5,0)NOT NULL
-(5)9 (explicit)
BufferTS (NUPI) None TIMESTAMP(2)NOT NULL
YYYY-MM-DDBHH:MI:SS (explicit)
QueryID None DECIMAL(18,0)NOT NULL
--Z(17)9
UserName None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
SessionID None INTEGERNOT NULL
--,---,---,--9 (explicit)
RequestNum None INTEGER --,---,---,--9 (explicit)
LogicalHostID None SMALLINT ZZZ9 (explicit)
AcctString (unexpanded) None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
WDID None INTEGER --,---,---,--9 (explicit)
OpEnvID None INTEGER --,---,---,--9 (explicit)
SysConID None INTEGER --,---,---,--9 (explicit)
ClassificationTime None TIMESTAMP(2) YYYY-MMDDBHH:MI:SS.S(F)Z (explicit)
ExceptionTime None TIMESTAMP(2)NOT NULL
YYYY-MMDDBHH:MI:SS.S(F)Z (explicit)
ExceptionValue None INTEGER --,---,---,--9 (explicit)
ExceptionAction None CHAR(10)LATINNOT CASESPECIFIC
X(10)
NewWDID None INTEGER --,---,---,--9 (explicit)
ExceptionCode None INTEGERNOT NULL
--,---,---,--9 (explicit)
ExceptionSubCode None INTEGER --,---,---,--9 (explicit)
ErrorText None VARCHAR(1024)UNICODENOT CASESPECIFIC
X(255)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
516 Data Dictionary
DBC.TDWMSummaryLog
The DBC.TDWMSummaryLog table contains a summary of the activity of each workload definition.
ExtraInfo None VARCHAR(200)UNICODENOT CASESPECIFIC
X(200)
RuleID None INTEGER --,---,---,--9 (explicit)
WarningOnly None CHAR(1)LATINNOT CASESPECIFIC
X(1)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
ProcID (NUPI) None DECIMAL(5,0)NOT NULL
-(5)9 (explicit)
BufferTS (NUPI) None TIMESTAMP(2)NOT NULL
YYYY-MM-DDBHH:MI:SS (explicit)
WDID None INTEGERNOT NULL
--,---,---,--9 (explicit)
OpEnvID None INTEGER --,---,---,--9 (explicit)
SysConID None INTEGER --,---,---,--9 (explicit)
StartColTime None TIMESTAMP(2)NOT NULL
YYYY-MMDDBHH:MI:SS.S(F)Z (explicit)
Arrivals None INTEGERNOT NULL
--,---,---,--9 (explicit)
ActiveCount None INTEGERNOT NULL
--,---,---,--9 (explicit)
Completions None INTEGERNOT NULL
--,---,---,--9 (explicit)
MinRespTime None FLOATNOT NULL
----,---,---,---,--9 (explicit)
MaxRespTime None FLOATNOT NULL
----,---,---,---,--9 (explicit)
AvgRespTime None FLOATNOT NULL
----,---,---,---,--9 (explicit)
MinCPUTime None FLOATNOT NULL
----,---,---,---,--9 (explicit)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 517
DBC.TempStatistics
The DBC.TempStatistics table contains statistical information collected on a materialized global temporary table in the system.
MaxCPUTime None FLOATNOT NULL
----,---,---,---,--9 (explicit)
AvgCPUTime None FLOATNOT NULL
----,---,---,---,--9 (explicit)
DelayedCount None INTEGERNOT NULL
--,---,---,--9 (explicit)
AvgDelayTime None FLOATNOT NULL
----,---,---,---,--9 (explicit)
ExceptionCount None INTEGERNOT NULL
--,---,---,--9 (explicit)
MetSLGCount None INTEGERNOT NULL
--,---,---,--9 (explicit)
AbortCount None INTEGERNOT NULL
--,---,---,--9 (explicit)
ErrorCount None INTEGERNOT NULL
--,---,---,--9 (explicit)
OtherCount None INTEGERNOT NULL
--,---,---,--9 (explicit)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
HostNo (NUPI) None SMALLINTNOT NULL
---,--9 (explicit)
SessionNo (NUPI) SessionTbl.SessionNo INTEGERNOT NULL
--,---,---,--9 (explicit)
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 SMALLINTNOT NULL
---,--9 (explicit)
StatInfo None VARBYTE(16383) X(255)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
518 Data Dictionary
DBC.TempTables
The DBC.TempTables table contains a row for each materialized global temporary table in the system.
DBC.TextTbl
The DBC.TextTbl table saves the "CreateText" and/or "RequestText" in case the text cannot fit in the DBC.TVM row.
Columns Referenced Column(s) Data Type Format
HostNo (NUPI) SessionTbl.HostNo SMALLINTNOT NULL
---,--9 (explicit)
SessionNo (NUPI) SessionTbl.SessionNo INTEGERNOT NULL
--,---,---,--9 (explicit)
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 SMALLINTNOT NULL
---,--9 (explicit)
Columns Referenced Column(s) Data Type Format
TextId (NUPI) None BYTE(6)NOT NULL
X(12)
TextType None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
LineNo None SMALLINTNOT NULL
---,--9 (explicit)
TextString None VARCHAR(32000)UNICODENOT CASESPECIFICNOT NULL
X(255) (explicit)
DatabaseId None BYTE(4)NOT NULL
X(8)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 519
DBC.Translation
The DBC.Translation table contains information about the character translation tables used.
DBC.TriggersTbl
The DBC.TriggersTbl table contains a row for each trigger in the system.
Columns Referenced Column(s) Data Type Format
TranslateName (UPI) None VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
TranslateID (USI) None BYTEINTNOT NULL
ZZ9 (explicit)
Install None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT 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)
Columns Referenced Column(s) Data Type Format
TableId (NUPI) TVM.TVMId BYTE(6)NOT NULL
X(12)
TriggerId (USI) TVM.TVMId BYTE(6)NOT NULL
X(12)
DatabaseID Dbase.DatabaseId BYTE(4)NOT NULL
X(8)
TriggerName None VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
520 Data Dictionary
TriggerEnabled None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
ActionTime None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
TriggerEvent None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
Kind None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
TriggerOrder None SMALLINT ---,--9 (explicit)
CommentString None VARCHAR(255)UNICODENOT CASESPECIFIC
X(255)
CreateText None VARCHAR(13000)UNICODENOT CASESPECIFIC
X(255)
CreateUID Dbase.DatabaseId BYTE(4) X(8)
CreateTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
LastAlterUID Dbase.DatabaseId BYTE(4) X(8)
LastAlterTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
LastAccessTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
AccessCount None INTEGER --,---,---,--9 (explicit)
SubjectTabDbaseId Dbase.DatabaseId BYTE(4)NOT NULL
X(8)
CreateTxtOverflow TVM.CreateTxtOverflow
CHAR(1)LATINUPPERCASENOT CASESPECIFIC
X(1)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 521
DBC.TSETQueryText
The DBC.TSETQueryText table shows which SQL statement caused the error.
That SQL statement is logged into this table. The Teradata Database administrator runs a standalone utility called TSET, which obtains additional diagnostic information that can help reproduce the problem on another system.
Columns Referenced Column(s) Data Type Format
QueryID (UPI) None INTEGERNOT NULL
--,---,---,--9 (explicit)
ErrorCode None INTEGERNOT NULL
----------9 (explicit)
Handled
Indicates whether TSET has been executed for this query.
None BYTEINTNOT NULL
--9 (explicit)
QueryTime
Returns the timestamp of when query was inserted into DBC.TSETQueryText.
None TIMESTAMP(0)NOT NULL
YYYY-MM-DDBHH:MI:SS
DefaultDatabase None VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
QueryText
Returns the submitted query text that caused an error.
None VARCHAR(31000)UNICODENOT CASESPECIFICNOT NULL
X(31000)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
522 Data Dictionary
DBC.TVFields
The DBC.TVFields table Contains one row for each occurrence of the following objects in the system:
• Column of a table, view, join index, and hash index.
• Parameter for a macro, stored procedure, user-defined type, user-defined method, user-defined function, and external stored procedure.
Columns Referenced Column(s) Data Type Format
TableId (NUPI) Accessrights.TVMId
ReferencingTbls.ReferencingTblId
ReferencedTbls.ReferencedTblId
TVM.TVMId
BYTE(6)NOT NULL
X(12)
FieldName None VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
FieldId (USI) Accessrights.FieldId
ReferencingTbls. ForeignKeyFID
ReferencedTbls.ParentKeyFID
Indexes.FieldId
SMALLINTNOT NULL
---,--9 (explicit)
Nullable None CHAR(1)LATINUPPERCASENOT CASESPECIFIC
X(1)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 523
FieldType
These are the values:
• AT=ANSI Time
• BF=Byte Fixed
• BO=Byte Large Object
• BS=Binary String (family type)
• BV=Byte Varying
• CF=Character Fixed Latin
• CO=Character Large Object
• CS=Character String (family type)
• CV=Character Varying Latin
• D=Decimal
• DA=Date
• DH=Day-Hour
• DI=Day
• DM=Day-Minute
• DS=Day-Second
• DT=Date Tag (family tag)
• DY=Day
• F=Real or Floating Point
• HM=Hour-Minute
• HR=Hour
• HS=Hour-Second
• I=4 Byte Integer
• I1=1 Byte Integer
• I2=2 Byte Integer
None CHAR(2)LATINUPPERCASENOT CASESPECIFIC
X(2)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
524 Data Dictionary
FieldType (Cont.)
• I8=8 Byte Integer
• LF=Pre-TD12.0 Character Fixed Locale (Kanji1 or Latin)
• LV=Pre-TD12.0 Character Varying Locale (Kanji1 or Latin)
• MI=Minute
• MO=Month
• MS=Minute to Second
• NM=Number Tag (family code)
• SC=Second
• SZ=Timestamp with Time Zone
• TM=Time Tag (family code)
• TS=Timestamp without Time Zone
• TZ=ANSI Time with Time Zone
• UF=Character Fixed Unicode
• UT=User Defined Type
• UV=Character Varying Unicode
• YI=Year Interval (family code)
• YM=Year-Month
• YR=Year
None CHAR(2)LATINUPPERCASENOT CASESPECIFIC
X(2)
MaxLength None INTEGER --,---,---,--9 (explicit)
DefaultValue None VARCHAR(1024)UNICODENOT CASESPECIFIC
X(1024) (explicit)
DefaultValueI None VARBYTE(1024) X(1024)
TotalDigits None SMALLINT ---,--9 (explicit)
ImpliedPoint None SMALLINT ---,--9 (explicit)
FieldFormat None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 525
FieldTitle None VARCHAR(256)UNICODENOT CASESPECIFIC
X(256)
CommentString None VARCHAR(255)UNICODENOT CASESPECIFIC
X(255)
CollationFlag None CHAR(1)LATINUPPERCASENOT CASESPECIFIC
X(1)
UpperCaseFlag None CHAR(1)LATINUPPERCASENOT CASESPECIFIC
X(1)
DatabaseId Dbase.DatabaseId BYTE(4)NOT NULL
X(8)
Compressible None CHAR(1)LATINNOT CASESPECIFIC
X(1)
CompressValue None VARCHAR(255)UNICODENOT CASESPECIFIC
X(255)
CompressValueList None VARCHAR(8192)UNICODENOT CASESPECIFIC
X(8192)
FieldStatistics None VARBYTE(16383) X(255) (explicit)
ColumnCheck None VARCHAR(8192)UNICODENOT CASESPECIFIC
X(255) (explicit)
CheckCount None SMALLINTNOT NULL
---,--9 (explicit)
CreateUID Dbase.DatabaseId BYTE(4)NOT NULL
X(8)
CreateTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
LastAlterUID Dbase.DatabaseId BYTE(4) X(8)
LastAlterTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
LastAccessTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
AccessCount None INTEGER --,---,---,--9 (explicit)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
526 Data Dictionary
DBC.TVM
The DBC.TVM table contains one row for each table, view, trigger, stored procedure, join index, hash index, macro, user-defined type, user-defined method, user-defined function, external stored procedure, and JAR in the system.
SPParameterType
These are the possible values:
E = Result type of the external function or methodI = Input parameter of a function or methodO = Return parameter of a function or method
C = Return column for Table Function
S = SELF parameter
None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
CharType None SMALLINT ---,--9 (explicit)
LobSequenceNo None SMALLINT ---,--9 (explicit)
IdColType None CHAR(2)LATINUPPERCASENOT CASESPECIFIC
X(2)
UDTypeId None BYTE(6) X(12)
UDTName None VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFIC
X(128)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
DatabaseId (UPI) Accessrights.DatabaseId
Owners.owneeId
Dbase.DatabaseId
BYTE(4)NOT NULL
X(8)
TVMNameI (UPI) None VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFICNOT NULL
X(128)
LogicalHostId None SMALLINT ZZZ9 (explicit)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 527
SessionNo None INTEGER --,---,---,--9 (explicit)
TVMId (USI) AccLogRuleTbl.TVMId
DatabaseSpace.TableId
Accessrights.TVMId
Temptables.BaseTableId
ReferencingTbls.ReferencingTblId
ReferencedTbls.ReferencedTblId
DBCAssociation.TVMId
TVFields.TableId
Dbase.JournalId
Indexes.TableId
Tableconstraints.TVMId
UDFInfo.FunctionId
BYTE(6)NOT NULL
X(12)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
528 Data Dictionary
TableKind
These are the possible values:
• A = Aggregate function
• B = Combined aggregate and ordered analytical function
• D = JAR
• E = External Stored Procedure
• F = Standard function
• G = Trigger
• H = Instance or Constructor Method
• I = Join Index
• J = Journal
• M = Macro
• N = Hash Index
• P = SQL Procedure
• Q = Queue Table
• R = Table function
• S = Ordered analytical function
• T = Table
• U = User-defined data type
• V = View
• X = Authorization
UDFInfo.FunctionType
CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
ProtectionType None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
TempFlag None CHAR(1)LATINUPPERCASENOT CASESPECIFIC
X(1)
HashFlag None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 529
NextIndexId None SMALLINTNOT NULL
---,--9
NextFieIdId None SMALLINTNOT NULL
---,--9
Version
Returns the version count which is initially one and then incremented each time the table is altered with a data definition statement.
None SMALLINTNOT NULL
---,--9 (explicit)
RequestText None VARCHAR(12500)UNICODENOT CASESPECIFIC
X(255)
CreateText None VARCHAR(13000)UNICODENOT CASESPECIFIC
X(255)
CommentString None VARCHAR(255)UNICODENOT CASESPECIFIC
X(255)
CreatorName Dbase.DatabaseName VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
TVMName (NUSI) None VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
JournalFlag None CHAR(2)LATINNOT CASESPECIFICNOT NULL
X(2)
JournalId None BYTE(6) X(12)
UtilVersion
Returns the utility version count. This column is modified to match the Version column when a significant change of the table definition occurs that would prohibit an incremental restore or copy of selected partitions from an archive.
None SMALLINT ---,--9 (explicit)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
530 Data Dictionary
AccLogRules None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
ColumnAccRules None SMALLINTNOT NULL
---,--9 (explicit)
CheckOpt None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
ParentCount None SMALLINTNOT NULL
---,--9 (explicit)
ChildCount
Stores the number of result sets for stored procedures and external stored procedures.
None SMALLINTNOT NULL
---,--9 (explicit)
NamedTblCheckCount None SMALLINTNOT NULL
---,--9 (explicit)
UnnamedTblCheckExist None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
PrimaryKeyIndexId None SMALLINT ---,--9 (explicit)
CreateUID Dbase.DatabaseId BYTE(4) X(8)
CreateTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
LastAlterUID Dbase.DatabaseId BYTE(4) X(8)
LastAlterTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
TriggerCount None SMALLINTNOT NULL
---,--9 (explicit)
CommitOpt None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
TransLog None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 531
LastAccessTimeStamp None TIMESTAMP(0) YYYY-MM-DDBHH:MI:SS
AccessCount None INTEGER --,---,---,--9 (explicit)
SPObjectCodeRows
Returns a 10-digit integer. Each digit of the integer represents one specific stored procedure attribute as follows (digits counted from left):
• First = Warning option
• Second and third = Used for version number
• Fourth and fifth = Unused
• Sixth = Session mode (BTET/ANSI)
• Seventh = Print mode and SPL text option
• Eighth = Platform
• Ninth = Contains hardware architecture information
• Tenth = Unused
None INTEGERNOT NULL
--,---,---,--9 (explicit)
RSGroupID None INTEGER --,---,---,--9 (explicit)
TblRole
These are the possible values:
• C = if a capture option is active
• A = if an apply operation is active
• NULL
None CHAR(1)LATINUPPERCASENOT CASESPECIFIC
X(1)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
532 Data Dictionary
TblStatus
These are the possible values:
• C = connected
• D = defined
• F = failed
• S = suspended
• T = terminated
• I = Initiated
• NULL
None CHAR(1)LATINUPPERCASENOT CASESPECIFIC
X(1)
RequestTxtOverflow None CHAR(1)LATINUPPERCASENOT CASESPECIFIC
X(1)
CreateTxtOverflow None CHAR(1)LATINUPPERCASENOT CASESPECIFIC
X(1)
QueueFlag
These are the values:
• Y = Yes (queuing option is set)
• N = No (queuing option is not set)
None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
XSPExternalName None CHAR(30)LATINCASESPECIFIC
X(30)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 533
XSPOptions
This field is composed of 3 different XSP options, with each character presenting one option:
1 1st character - represents the programming language used in the XSP source file. These are the values:
C = C programming language
J = Java
P = C ++ programming language
2 2nd character - represents the No SQL Data Access Flag. These are the values for the flags:
Y = No SQL in XSP
C = Contains SQL
R = Reads SQL Data
M = Modifies SQL Data
3 3rd character - represents the parameter passing convention for XSP. These are the values:
S = SQL parameter style
G = TD_General
J = JAVA parameter style
The default is S.
None CHAR(3)LATINUPPERCASENOT CASESPECIFIC
X(3)
XSPExtFileReference None VARCHAR(1000)UNICODECASESPECIFIC
X(255) (explicit)
ExecProtectionMode None CHAR(1)LATINUPPERCASENOT CASESPECIFIC
X(1)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
534 Data Dictionary
DBC.UDFInfo
The DBC.UDFInfo table contains all the function and method information.
CharacterType None SMALLINT ---,--9 (explicit)
Platform None CHAR(8)LATINUPPERCASENOT CASESPECIFIC
X(8)
AuthIdUsed None BYTE(6) X(8) (explicit)
AuthorizationType
These are the values:
• I = Invoker
• D = Definer
None CHAR(1)LATINUPPERCASENOT CASESPECIFIC
X(1)
AuthorizationSubType None CHAR(1)LATINUPPERCASENOT CASESPECIFIC
X(1)
OSDomainName None VARCHAR(256)LATINCASESPECIFIC
X(256)
OSUserName None VARCHAR(256)LATINCASESPECIFIC
X(256)
SecInfo
Stores the encrypted password for an authorization object.
None VARBYTE(256) X(512)
AuthName
Stores the authorization name specified in the external security clause of the user-defined function or external stored procedure.
None VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFIC
X(128)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
DatabaseId (NUPI) Dbase.DatabaseIdTVM.DatabaseId
BYTE(4)NOT NULL
X(8)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 535
FunctionName (NUPI) None VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFICNOT NULL
X(128)
FunctionId (USI) TVM.TVMId BYTE(6)NOT NULL
X(12)
NumParameters None SMALLINTNOT NULL
---,--9 (explicit)
ParameterDataTypes None VARCHAR(256)LATINUPPERCASENOT CASESPECIFIC
X(255) (explicit)
FunctionType
• R = table function
• F = scalar function
• A = aggregate function
• S = statistical function
• B = combined aggregate and statistical function
• H = user-defined method
TVM.TableKind CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
ExternalName None CHAR(30)LATINCASESPECIFICNOT NULL
X(128)
SrcFileLanguage None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
NoSQLDataAccess None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
ParameterStyle None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
536 Data Dictionary
DeterministicOpt None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
NullCall None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
PrepareCount None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
ExecProtectionMode None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
ExtFileReference None VARCHAR(1000)UNICODECASESPECIFIC
X(255) (explicit)
CharacterType None SMALLINTNOT NULL
---,--9 (explicit)
Platform None CHAR(8)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(8)
RoutineKind None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
ParameterUDTIds None VARBYTE(512) X(512) (explicit)
InterimFldSize None INTEGERNOT NULL
--,---,---,--9 (explicit)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 537
DBC.UnResolvedReferences
The DBC.UnResolvedReferences table contains information about all the unresolved referential constraints that currently exist in the system.
MaxOutParameters
Returns the maximum output parameters for a table function.
For FunctionType=’R,’ the column has values ranging from 0 to 2048.
• 0 = a table function with fixed output parameters.
• 1 to 2048 = a varying output column table function.
For all other FunctionType, the column returns a zero value.
None SMALLINTNOT NULL
---,--9 (explicit)
AppCategory
Returns the application category for an external routine. These are the values:
• S = standard XSP or UDF
• C = CLI
• O = ODBC
• J = Java
• N = .NET
None CHAR(1)LATINNOT CASESPECIFICNOT NULL
X(1)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
DatabaseID (NUPI) Dbase.DatabaseId BYTE(4)NOT NULL
X(8)
ParentTblName (NUPI) TVM.TVMNameI VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFICNOT NULL
X(128)
UserID Dbase.DatabaseId BYTE(4)NOT NULL
X(8)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
538 Data Dictionary
DBC.UDTCast
The DBC.UDTCast table contains information on the source and target data types that are involved in the casting operation.
ReferenceIdx None SMALLINTNOT NULL
---,--9 (explicit)
ChildTblID TVM.TVMId BYTE(6)NOT NULL
X(12)
ForeignKeyFID TVMFields.TVMId SMALLINTNOT NULL
---,--9 (explicit)
FKPosition None SMALLINTNOT NULL
---,--9 (explicit)
ParentKeyName None VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFIC
X(128)
ReferenceIdxName None VARCHAR(128)UNICODENOT CASESPECIFIC
X(128)
Columns Referenced Column(s) Data Type Format
Columns Referenced Column(s) Data Type Format
PrimaryUDTypeId (NUPI, USI)
Returns the identifier of the primary UDT, either source or target data type.
None BYTE(6)NOT NULL
X(12)
IsSourcePrimary (NUPI, USI)
An indication of whether the source data type is a UDT. The possible values are:
• Y = the source data type is primary UDT
• N = the target data type is primary UDT
None CHAR(2)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(2)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 539
PDTFamily (NUPI)
The pre-defined data type is assigned to a particular family based on its properties. The possible values are:
• CS = character string
• BS = byte string
• NM = numeric
• YI = year-month interval type
• DI = day-time interval type
• DT = DATE
• TM = TIME
• TS = TIMESTAMP
• UT = is used when both source and target data types are UDTs
None CHAR(2)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(2)
SecondaryUDTypeId (USI)
Returns the identifier of the secondary UDT (target), valid in the case where both source and target data type are UDT. (i.e., TVMId in DBC.TVM); otherwise, it is set to '000000000000'XB.
None BYTE(6)NOT NULL
X(12)
PDTCode
Returns a two-character code representing the pre-defined data type. The two-character codes are the same ones used in the FieldType column of the DBC.TVFields table.
None CHAR(2)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(2)
PDTMaxLength
Returns a property associated with the pre-defined data type. Patterned after a column within DBC.TVFields.
None INTEGER --,---,---,--9 (explicit)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
540 Data Dictionary
PDTTotalDigits
Returns a property associated with the pre-defined data type. Patterned after a column within DBC.TVFields.
None SMALLINT ---,--9 (explicit)
PDTImpliedPoint
Returns a property associated with the pre-defined data type. Patterned after a column within DBC.TVFields.
None SMALLINT ---,--9 (explicit)
PDTCharType
Returns a property associated with the pre-defined data type. Patterned after a column within DBC.TVFields.
None SMALLINT ---,--9 (explicit)
ImplicitAssignment
An indication of whether the cast routine may be called implicitly on assignment. The possible values are:
• Y = Implicit assignment
• N = No implicit assignment
None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
CastRoutineId
Returns the identifier of the cast routine (i.e., TVMId in DBC.TVM). A "Fast Path" cast routine may be specified by setting this field to '000000000000'XB. "Fast Path" refers to a procedure in which one of the DBS integration methods is called directly.
None BYTE(6)NOT NULL
X(12)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 541
DBC.UDTInfo
The DBC.UDTInfo table captures the specifics contained within the CREATE TYPE statement.
Columns Referenced Column(s) Data Type Format
TypeId (UPI)
Returns the identifier of the UDT (i.e., TVMId in DBC.TVM).
None BYTE(6)NOT NULL
X(12)
DatabaseId
Returns the identifier of the database in which the UDT is defined.
None BYTE(4)NOT NULL
X(8)
TypeName
Returns the type designator. The name corresponds to the column TVMName in the DBC.TVM table.
None VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFICNOT NULL
X(128)
TypeKind
Returns the classification of the UDT. The possible values are:
• S = Structure
• D = Distinct
• I = Internal
None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
INSTANTIABLE
An indication of whether the UDT is instantiable. The possible values are:
• Y = Instantiable
• N = Not instantiable
None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
FINAL
An indication of whether the UDT is final. The possible values are:
• Y = Final
• N = Not final
None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
542 Data Dictionary
Encryption
An indication of whether encryption is supported for this UDT. The possible values are:
• Y = Encryption
• N = No encryption
None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
Compression
An indication of whether compression is supported for this UDT. The possible values are:
• Y = Compression
• N = No compression
None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
OperatorAll
An indication of whether operators specific to pre-defined data types are supported for a distinct type's base data type. The possible values are:
• Y = All operators are supported
• N = None are supported
None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
DefaultTransformGroup
Returns the name of the Transform group that is selected automatically for importing or exporting and is used in the absence of a specific choice made by the user. The transform group is responsible for transferring UDT data from the SQL-environment to host languages or vice-versa.
None VARCHAR(128)UNICODEUPPERCASENOT CASESPECIFIC
X(128)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
Data Dictionary 543
OrderingForm
An indication of the level of comparison and sorting for the UDT. The possible values are:
• N = None
• F = Full
• E = Equals only
None CHAR(1)LATINUPPERCASENOT CASESPECIFICNOT NULL
X(1)
OrderingCategory
An indication of the manner of comparison. The possible values are:
• R = Relative
• M = Map
None CHAR(1)LATINUPPERCASENOT CASESPECIFIC
X(1)
OrderingRoutineId
Specifies the identifier of the user-defined ordering routine. A "Fast Path" ordering routine may be specified by setting this field to '000000000000'XB. "Fast Path" refers to a procedure in which one of the DBS integration methods is called directly.
None BYTE(6) X(12)
CastCount
Returns the number of user-defined casts involving this UDT.
None BYTEINTNOT NULL
--9 (explicit)
ExtFileReference
Returns an encoded string that contains the external name or path of each file component that together provide core DBS integration methods for the UDT. This column is used exclusively for internal types. The encoding of this string is in the same format as the ExtFileReference column of DBC.UDFInfo.
None VARCHAR(1000)UNICODECASESPECIFIC
X(255) (explicit)
Columns Referenced Column(s) Data Type Format
Chapter 4: System TablesData Dictionary Fallback and Non-Fallback Tables
544 Data Dictionary
DBC.UDTTransform
The DBC.UDTTransform table contains the transform group name and the routine identifiers.
Columns Referenced Column(s) Data Type Format
UDTypeId (UPI)
Returns the identifier (TVMId) that is tied to this Transform Group.
None BYTE(6)NOT NULL
X(12)
GroupName (UPI)
Returns the group name associated with this collection of UDT Transform routines.
None VARCHAR(128)UNICODENOT CASESPECIFICNOT NULL
X(128)
ToSQLRoutineId
Returns the identifier of the routine that performs the 'To SQL" Transform for importing data. This column is NULL if a "TOSQL" routine was not specified.
None BYTE(6) X(12)
FromSQLRoutineId
Returns the identifier of the routine that performs the "From SQL" Transform for exporting data. This column is NULL if a "FROMSQL" routine was not specified.
None BYTE(6) X(12)
Data Dictionary 545
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.
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.
TwoPCRule Macro
This macro 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.
Macro(s) PurposeFor more information, see the publication entitled ...
SystemFE Track system health SystemFE Macros
AccLogRule Enables access logging • Database Administration
• Security Administration
Query Capture Mostly used with VEComp application
Database Design
ECompare Mostly used with VEComp application
Database Design
Chapter 5: MacrosResUsage Macros
546 Data Dictionary
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.
ResUsage Macros
Like other Teradata Database macros, ResUsage macros consist of one or more Teradata Structured Query Language (SQL) statements stored in the Teradata Database 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:
Chapter 5: MacrosDIPVIEW Macros
Data Dictionary 547
For More Information
For information on using these macros, see Resource Usage Macros and Tables.
DIPVIEW Macros
The DIPVIEW script contains several macros, including the following.
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
Macro Name Function
ARC_NonEmpty_List[M] 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.
ClearAllDatabaseUseCount
Clears the AccessCount and LastAccessTimeStamp information for all of the objects in the system.
ClearDatabaseUseCount Clears the AccessCount and LastAccessTimeStamp information for all of the objects in the given database.
ClearPeakDisk Resets the PEAKPERM, PEAKSPOOL, and PEAKTEMP columns for the DISKSPACE information.
ClearTVMUseCount Clears the AccessCount and LastAccessTimeStamp information for all of the objects associated with the given table, view, trigger, stored procedure, join index, macro, user-defined type, user-defined method, or user-defined function.
CollAddStandard Defines the standard collation sequences supplied with the Teradata Database and places them into the DBC.CollationTbl.
CollInstallMulti Allows database administration to install an Teradata-supplied standard collation (Swedish, Norwegian, or Japanese) or a user-defined collation from the DBC.CollationTbl as the definition for Multinational collation.
Chapter 5: MacrosARC_NonEmpty_List[M] Macro
548 Data Dictionary
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[M] Macro
This macro returns the names of the databases or users, owned by the indicated database, that contain the specified objects.
This macro uses the following parameters.
CopyCostProfile Copies an existing cost profile to a new one which can subsequently be modified using DBC.InsertConstantValue.
CreateNewCostProfile Creates an empty new cost profile of a given type.
DBQLAccessMacro Allows database administrator to grant privileges to the BEGIN QUERY LOGGING and END QUERY LOGGING statements.
DeleteConstantValue Deletes a constant value from an existing cost profile.
DeleteCostProfile Deletes all constant values for an existing cost profile and then deletes the cost profile.
DIPMarkNSIO Acts as a release marker to indicate a valid dictionary.
ListCostProfiles Lists all cost profiles.
ListCostProfiles1 Lists cost profiles that match the parameters given.
ListCostProfiles2 Lists cost profiles that match the parameters given.
InsertConstantString Inserts a constant string to an existing cost profile.
InsertConstantValue Inserts a constant value to an existing cost profile.
LogonRule Allows database administrator to determine who has execute privileges for the GRANT/REVOKE LOGON statements.
MergeCostProfile Merges the constant values specified in the existing ‘source’ cost profile with those in the existing ‘target’ cost profile.
ShowCostProfile Lists the SQL statements needed to reproduce the named cost profile.
ShowCostProfileAs Lists the SQL statements needed to produce a new cost profile based on an existing cost profile.
Macro Name Function
Chapter 5: MacrosARC_NonEmpty_List[M] Macro
Data Dictionary 549
Usage Notes
The macro can return database names for which the executing user does not have access rights.
Example 1
To run the ARC_NonEmpty_List macro, issue this command:
exec arc_nonempty_list ('newemp2','tjivm');
Parameter Description
ParentDb Indicates the name of the database containing the objects returned by this macro.
Data type is CHAR.
Format is ’X(30)’.
TKinds Indicates the type of tables returned.
Data type is VARCHAR.
Format is ’X(100)’.
The possible values include the following:
Value Meaning
T Table
V View
M Macro
J Journal
I Join Index
P Stored Procedure
G Trigger
F Scalar UDF
A Aggregate UDF
N Hash Index
R Table Function
E External Stored Procedure
X Authorization
U User-defined type
H User-defined method
Chapter 5: MacrosClearAccounting Macro
550 Data Dictionary
*** Query completed. One row found. One column returned. *** Total elapsed time was 1 second. Translate(DatabaseNameI using UNICODE_TO_LOCALE)------------------------------------------------NEWEMP2
Example 2
To run the ARC_NonEmpty_ListM macro, issue this command:
exec arc_nonempty_listm ('newemp2','tjivm'); *** Query completed. One row found. One column returned. *** Total elapsed time was 1 second. DatabaseNameI--------------------------------------------------------------------NEWEMP2
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.
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.
Example
To run the ClearAccounting macro, issue the following:
EXEC DBC.ClearAccounting;
*** Update completed. 10 rows changed.*** Total elapsed time was 1 second.
ClearAllDatabaseUseCount
This macro clears the AccessCount and LastAccessTimeStamp information for all of the objects in the system.
Chapter 5: MacrosClearDatabaseUseCount
Data Dictionary 551
Usage Notes
A user must be granted the appropriate access rights in order to execute this macro.
Example
To run the ClearAllDatabaseUseCount macro, issue the following:
EXEC DBC.ClearAllDatabaseUseCount;
*** Update completed. 13 rows changed.*** Total elapsed time was 1 second.*** Update completed. 242 rows changed.*** Update completed. 2068 rows changed.*** Update complete. 220 rows changed.
ClearDatabaseUseCount
This macro clears the AccessCount and LastAccessTimeStamp information for all of the objects in the given database.
Usage Notes
A user must be granted the appropriate access rights in order to execute this macro.
Example
To run the ClearDatabaseUseCount macro, issue the following:
EXEC DBC.ClearDatabaseUseCount(‘db2’);
*** Update completed. one row changed.*** Total elapsed time was 2 seconds.*** Update completed. 2 rows changed.*** Update completed. 2 rows changed.*** Update completed. 2 rows changed.
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
Chapter 5: MacrosClearTVMUseCount
552 Data Dictionary
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;
ClearTVMUseCount
This macro clears the AccessCount and LastAccessTimeStamp information for all of the objects associated with the given table, view, trigger, stored procedure, join index, macro, user-defined type, user-defined method, or user-defined function.
Usage Notes
A user must be granted the appropriate access rights in order to execute this macro.
Example
To run the ClearTVMUseCount macro, issue the following:
EXEC DBC.ClearTVMUseCount (‘db1’, ‘tab1’);
*** Update completed. One row changed.*** Total elapsed time was 1 second.*** Update completed. 2 rows changed.*** Update completed. 2 rows changed
CollAddStandard Macro
This macro defines the standard collation sequences supplied with the Teradata Database and places them into the DBC. CollationTbl.
Usage Notes
If the existing standard collations in the DBC.CollationTbl have been corrupted or removed, this macro replaces them. Also, when we provide additional standard collations, you can add them using this macro.
For information on collation sequences, see International Character Set Support.
Example
The following macro places the supplied collations into DBC.CollationTbl:
EXEC DBC.CollAddStandard();
Chapter 5: MacrosCollInstallMulti Macro
Data Dictionary 553
CollInstallMulti Macro
This macro installs an Teradata-supplied standard collation or a user-defined collation from the DBC.CollationTbl as the definition for Multinational collation.
This macro uses 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 Database restart.
For information on collation sequences, see International Character Set Support.
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’);
CopyCostProfile Macro
The CopyCostProfile macro copies an existing cost profile to a new one which can subsequently be modified using DBC.InsertConstantValue. It uses the following parameters.
Parameter Description
CollationName The CollationName parameter identifies the collation defined in the DBC.CollationTbl.
Data type is CHAR.
FORMAT is ‘X(30)’.
Chapter 5: MacrosCreateNewCostProfile Macro
554 Data Dictionary
Usage Notes
The new cost profile is first created with the same cost profile type as the SourceProfile. The new cost profile must not already exist. The ConstantValues entries associated with the Source Profile are duplicated and assigned to the new cost profile.
To copy cost constants to an existing cost profile, use the DBC.MergeCostProfile macro instead.
Example
EXEC DBC.CopyCostProfile ('V2R5Copy','Description', 'V2R5');
CreateNewCostProfile Macro
The CreateNewCostProfile macro creates a new empty variable cost profile of a given type. It uses the following parameters.
Parameter Description
ProfileName Specifies the name of the new profile.
Data type is CHAR.
FORMAT is ‘X(30)’.
Note: The new cost profile (ProfileName) is a variable cost profile.
ProfileDesc Describes the new profile.
Data type is VARCHAR.
FORMAT is ‘X(2048)’.
SourceProfileName Specifies the name of the source profile.
Data type is CHAR.
FORMAT is ‘X(30)’.
Parameter Description
ProfileName Specifies the name of the new profile.
Data type is CHAR.
FORMAT is ‘X(30)’.
ProfileDesc Describes the new profile.
Data type is VARCHAR.
FORMAT is ‘X(2048)’.
Chapter 5: MacrosDBQLAccessMacro Macro
Data Dictionary 555
Usage Notes
To complete the definition of the cost profile, specify the constant values that make up the cost profile by using the DBC.InsertConstantValue macro.
Alternatively, the new cost profile may get its definitions from another cost profile using the DBC.MergeCostProfile macro.
Example
EXEC DBC.CreateNewCostProfile ('My Profile 10', 'My special profile for test runs', 'Legacy');
DBQLAccessMacro Macro
This macro allows database administrators to grant privileges to users who wish to do query logging with the BEGIN QUERY LOGGING and END QUERY LOGGING statements.
Usage Notes
None.
Example
None.
DeleteConstantValue Macro
The DeleteConstantValue macro removes the constant value or constant string (if there is one) from an existing cost profile. You can use this macro only with variable cost profiles. It uses the following parameters.
ProfileTypeName Defines the profile type name for the profile type ID.
Data type is CHAR.
FORMAT is ‘X(30)’.
Parameter Description
Parameter Description
ProfileName Specifies the name of the new profile.
Data type is CHAR.
FORMAT is ‘X(30)’.
Chapter 5: MacrosDeleteCostProfile Macro
556 Data Dictionary
Usage Notes
The ConstantName is matched using the SQL ‘LIKE’ format, so you may use wildcards. For example ''%Row%'' matches those constants with ''Row'' in their name. Also, ''%'' matches all.
Example
EXEC DBC.DeleteConstantValue ('New Profile 1', 'OPTROWACCESSINST');
DeleteCostProfile Macro
The DeleteCostProfile macro deletes all constant values for an existing cost profile and then the cost profile itself. You can use this macro only with variable cost profiles. It uses the following parameter.
Usage Notes
None.
Example
EXEC DBC.DeleteCostProfile ('Profile 1');
DIPMarkNSIO Macro
The DIPMarkNSIO macro is an empty macro in database DBC which acts as a release marker to indicate a valid dictionary. This macro does not have any parameters.
The Teradata Database uses the presence or absence of this macro to determine whether a conversion originates from a DBC/1012 to the Teradata Database.
ConstantName Specifies the constant name or the wildcard name in the SQL ‘LIKE’ format.
Data type is VARCHAR.
FORMAT is ‘X(64)’.
Parameter Description
Parameter Description
ProfileName Specifies the name of the new profile.
Data type is CHAR.
FORMAT is ‘X(30)’.
Chapter 5: MacrosInsertConstantString Macro
Data Dictionary 557
Usage Notes
When you restore database DBC from a DBC/1012 to the Teradata Database, the DIPMarkNSIO 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.
InsertConstantString Macro
Note: The InsertConstantString macro is for internal use only
The InsertConstantString macro inserts a constant string to an existing cost profile. It uses the following parameters.
Usage Notes
If the constant already has a value, that value is replaced.
Example
EXEC DBC.InsertConstantString ('New Profile 1', 'OPTROWACCESSINST', ‘String_Constant’);
InsertConstantValue Macro
The InsertConstantValue macro inserts a constant value to an existing cost profile. It uses the following parameters.
Parameter Description
ProfileName Specifies the name of the new profile.
Data type is CHAR.
FORMAT is ‘X(30)’.
ConstantName Specifies the constant name or the wildcard name in the SQL ‘LIKE’ format.
Data type is CHAR.
FORMAT is ‘X(64)’.
Note: You must add ConstantName previously using InsertConstantValue.
ConstString Specifies the constant string.
Data type is VARCHAR.
FORMAT is ‘X(2048)’.
Chapter 5: MacrosListCostProfiles Macro
558 Data Dictionary
Usage Notes
If the constant already has a value, that value is replaced.
Example
EXEC DBC.InsertConstantValue ('New Profile 1', 'OPTROWACCESSINST', 1300);
ListCostProfiles Macro
The ListCostProfiles macro lists all cost profiles.
Usage Notes
Example
EXEC DBC.ListCostProfiles;
ListCostProfiles1 Macro
The ListCostProfiles1 macro lists the cost profiles that match the parameters given. It uses the following parameters.
Parameter Description
ProfileName Specifies the name of the new profile.
Data type is CHAR.
FORMAT is ‘X(30)’.
ConstantName Specifies the constant name or the wildcard name in the SQL ‘LIKE’ format.
Data type is CHAR.
FORMAT is ‘X(64)’.
ConstVal Specifies the constant value.
Data type is FLOAT.
If … THEN use the following macro …
you want to list a subset of all the profiles
DBC.ListCostProfiles1
the profile description is needed DBC.ListCostProfiles2
Chapter 5: MacrosListCostProfiles2 Macro
Data Dictionary 559
Note: ProfileName is matched using SQL ‘LIKE,’ so you may use wildcards. For example ''%V2R5%'' matches those profiles with ''V2R5'' in their name. Also, ''%'' matches all.'
Usage Notes
Example
EXEC DBC.ListCostProfiles1(,,,);
ListCostProfiles2 Macro
The ListCostProfiles2 macro lists the cost profiles that match the parameters given. It uses the following parameters.
Parameter Description
ProfileName Specifies the name of the profile or the wildcard name in the SQL ‘LIKE’ format.
Data type is CHAR.
FORMAT is ‘X(30)’.
ProfileCat Specifies the constant name or the wildcard name in the SQL ‘LIKE’ format.
Data type is VARCHAR.
FORMAT is ‘X(1)’.
ProfileType Specifies the profile type name or the wildcard name in the SQL ‘LIKE’ format.
Data type is CHAR.
FORMAT is ‘X(30)’.
Description Specifies the description of the profile or the wildcard name in the SQL ‘LIKE’ format.
Data type is VARCHAR.
FORMAT is ‘X(2048)’.
If … THEN use the following …
you want to list all the cost profiles.
DBC.ListCostProfiles
the profile description is needed DBC.ListCostProfiles2
Chapter 5: MacrosLogonRule Macro
560 Data Dictionary
Note: ProfileName is matched using SQL ‘LIKE,’ so you may use wildcards. For example ''%V2R5%'' matches those profiles with ''V2R5'' in their name. Also, ''%'' matches all.'
Usage Notes
Example
EXEC DBC.ListCostProfiles2('V2R5',,,);
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.
Parameter Description
ProfileName Specifies the name of the profile or the wildcard name in the SQL ‘LIKE’ format.
Data type is CHAR.
FORMAT is ‘X(30)’.
ProfileCat Specifies the constant name or the wildcard name in the SQL ‘LIKE’ format.
Data type is VARCHAR.
FORMAT is ‘X(1)’.
ProfileType Specifies the profile type name or the wildcard name in the SQL ‘LIKE’ format.
Data type is CHAR.
FORMAT is ‘X(30)’.
Description Specifies the description of the new profile or the wildcard name in the SQL ‘LIKE’ format.
Data type is VARCHAR.
FORMAT is ‘X(2048)’.
If … THEN use the following macro …
the profile description is not needed
DBC.ListCostProfiles for columnar form
you want to list all the cost profiles
DBC.ListCostProfiles
Chapter 5: MacrosMergeCostProfile Macro
Data Dictionary 561
For complete information on using this macro, see Security Administration.
MergeCostProfile Macro
The MergeCostProfile macro merges the constant values specified in the existing source cost profile with those in the existing target cost profile. It uses the following parameters.
Usage Notes
If the constant value exists in the target, that value is replaced; otherwise, it is added. Other constants existing in the target profile are not changed nor deleted.
The TargetProfile must be the same cost profile type as the SourceProfile.
Example
EXEC DBC.MergeCostProfile ('MyTest', 'V2R5');
ShowCostProfile Macro
The ShowCostProfile macro lists the SQL statements needed to reproduce the particular cost profile. It uses the following parameter.
Usage Notes
None.
Parameter Description
TargetProfileName Specifies the name of the existing target profile.
Data type is CHAR.
FORMAT is ‘X(30)’.
SourceProfileName Specifies the name of the source profile.
Data type is CHAR.
FORMAT is ‘X(30)’.
Parameter Description
ProfileName Specifies the name of the profile.
Data type is CHAR.
FORMAT is ‘X(30)’.
Chapter 5: MacrosShowCostProfileAs Macro
562 Data Dictionary
Example
EXEC DBC.ShowCostProfile('V2R5');
ShowCostProfileAs Macro
The ShowCostProfileAs macro lists the SQL statements needed to produce a new cost profile based on an existing one. It uses the following parameters.
Usage Notes
None.
Example
EXEC DBC.ShowCostProfileAs('V2R5');
For More Information
Many additional macros exist for determining system efficiency. These resource usage macros are described in Resource Usage Macros and Tables.
Parameter Description
ProfileName Specifies the name of the source profile.
Data type is CHAR.
FORMAT is ‘X(30)’.
NewProfileName Specifies the name of the output profile.
Data type is CHAR.
FORMAT is ‘X(30)’.
Description Specifies the description for the output profile.
Data type is VARCHAR.
FORMAT is ‘X(2048)’.
Data Dictionary 563
Glossary
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
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 Database system tables
DBQL Database Query Logging
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
Glossary
564 Data Dictionary
JI Join Index
KB Kilobytes
LAN Local Area Network
LDAP Lightweight Directory Access Protocol
LFI Data Load End Loading
MRM Merge Row Multiple
MVS Multiple Virtual Storage
NPPI Non-partitioned Primary Index
NUPI Non-unique Primary Index
NUSI Non-unique Secondary Index
ODBC Open Database Connectivity
OLCP Online Complex 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
PPI Partitioned Primary Index
RCC Recovery Control Catalog
ResUsage Resource Usage
RI Referential Integrity
SLG Service Level Goals
SQL Structured Query Language
SW Software
TDN Teradata Network
TDP Teradata Director Program
Glossary
Data Dictionary 565
TDQM Teradata Dynamic Query Manager
TDWM Teradata Dynamic Workload Manager
TP Transaction Processor
TSET Teradata System Emulation Tool
TSO Time Sharing Option (IBM)
UDF User-Defined Function
UDM User-Defined Method
UDT User-Defined Type
UPI Unique Primary Index
USI Unique Secondary Index
VM Virtual Machine
VMS Virtual Memory System
WD Workload Definition
WDID Workload Definition ID
XSP External Stored Procedure
Data Dictionary 567
Index
AAbortCount column 93, 517AbortFlag column 93, 466AbortMBox column 505AccessCount column 94, 438, 442, 452, 458, 480, 483, 498,
499, 512, 520, 525, 531Accesskind column 444AccessLog view 57, 292AccessRight column 95, 438AccessRights table 437AccessType column 96, 444AccLogResult column 97, 443AccLogRules column 457, 530AccLogRules view 58, 59, 294AccLogRuleTbl table 438AccLogTbl table 443AccLogUsrRules column 457Account String Expansion 43AccountDbId column 518AccountInfo view 59, 297AccountName column 97, 443, 445, 456, 476, 505Accounts table 445AccountString column 98, 468Acctg system table 42Acctg table 436, 445AcctString column 98, 464, 472, 515AcctStringDate column 98, 464AcctStringHour column 98, 464AcctStringTime column 99, 464AcrAlterExtProcedure column 99, 442AcrAlterFunction column 99AcrAlterProcedure column 100, 441AcrCheckPoint column 100, 438AcrCreateDatabase column 100, 438AcrCreateFunction column 101AcrCreateMacro column 101, 439AcrCreateProcedure column 101, 440AcrCreateProfile column 102, 441AcrCreateRole column 102, 441AcrCreateTable column 102, 439AcrCreateTrigger column 103, 440AcrCreateUser column 103, 439AcrCreateView column 103, 439AcrCreAuthorization column 104, 442AcrCreExtProcedure column 104, 442AcrDelete column 104, 439
AcrDropAuthorization column 105, 442AcrDropDatabase column 105AcrDropFunction column 105AcrDropMacro column 106, 439AcrDropProcedure column 106, 441AcrDropProfile column 106, 441AcrDropRole column 107, 441AcrDropTable column 107, 439AcrDropTrigger column 107, 440AcrDropUser column 108, 439AcrDropView column 108, 439AcrDump column 108, 439AcrExecute column 109, 440AcrExecuteFunction column 109, 441AcrExecuteProcedure column 109, 441AcrGrant column 110, 440AcrIndex column 110, 440AcrInsert column 110, 440AcrReference column 111, 440AcrRepControl column 111, 442AcrRestore column 111, 440AcrSelect column 112, 440AcrUDTMethod column 112, 442AcrUDTType column 112, 442AcrUDTUsage column 112, 442AcrUpdate column 113, 440ActionTime column 113, 520ActiveCount column 113, 516Activity column 114, 513ActivityID column 114ActivityId column 514ActivityName column 114, 514ActualDeleteSecs column 494, 497ActualRedistSecs column 494, 497AddAmpCount column 493ALL table 435All_RI_Children view 61, 308All_RI_Parents view 61, 310AllAMPsFlag column 115, 491AllnessFlag column 115, 438AllRights view 59, 299AllRoleRights view 60, 302AllSpace view 60, 304AllTempTables view 60, 306AlterCount column 450AMPCPUTime column 116, 465, 472AMPCPUTimeNorm column 116, 467, 473
Index
568 Data Dictionary
AMPUsage view 61, 312AppCat1Revision column 458AppCat2Revision column 459AppCat3Revision column 459AppCat4Revision column 459AppCategory column 117, 537AppID column 117, 465, 472AppIDSource column 507ARC_NonEmpty macro 548ARC_NonEmpty_List macro 548, 550ARC_NonEmpty_ListM macro 550ArcAlterFunction column 441ArcCreateFunction column 441ArcDropFunction column 441ArchiveLoggingObjsTbl table 446ArchiveLoggingObjsV view 62, 313Arrivals column 117, 516Association view 62, 314AuditTrailId column 118, 506AuthIdUsed column 118, 534AuthMethod column 507AuthName column 534AuthorizationId column 118AuthorizationName column 118Authorizations view 62, 316AuthorizationSubType column 119, 534AuthorizationType column 119, 534AuthUser column 507AvailValue column 478AverageAmpCPU column 119AverageIO column 120AverageParserCPU column 120AverageTime column 120AvgCPUTime column 120, 517AvgDelayTime column 121, 517AvgNCorr column 449AvgRespTime column 121, 516
BB_DatabaseName column 122B_TableName column 122BaseDbId column 517, 518BaseDID column 476BaseTableId column 517, 518BaseTblDbName column 121BaseTblId column 501BaseTblName column 121BaseTID column 475BatchNum column 499BeginTimeStamp column 492, 495BeginTimeStamp1 column 493BeginTimeStamp2 column 493BeginTimeStamp3 column 493
BeginTimeStamp4 column 493BeginTimeStamp5 column 493BeginTimeStamp6 column 493BeginTimeStamp7 column 493BeginTimeStamp8 column 493BeginTimeStamp9 column 493Blob column 477BTEQ script 42BufferTS column 513, 514, 515, 516
CCacheFlag column 122, 466Calendar view 45CastCount column 543CastRoutineId column 540Category column 123, 508CD-ROM images 8ChangedRowJournal table 436CharacterType column 123, 534, 536CharSetId column 123CharSetName column 124CharSets view 62, 318CharTranslations view 63, 319CharType column 124, 526CheckCount column 525CheckName column 124CheckOpt column 530CheckPointName column 124, 491CheckTableOption column 495Child column 125ChildCount column 125, 530ChildDb column 125ChildDbId column 126, 486ChildKeyColumn column 126ChildKeyFID column 126Children view 63, 321ChildTable column 127ChildTblDateFID column 486ChildTblID column 486, 538ChildTID column 127CkptFlushCount column 497ClassificationTime column 127, 515ClearAccounting macro 550ClearAllDatabaseUseCount macro 550ClearDatabaseUseCount macro 551ClearPeakDisk macro 551ClearTVMUseCount macro 552ClientAddr column 127, 465, 472ClientAddrSource column 507ClientID column 128, 465, 472ClientIDSource column 508ClientLogonDiagnostics column 507ColCheck column 128
Index
Data Dictionary 569
CollAddStandard macro 552CollationFlag column 525CollationName column 128Collations view 63, 322CollationTbl table 447CollectTimestamp column 129, 462, 464, 469, 470, 472CollEqvClass column 129, 447CollInstall column 129, 447CollInstallMulti macro 553CollName column 130, 447, 513CollOrderCS column 130, 447CollOrderUC column 130, 447ColumnAccRules column 530ColumnCheck column 525ColumnConstraint column 130ColumnCorrelation table 448ColumnFormat column 131ColumnId column 131, 438, 444ColumnLength column 131ColumnName column 132, 444ColumnPosition column 133Columns view 63, 324ColumnsStatistics column 133ColumnStats view 64, 326ColumnTitle column 133ColumnType column 134ColumnUDTName column 134COMMENT statement 32CommentString column 135, 447, 449, 456, 488, 501, 502,
520, 525, 529CommitOpt column 135, 530CommitOrRollback column 135, 481CommitSeqNumber column 499CompletionDate column 136, 481Completions column 136, 516CompletionStatus column 499CompletionTime column 136, 481Compressible column 136, 525Compression column 542CompressValue column 137, 525CompressValueList column 137, 525ConfigId column 137, 514ConnectFunction column 505ConstantDefs table 450ConstantValues table 451ConstCat column 137, 450ConstDesc column 138, 451ConstId column 138, 450, 451ConstName column 138, 450ConstraintCollation column 139, 513ConstraintCount column 139ConstraintName column 139ConstraintNames table 451ConstraintText column 140
ConstraintType column 140, 452, 512ConstString column 451ConstVal column 138, 450, 451ContMBox column 505CoordTaskId column 141, 481CopyCostProfile macro 553CorrelationEnabled column 449CorrelationLowerBound column 486CorrelationName column 448CorrelationTightness column 486CorrelationUpperBound column 486CostProfiles table 453CostProfiles_v view 64, 328CostProfileTypes table 453CostProfileTypes_v view 65, 330CostProfileValues_v view 65, 331CostProfName column 489CountNameString column 468CPU column 445CPUNorm column 446CPUTime column 141, 470CPUTimeNorm column 141, 471CreateDate column 142, 490CreateNewCostProfile macro 554CreateText column 520, 529CreateTime column 142, 490CreateTimeStamp column 143, 438, 442, 446, 449, 452, 458,
476, 480, 483, 488, 498, 499, 500, 502, 503, 512, 520, 525, 530
CreateTxtOverflow column 143, 520, 532CreateUID column 438, 442, 446, 449, 452, 458, 476, 483,
488, 498, 499, 502, 512, 520, 525, 530CreatorName column 144, 457, 529CSPSessionInfo view 65CurrByteCount column 493CurrentCollation column 146, 504CurrentDatabase column 505CurrentDateForm column 506CurrentPerm column 146CurrentPermSpace column 454CurrentRole column 146, 506CurrentSpool column 147CurrentSpoolSpace column 454CurrentTemp column 147CurrentTempSpace column 454CurrTabDeleteCount column 493CurrTabRedistCount column 493Cyc column 478
DData Dictionary
organization of 21updating 20
Index
570 Data Dictionary
users, types of 53Data Dictionary tables. See DBC tablesData Dictionary views
availability of 21database administrator 28definition of 21end user 28, 53how determined 21operations 28operations control 54privileges 22recovery control 28resource usage 40security administrator 54security logging 24, 25special users 24supervisory user 53system administrator 25, 53system field engineer 25table distribution 40
Data Dictionary views. See DBC viewsDatabase Administrator views 28Database_Default_Journals view 66, 336Database1Id column 474Database1Name column 474Database2Id column 474Database2Name column 474DatabaseId column 147, 437, 438, 446, 451, 454, 455, 460,
478, 480, 481, 483, 484, 504, 518, 519, 525, 526, 534, 537, 541
DatabaseName column 148, 444, 457, 490DatabaseNameI column 455Databases view 65, 333Databases2 view 66, 335DatabaseSpace table 436, 454DataSetName column 153, 491DateFld column 476Dbase table 455DBaseId column 512DBC tables
AccessRights 437AccLogRuleTbl 438AccLogTbl 443Accounts 445Acctg 445ArchiveLoggingObjsTbl 446CollationTbl 447ColumnCorrelation 448ConstantDefs 450ConstantValues 451ConstraintNames 451CostProfiles 453CostProfileTypes 453DataBaseSpace 454
Dbase 455DBCAssociation 459DBCInfoTbl 461DBQLExplainTbl 462DBQLObjTbl 462DBQLogTbl 464DBQLRuleCountTbl 468DBQLRuleTbl 468DBQLSqlTbl 469DBQLStepTbl 470DBQLSummaryTbl 472Dependency 473ErrorMsgs 475ErrorTbls 475EventLog 476Global 477Hosts 477IdCol 478Indexes 478InDoubtResLog 480JAR_JAR_Usage 482JARS 481LogonRuleTbl 483MDSRecoveryTbl 484Migration 484Next 484OldPasswords 485Owners 485ParentChildCorrelation 486Parents 486PasswordRestrictions 487Profiles 487RCConfiguration 489RCEvent 490RCMedia 492ReconfigInfo 492ReconfigOrder 494ReconfigTableStats 495ReferencedTbls 498ReferencingTbls 498RepBatchStatus 499Repgroup 500Repgrouptables 501RoleGrants 502Roles 502Routine_JAR_Usage 503SessionTbl 504SW_Event_Log 508SysSecDefaults 509SystemQTbl 511TableConstraints 512TDWMEventHistory 513TDWMEventlog 514TDWMExceptionLog 515
Index
Data Dictionary 571
TDWMSummaryLog 516TempStatistics 517TempTables 518TextTbl 518Translation 519TriggersTbl 519TSETQueryText 521TVFields 522TVM 526UDFInfo 534UDTCast 538UDTInfo 541UDTTransform 544UnResolvedReferences 537
DBC tables, columns of. See individual column namesDBC views
AccessLog 57, 292AccLogRules 58, 294AccountInfo 59, 297All_RI_Children 61, 308All_RI_Parents 61, 310AllRights 59, 299AllRoleRights 60, 302AllSpace 60, 304AllTempTables 60, 306AMPUsage 61, 312ArchiveLoggingObjsV 62, 313Association 62, 314Authorizations 62, 316CharSets 62, 318CharTranslations 63, 319Children 63, 321Collations 63, 322Columns 63, 324ColumnStats 64, 326CostProfiles_v 64, 328CostProfileTypes_v 65, 330CostProfileValues_v 65, 331CSPSessionInfo 65Database_Default_Journals 66, 336Databases 65, 333Databases2 66, 335DBCInfo 66, 337DBQLRules 67, 339DeleteAccessLog 67, 341DeleteOldInDoubt 67, 342DiskSpace 68, 343ErrorTblsV 68, 346Event_Configuration 69Events 68, 348Events_Configuration 351Events_Media 69, 353ExternalSPs 70, 355Functions 70, 357
HostsInfo 71, 359IndexConstraints 71, 360IndexStats 72, 362Indices 72, 364InDoubtLog 73, 366Journals 73, 367LogOnOff 73, 368LogonRules 73, 370MultiColumnStats 74, 371ProfileInfo 74, 373QryLog 75, 375QryLogEventHis 77, 378QryLogEvents 77, 380QryLogExceptions 78, 381QryLogExplain 78, 383QryLogObjects 79, 385QryLogSQL 79, 387QryLogSteps 79, 388QryLogSummary 81, 390QryLogTDWM 82, 392QryLogTDWMSum 83, 394RCC_Configuration 83, 396RCC_Media 83, 398RepTables 84, 399RestrictedWords 84, 400RI_Child_Tables 84, 401RI_Distinct_Children 84, 402RI_Distinct_Parents 85, 403RI_Parent_Tables 85, 404RoleInfo 85, 405RoleMembers 85, 406SecurityDefaults 86, 407SecurityLog 86, 408SessionInfo 86, 409ShowColChecks 87, 411ShowTblChecks 87, 412Software_Event_Log 87, 413Table_LevelConstraints 88, 415Tables 88, 416Tables2 89, 419TableSize 89, 420TableText 89, 422Triggers 90, 424User_Default_Journals 92, 433UserGrantedRights 90, 426UserRights 90, 427UserRoleRights 91, 429Users 91, 431
DBC views, columns of. See individual column namesDBCAssociation table 459DBCInfo view 66, 337DBCInfoTbl table 461DbId column 486DBKind column 154
Index
572 Data Dictionary
DBlockSize column 496DBName column 484, 494, 495DBQLAccessMacro macro 555DBQLExplainTbl table 462DBQLObjTbl table 462DBQLogTbl table 464DBQLRuleCountTbl table 468DBQLRules view 67, 339DBQLRuleTbl table 468DBQLSqlTbl table 469DBQLStepTbl table 470DBQLSummaryTbl table 472DecimalFractionalDigits column 154DecimalTotalDigits column 154DefaultAccount column 155, 487DefaultCharSet column 155, 478DefaultCharType column 156, 458, 506DefaultCollation column 156, 457DefaultDatabase column 156, 457, 467, 487, 521DefaultDateForm column 157, 458DefaultDB column 158DefaultRole column 158DefaultTransformGroup column 542DefaultValue column 158, 524DefaultValueI column 524DelAmpCount column 493DelayedCount column 159, 517DelayTime column 158, 466DeleteAccessLog view 67, 341DeleteConstantValue macro 555DeleteCostProfile macro 556DeleteOldInDoubt view 67, 342Dependency table 473Description column 492DeterministicOpt column 159, 536DIP utility 21DIPMarkNSIO macro 556DIPVIEW macros 547DIPVIEW script 44DiskIO column 159DiskSpace view 68, 343Dummy1 column 447Dummy2 column 447DupeDumpSet column 160, 492
EE_TableId column 166E2I column 160E2IUp column 160ElapsedTime column 161EnabledFlag column 161EncryptedPassword column 456, 485Encryption column 542
EncryptionFlag column 455, 485End User views 28EndTimeStamp column 492, 495EndTimeStamp1 column 493EndTimeStamp2 column 493EndTimeStamp3 column 493EndTimeStamp4 column 493EndTimeStamp5 column 493EndTimeStamp6 column 493EndTimeStamp7 column 493EndTimeStamp8 column 493EndTimeStamp9 column 493EntryID column 161, 513EntryKind column 162, 513EntryName column 162, 513EntryTS column 162, 513ErrorCode column 163, 465, 475, 521ErrorCount column 163, 517ErrorDID column 476ErrorMsgs table 475ErrorTblId column 501ErrorTbls table 475ErrorTblsV view 68, 346ErrorText column 163, 465, 475, 515ErrorTID column 476ErrTblDbName column 163ErrTblName column 164EstCPUCost column 164, 470EstDeleteSecs column 494, 497EstHRCost column 164, 471EstIOCost column 164, 471EstMaxRowCount column 467EstNetCost column 165, 471EstProcTime column 165, 467, 470EstRedistSecs column 494, 497EstRemainDeleteSecs column 493EstRemainRedistSecs column 493EstResultRows column 467EstRowCount column 165, 470Event column 166, 476Event_Tag column 169, 508EventCode column 167, 514EventComboID column 511EventComboName column 511EventComboStatus column 511EventCount column 167, 444EventInfo column 168, 514EventLog table 476EventNum column 168, 460, 485, 489, 490EventNumber column 492Events view 68, 69, 348Events_Configuration view 69, 351Events_Media view 69, 353EventSubCode column 169, 514
Index
Data Dictionary 573
EventTime column 169, 514EventType column 170, 490EventValue column 170, 513ExceptionAction column 171, 515ExceptionCode column 171, 515ExceptionCount column 171, 517ExceptionSubCode column 172, 515ExceptionTime column 172, 515ExceptionValue column 173, 467, 515ExecProtectionMode column 173, 533, 536ExpandAcctString column 174, 464ExpiredPassword column 175, 505ExpirePassword column 174, 487, 509ExplainFlag column 175, 468ExplainText column 175, 462ExpRowNo column 176, 462ExtAuth column 507ExtendedLogonSource column 507External stored procedure 34ExternalName column 176, 535ExternalProcedureId column 176ExternalProcedureName column 177ExternalRoles column 506ExternalSPs view 70, 355ExtFileReference column 177, 482, 536, 543ExtraField1 column 467, 471ExtraField2 column 467, 471ExtraField3 column 467, 471ExtraField4 column 467, 471ExtraField5 column 468ExtraField6 column 468ExtraField7 column 468ExtraInfo column 177, 516ExtRole column 178, 502
FFallbackFlag column 496Field1 column 484FieldFormat column 524FieldId column 437, 479, 522FieldName column 522FieldPosition column 479Fields table 435FieldStatistics column 178, 525FieldTitle column 525FieldType column 523FINAL column 541FinalWDID column 178, 467FirstRespTime column 465FirstStepTime column 178, 465FKPosition column 538ForeignKeyFID column 498, 499, 538FreqofUse column 179, 463
Frequency column 179, 444FromSQLRoutineId column 544FSGIOCount column 497FSysMiscCount column 497FSysReadCount column 497FSysWriteCount column 497FunctionId column 179, 535FunctionName column 180, 535Functions view 70, 71, 357FunctionType column 180, 535
GGlobal table 477GRANT privilege 21GrantAuthority column 180Grantee column 181GranteeId column 502GranteeKind column 181, 502Grantor column 181GrantorID column 438, 503GrantorName column 182GroupId column 500, 501GroupLockId column 500GroupName column 182, 500, 544GroupNameI column 500GroupOperation column 500GroupStatus column 500
HHandled column 521HashFlag column 528HELP statement 32, 291Hex Unicode constants 51HighByteCount column 496HighbyteCountAmp column 496HighCPUSecsCount column 496HighCPUSecsCountAmp column 496HighHist column 182, 473HighIOCount column 496HighIOCountAmp column 496HighRowCount column 496HighRowCountAmp column 496HostName column 183, 477HostNo column 183, 504, 517, 518Hosts table 477HostsInfo view 71, 359
II2E column 183I2EUp column 183IdCol table 478IdColType column 184, 526
Index
574 Data Dictionary
IFPNo column 184, 443, 477, 504ImplicitAssignment column 540ImpliedPoint column 524InconsistencyFlag column 185InconsistentFlag column 498, 499Increment column 478IndexConstraints view 71, 360Indexes table 478IndexId column 185, 452IndexMode column 479IndexName column 186IndexNumber column 186, 479, 512IndexPresent column 187, 492IndexStatistics column 187, 480IndexStats view 72, 362IndexType column 188, 479Indices view 72, 364InDoubtLog view 73, 366InDoubtResLog table 480InfoData column 188, 461InfoKey column 189, 461Information Products Publishing Library 8InsertConstantString macro 557InsertConstantValue macro 557Install column 519InstallFlag column 189INSTANTIABLE column 541InterimFldSize column 189, 536InternalRequestNum column 190, 464IO column 445IOCount column 190IOcount column 470IsolationLevel column 507IsSourcePrimary column 538
JJAR_JAR_Usage table 482JarId column 481, 482, 503JarLibRevision column 459JarName column 482, 503JarRevision column 482JARS table 481Java external stored procedures 37JoinIndexTableID column 480Journal_DB column 190JournalFlag column 191, 456, 529JournalId column 457, 460, 529JournalName column 191Journals view 73, 367Journals_DB column 192JournalSaved column 192, 491JournalUsed column 192, 491
KKey column 477Keywords
ALL 31DEFAULT 31PUBLIC 31
Kind column 193, 520
LLastAccessTimeStamp column 193, 438, 442, 452, 458, 480,
483, 498, 499, 512, 520, 525LastAlterName column 193LastAlterTimeStamp column 194, 450, 458, 480, 489, 501,
520, 525, 530LastAlterUID column 450, 458, 480, 489, 501, 520, 525, 530LastStateChange column 194, 465LDAP column 195, 506LeftDBId column 448LeftFieldKey column 448LeftTVId column 448Level column 495Line column 195, 508LineNo column 195, 518LinkingEventNum column 196, 491ListCostProfiles macro 558ListCostProfiles1 macro 558ListCostProfiles2 macro 559LobSequenceNo column 526LocalSessionStatusTable 436LocalTransactionStatusTable 436LockedCount column 196, 458LockedDate column 196, 457LockedTime column 196, 457LockedUserExpire column 197, 488, 510LockMode column 197, 491LogDate column 198LogicalHostId column 198, 443, 464, 472, 476, 477, 480, 483,
505, 514, 515, 526LogLevel column 200, 446Logon rules, tracking 44LogonAcct column 200, 506LogonCollation column 504LogonDatabase column 504LogonDate column 201, 443, 477, 504LogonDateTime column 201, 464LogOnOff view 73, 368LogonRule macro 560LogonRules column 457LogonRules view 73, 370LogonRuleTbl table 483LogonSequenceNo column 202, 485, 505LogonSource column 202, 464, 477, 505LogonStatus column 203, 483
Index
Data Dictionary 575
LogonTime column 204, 443, 477, 504LogonUserName column 204, 481LogProcessor column 205, 489LogSyncPoint column 447LogTime column 205LogType column 206LowByteCount column 496LowByteCountAmp column 496LowCPUSecsCount column 496LowCPUSecsCountAmp column 496LowHist column 206, 473LowIOCount column 496LowIOCountAmp column 496LowRowCount column 496LowRowCountAmp column 496LSN column 206, 466, 471
MMacros
ARC_NonEmpty_List 548ARC_NonEmpty_ListM 550ClearAccounting 550ClearAllDatabaseUseCount 550ClearDatabaseUseCount 551ClearPeakDisk 551ClearTVMUseCount 552CollAddStandard 552CollInstallMulti 553CopyCostProfile 553CreateNewCostProfile 554DBQLAccessMacro 555DeleteConstantValue 555DeleteCostProfile 556DIPMarkNSIO 556DIPVIEW 547InsertConstantString 557InsertConstantValue 557ListCostProfiles 558ListCostProfiles1 558ListCostProfiles2 559LogonRule 560MergeCostProfile 561ResUsage 546ShowCostProfile 561ShowCostProfileAs 562TwoPCRule 545
MaxAMPCPUTime column 206, 466, 470MaxAMPCPUTimeNorm column 207, 467, 471MaxAmpIO column 207, 466, 471MaxAMPSpool column 207, 471MaxCPUAmpNumber column 207, 466, 470MaxCPUAmpNumberNorm column 208, 467, 471MaxCPUTime column 208, 517
MaxIOAmpNumber column 208, 466, 471MaxLogonAttempts column 209, 488, 510MaxNCorr column 449MaxOutParameters column 209, 537MaxPerm column 210MaxPermSpace column 454MaxProfileSpool column 210MaxProfileSpoolSpace column 454MaxProfileTemp column 210MaxProfileTempSpace column 455MaxRespTime column 210, 516MaxSpool column 211MaxSpoolAmpNumber column 211, 471MaxSpoolSpace column 454MaxStepsInPar column 211, 465MaxTemp column 211MaxTempSpace column 454MaxValue column 478MDSRecoveryTbl table 484MechanismOid column 507MechData column 507MergeCostProfile macro 561MetSLGCount column 212, 517Migration table 484MinAmpCPUTime column 212, 466, 471MinAmpCPUTimeNorm column 212, 467, 471MinAmpIO column 212, 466, 471MinAMPSpool column 213, 471MinCPUTime column 213, 516MinNCorr column 449MinRespTime column 213, 516MinValue column 478ModAmpCount column 494Model column 213, 446MONITOR-related queries 39MovAmpCount column 494MsgMisCount column 497MsgRcvCount column 497MsgSendCount column 497MsgWaitMiscTime column 497MsgWaitRcvTime column 497MsgWaitSendTime column 497MultiColumnStats view 74, 371
NName column 452, 480, 512NamedTblCheckCount column 214, 530NameI column 452NewWDID column 214, 515Next table 484NextFieIdId column 529NextIndexId column 529NoClassification column 214, 466
Index
576 Data Dictionary
NodeCount column 494NoMemFlushCount column 497Non-X view query 32NoSQLDataAccess column 215, 535Nullable column 215, 522NullCall column 216, 536NullPassword column 216, 483NumberOfRules column 468NumFallBackTables column 457NumLogProtTables column 457NumOfActiveAMPs column 216, 466, 470NumParameters column 217, 535NumResultRows column 217, 465NumSteps column 217, 465NumStepswPar column 218, 465NUSICount column 496
OObject1Id column 473Object1Name column 473Object2Id column 474Object2Name column 474ObjectColumnName column 218, 462ObjectDatabaseName column 218, 462ObjectId column 218, 444, 463, 490ObjectLevel column 444ObjectNum column 219, 463ObjectTableName column 219, 462ObjectType column 219, 463, 491ObjFlag column 221, 468OldPasswords table 485OpenEnvID column 514OpEnvID column 221, 466, 515, 516OperationInProcess column 221, 491Operations views 28OperatorAll column 542Options column 222, 481, 505OrderCode column 495Ordering publications 8OrderingCategory column 543OrderingForm column 543OrderingRoutineId column 543OrderNumber column 222, 495OrdSysChngTable 436Original_CommentString column 222, 461Original_CreatorName column 222, 461Original_DataBaseId column 460Original_DatabaseName column 223, 460Original_HashFlag column 460Original_JournalFlag column 223, 461Original_JournalID column 461Original_LogicalHostId column 460Original_NextFieldId column 460
Original_NextIndexId column 460Original_ProtectionType column 223, 460Original_RequestText column 461Original_SessionNo column 460Original_TableKind column 224Original_TableName column 224Original_TempFlag column 460Original_TVMId column 460Original_TVMName column 461Original_TVMNameI column 460Original_UtilVersion column 461Original_Version column 225, 461OSDomainName column 225, 534OSUserName column 225, 534OtherCount column 225, 517OwneeId column 485OwnerId column 455, 485OwnerName column 226, 444, 457Owners table 485
PParameterDataTypes column 227, 535ParameterStyle column 227, 535ParameterUDTIds column 227, 536Parent column 228ParentChildCorrelation table 486ParentCount column 228, 530ParentDb column 228ParentDbId column 229, 486ParentId column 486ParentKeyColumn column 229ParentKeyFID column 229, 498, 499ParentKeyName column 538Parents table 486ParentTable column 230ParentTblDateFID column 486ParentTblID column 486ParentTblName column 537ParentTID column 230ParserCPUTime column 230, 465, 473ParserCPUTimeNorm column 231, 467, 473PartCode column 505Partition column 231, 505, 508PartitionCount column 497PasswordChgDate column 232, 457PasswordDate column 485PasswordDigits column 233, 488PasswordLastModDate column 233PasswordLastModTime column 234PasswordMaxChar column 234, 487, 509PasswordMinChar column 234, 487, 509PasswordModTime column 456PasswordRestrictions table 487
Index
Data Dictionary 577
PasswordRestrictWords column 235, 488, 510PasswordReuse column 235, 488, 510PasswordSalt column 456, 485PasswordSpecChar column 236, 488, 510PathJarId column 482PathJarName column 482PDTCharType column 540PDTCode column 539PDTFamily column 539PDTImpliedPoint column 540PDTMaxLength column 539PDTTotalDigits column 540PeakPerm column 236PeakPermSpace column 454PeakSpool column 237PeakSpoolSpace column 454PeakTemp column 237PeakTempSpace column 454Performance Monitor 38PermSpace column 237, 456Phase column 495PhyProcessor column 238, 489Platform column 238, 534, 536PM/API
MONITOR-related queries 39Queries 38
PMA column 239, 508PrepareCount column 239, 536PrimaryKeyIndexId column 239, 530PrimaryUDTypeId column 538PrimeIndex column 509Privileges
tracking 44UserRights view 44
ProcessorState column 240, 490ProcID column 240, 462, 464, 469, 472, 513, 514, 515ProcsRowLoc column 484ProdID column 470ProfileCat column 241, 451, 453ProfileDesc column 241, 453ProfileID column 465, 472ProfileId column 241, 242, 451, 453, 487ProfileInfo view 74, 373ProfileName column 242, 243, 453, 458, 487, 506ProfileNameI column 487Profiles table 487ProfileTypeDesc column 243, 454ProfileTypeId column 450, 453ProfileTypeName column 243, 454ProtectionType column 244, 456, 528ProtectMode column 500
QQEventTS column 511QryLog view 75, 375QryLogEventHis view 77, 378QryLogEvents view 77, 380QryLogExceptions view 78, 381QryLogExplain view 78, 383QryLogObjects view 79, 385QryLogSQL view 79, 387QryLogSteps view 79, 388QryLogSummary view 81, 390QryLogTDWM view 82, 392QryLogTDWMSum view 83, 394QueryBand column 244, 444, 465, 508QueryCount column 245, 472QueryID column 245, 462, 464, 469, 470, 515, 521QuerySeconds column 245, 472QueryText column 246, 466, 521QueryTime column 521QueueFlag column 246, 532
RRCC_Configuration view 83, 396RCC_Media view 83, 398RCConfiguration table 489RCEvent table 490RCMedia table 492ReconfigId column 492, 495ReconfigInfo table 492ReconfigJournal table 437ReconfigOrder table 494ReconfigTableStats table 495ReconfigType column 492Recovery Control views 28RecoveryLockTable 436RecoveryPJTable 436ReferencedClsName column 483ReferencedDbID column 498, 499ReferencedTblID column 498, 499ReferencedTbls table 498ReferenceIdx column 498, 499, 538ReferenceIdxName column 498, 499, 538ReferencingDbID column 498ReferencingTblID column 498, 499ReferencingTbls table 498RelationshipCode column 475RepBatchStatus table 499Repgroup table 500Repgrouptables table 501RepSesOverride column 506RepStatus column 246RepTables view 84, 399RequestNum column 247, 464, 515
Index
578 Data Dictionary
RequestText column 247, 501, 529RequestTxtOverflow column 532Reserved column 494, 495, 497ResNode macro 43ResolvingUserLogonName column 248, 481Resource usage
AMPs 41example 41monitoring 40
RestartSeqNum column 248, 490, 491RestrictedWord column 249, 487RestrictedWords view 84, 400ResUsage macros 546RFU column 507RI_Child_Tables view 84, 401RI_Distinct_Children view 84, 402RI_Distinct_Parents view 85, 403RI_Parent_Tables view 85, 404RightDBId column 448RightFieldKey column 448RightTVId column 448RoleGrants table 502RoleId column 502RoleInfo view 85, 405RoleMembers view 85, 406RoleName column 249, 458, 502RoleNameI column 502Roles table 502Routine_JAR_Usage table 503RoutineId column 503RoutineKind column 250, 536RoutineName column 503RowCount column 250, 470RowCount2 column 250, 251, 470RowCount3 column 251RowNum column 484RowsWComprColumns column 251, 471RowType column 445, 457RSGroupID column 531RSQualifier column 499RuleID column 251, 516RunUnitId column 251, 481
SSamplePCT column 449SavedTransactionStatus table 436ScopeValue column 252, 514SecInfo column 534SecondaryUDTypeId column 539Security Logging views 24, 25SecurityDefaults view 86, 407SecurityLog view 86, 408SELECT privileges 19, 21, 32
SeqInHash column 443SeqNumber column 252SessionID column 253, 464, 472, 514, 515SessionInfo view 86, 409SessionNo column 253, 443, 477, 504, 517, 518, 527SessionNumber column 254, 480SessionTbl table 504SessionVproc column 506Severity column 254, 508ShowColChecks view 87, 411ShowCostProfile macro 561ShowCostProfileAs macro 562ShowTblChecks view 87, 412Signature column 504SLGMet column 255, 467Software_Event_Log view 87, 413Spare1 column 514Spare2 column 514SpecificName column 255SPObjectCodeRows column 531SpoolSpace column 256, 456, 487SpoolUsage column 256, 466, 471SPParameterType column 257, 526SQLFlag column 257SqlFlag column 468SQLJ system views 46
JAR_JAR_USAGE 47JARS 48ROUTINE_JAR_USAGE 49
SqlRowNo column 258, 469SqlTextInfo column 258, 470SrcFileLanguage column 258, 535StartColTime column 258, 516StartMBox column 259, 505StartTime column 259, 465StartupString column 259, 456StartValue column 478StatementKind column 444StatementText column 260, 444StatementType column 260, 444, 466StatId column 517StatInfo column 517StatisticsCnt column 518StatisticsId column 260Status column 493StepFlag column 261, 469StepLev1Num column 261, 470StepLev2Num column 261, 470StepName column 262, 470StepStartTime column 262, 470StepStopTime column 262, 470StepWD column 262, 471Stored procedure
access rights 33
Index
Data Dictionary 579
Data Dictionary tables containing 34details in Data Dictionary 19status 33
SubjectTabDbaseId column 520SubjectTableDatabaseName column 263SummaryFlag column 263, 469SummaryVal1 column 263, 469SummaryVal2 column 264, 469SummaryVal3 column 264, 469SW_Event_Log
ABORT SESSION 39SET RESOURCE 39SET SESSION 39
SW_Event_Log table 508SW_Version column 264, 508SysConID column 264, 466, 514, 515, 516SysRcvStatJournal table 436SysSecDefaults table 509System Administrator views 25System Field Engineer views 25System logs
maintaining 50purging 50
System view versionsNon-X 22X 22
SystemQTbl table 511
TTable_LevelConstraints view 88, 415TableCheck column 512TableConstraints table 512TableId column 446, 451, 454, 478, 484, 517, 518, 519, 522TableKind column 265, 528TableName column 266, 491Tables view 88, 416Tables_DB column 269Tables2 view 89, 419TableSize view 89, 420TableText view 89, 422TabName column 494, 495Task column 269, 508TblCheck column 270TblRole column 531TblStatus column 532TDWMAllAmpFlag column 270, 467TDWMConfLevelUsed column 270, 467TDWMEstLastRows column 270, 467TDWMEstMaxRows column 271, 467TDWMEstTotalTime column 271, 467TDWMEventHistory table 513TDWMEventlog table 514TDWMExceptionLog table 515
TDWMRuleId column 467TDWMSummaryLog table 516TempFlag column 528TempSpace column 271, 458, 487TempStatistics table 517TempTableID column 485TempTables table 518Text column 272, 508TextId column 518TextSizeLimit column 272, 469TextString column 518TextTbl table 518TextType column 518TheDate column 273, 443, 508TheFunction column 273, 508TheTime column 273, 443, 508ThresholdFlag column 273, 469ThreshValue column 274, 469TimeAccessed column 469TimeCreated column 469TimeFld column 476TimeZoneHour column 274, 458, 505TimeZoneMinute column 274, 458, 505ToSQLRoutineId column 544TotalDigits column 524TotalIOCount column 274, 465, 472TotByteCount column 494, 496TotCatchUpByteCount column 494TotCPUSecs column 496TotIOCount column 496TotJournalByteCount column 494TotRowCount column 495TotTableCount column 494TotTaskCount column 494Transaction_Mode column 275TransientJournal table 437TranslateID column 519TranslateIn column 519TranslateInUp column 519TranslateName column 519TranslateOut column 519TranslateOutUp column 519Translation table 519TransLog column 275, 530TriggerComment column 275TriggerCount column 530TriggerEnabled column 520TriggerEvent column 520TriggerId column 519TriggerName column 276, 519TriggerOrder column 520Triggers view 90, 424TriggersTbl table 519TSETQueryText table 521
Index
580 Data Dictionary
TVFields table 522TVM table 435, 526TVMId column 276, 437, 438, 459, 484, 512, 527TVMName column 276, 444, 529TVMNameI column 526TwoPCMode column 277TwoPCRule macro 545TypeId column 541TypeKind column 541TypeName column 541TypeofUse column 278, 463
UUDFInfo table 534UDFLibRevision column 458UDTCast table 538UDTInfo table 541UDTName column 526UDTTransform table 544UDTypeId column 526, 544UniqueFlag column 278, 479UnnamedTblCheckExist column 278, 530UnResolvedReferences table 537UnResolvedRICount column 279, 458UpperCaseFlag column 279, 525Usage statistics, compiling 42User_Default_Journals view 92, 433User-defined functions 35User-defined methods 35UserGrantedRights view 90, 426UserId column 279, 437, 438, 443, 445, 464, 468, 472, 483,
505, 537UserLogonDate column 280, 481UserLogonTime column 280, 481UserName column 280, 281, 443, 445, 467, 476, 485, 490, 505,
515UserOrProfile column 284UserRights view 90, 427UserRoleRights view 91, 429Users view 91, 431UtilityByteCount column 465UtilityLockJournalTable 437UtilityRowCount column 465UtilityTableId column 285, 471UtilVersion column 285, 529
VValueType column 285, 472Version column 286, 457, 488, 501, 529VolSequenceNum column 286, 492VolSerialId column 286, 492Vproc column 287, 446, 454, 490, 508VprocType column 287, 446
WWarningOnly column 288, 466, 516WDID column 288, 466, 514, 515, 516WDOverride column 288, 467WhenGranted column 289WithAdmin column 289, 503WithGrant column 438
XX view query 32XSPExternalName column 532XSPExtFileReference column 533XSPOptions column 533