17.10 - User_Database - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Request and Transaction Processing

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
User Guide
Publication ID
B035-1142-171K
Language
English (United States)

Function of User_Database

Describes User and Database identifiers to capture the identity of the user who submitted the query, the names of databases used in the query plan, and so on.

User_Database Table Definition

The following CREATE TABLE request defines the User_Database table:

   CREATE TABLE User_Database(
     UDB_Key     INTEGER NOT NULL,
     UDB_ID      INTEGER NOT NULL,
     MachineName VARCHAR(30) CHARACTER SET UNICODE
                 NOT CASESPECIFIC NOT NULL,
     UDB_Name    VARCHAR128 CHARACTER SET UNICODE
                 NOT CASESPECIFIC NOT NULL)
   UNIQUE PRIMARY INDEX PK_UDB_KEY ( UDB_Key );

Attribute Definitions for User_Database

The following table defines the User_Database table attributes:

Attribute Definition
UDB_Key
  • Unique identifier for the user or database.
  • UPI for the table.
UDB_ID Unique identifier for the user or database on the system on which the captured query was performed.
MachineName Name of the production system on which the database identified by UDB_ID exists.
UDB_Name Name of the user or database identified by UDB_ID.