This page summarize some of the commonly used views in Teradata.
In all the views in the following sections, X views are also available though they only return rows that contain information on objects that the requesting database user owns, created, granted privilige on, granted access through the current role, or granted access through nested roles.
For example, X view for dbc.ChildrenV is dbc.ChidrenVX.
dbc.ChildrenV lists all the descendent containers of a database.
For example, the following query retrieves all the child databases of database ParentDb:
SELECT * FROM DBC.ChildrenV WHERE Parent='ParentDb';
For example, the following result set will be generated if the database hierarchy looks like the above screenshot:
SELECT * FROM DBC.DatabasesV;
View DBC.DatabasesV returns information about all the databases. For example, database name, creator name, permanent space, spool space and temporary space.
Retrieve these informtion by using the following query:
SELECT * FROM DBC.TablesV;
View DBC.TablesV includes information of creator, object name, database name, request text (DDL) and etc.
TableKind column indicates the object type. For example:
SELECT * FROM DBC.ColumnsV WHERE DatabaseName='DBC' AND TableName='Databases';
View DBC.ColumnsV can be used to retrieve column information.
View DBC.FunctionsV can be used to retireve contraints and indexes of a table:
SELECT * FROM DBC.FunctionsV;
Use view DBC.IndicesV to query hash and join indices:
SELECT * FROM DBC.IndicesV WHERE DatabaseName='DBC' AND TableName='RoleGrants';
Use view DBC.TableSizeV to query size information for the tables:
SELECT * FROM DBC.TableSizeV WHERE DatabaseName='DBC' AND TableName='RoleGrants';
This view display permanent space by AMP (Vproc):
View DBC.DiskSpaceV can be used to query disk space usage of databases by AMP(Vproc):
SELECT * FROM DBC.DiskSpaceV WHERE DatabaseName='DBC';
This view returns MAX, Current and Allocated space for the following types:
Use view DBC.AllRights to check the permission of a user:
SELECT UserName, DatabaseName, TableName, ColumnName, AccessRight, GrantAuthority, GrantorName, AllnessFlag, CreatorName, CreateTimeStamp, CASE WHEN ACCESSRIGHT = 'D' THEN 'DELETE' WHEN ACCESSRIGHT = 'I' THEN 'INSERT' WHEN ACCESSRIGHT = 'R' THEN 'SELECT' WHEN ACCESSRIGHT = 'SH' THEN 'SHOW TABLE/VIEW' WHEN ACCESSRIGHT = 'U' THEN 'UPDATE' ELSE 'OTHER - ' || ACCESSRIGHT END ACCESS_LEVEL FROM DBC.AllRights WHERE UserName='PUBLIC';
Other related views can be used:
In this article, I am going to introduce how to install Teradata Express in virtual machines in Windows. Download software 1) Download VMware Player for Windows 32-bit and 64-bit from the following link (version 6.0): ...View detail
Teradata published an official Python module which can be used in DevOps projects. More details can be found at the following GitHub site: https://github.com/Teradata/PyTd Install Teradata module ...View detail
This post summarizes the tutorials I created in the past about Teradata. It is trying to help you gain the basic SQL skills with Teradata especially if you are a new beginner or you just move from SQL Server or Oracle. It also includes some guides about setting up your own Teradata server (latest Teradata Express version TDExpress16.10.00.03_Sles11_40GB.7z).View detail
For many SQL Server or Oracle developers, you may encounter some inconveniences when writing SQL queries. For example, how to select from dummy table or local defined variables. This page summarize the equivalents in Teradata SQL.View detail
This post summarize the common functions that are used when dealing with DateTime datatypes in Teradata.View detail