CREATE GLOBAL TEMPORARY TRACE TABLE Syntax Elements - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905
Unless otherwise noted, every syntax element that is a name must follow the rules for naming database objects. See Object Names.
database_name
user_name
Name of the database or user to contain table_name, if other than the current database or user.
table_name
Name of the global temporary trace table.
If the name is not fully qualified, the system assigns the table to the default database or user for the current session.
proc_ID BYTE(2)
Required first column and data type for all global temporary trace tables.
This column records the number of the AMP on which the UDF that wrote the row is running.
sequence INTEGER
Required second column and data type for all global temporary trace tables.
This column records a sequence number to indicate the order in which the function trace rows in the table were written for the logged AMP.
column_name
[Optional] Name of an optional column.
Specify optional columns in the order in which the columns and their attributes are to be defined for the table.
Up to 2,048 columns can be defined for a table.
data_type
data_type_attributes
One or more data definition phrases that define data for the column.
You must specify a single data type for each column_name.
You cannot specify a BLOB, CLOB, UDT, or Period type for any column in a global temporary trace table. You can dump all the predefined attributes of a UDT into a trace table using FNC calls, however.
You cannot write Java strings into a global temporary trace table column defined with any of the following data types because the Java language does not support the types:
  • GRAPHIC
  • VARGRAPHIC
  • LONG GRAPHIC
Column data type attribute specifications are optional. If you specify attributes for a column, you must define its data type before defining the attributes.
The only valid constraints for global temporary trace table columns are NULL and NOT NULL.
If you specify NOT NULL, but the UDF does not return data, then that column is padded with appropriate values, depending on the data type.
You cannot specify DEFAULT or WITH DEFAULT column attributes for global temporary trace table columns.
If you do not specify explicit formatting, a column assumes the default format for the data type. Explicit formatting applies both to the parsing and to the retrieval of character strings.
You cannot define a temporal column for a global temporary trace table.
Data types and data type attributes are described in detail in Data Types and Literals.
ON COMMIT
Action to perform when a transaction completes.
PRESERVE ROWS
Preserve the contents of a global temporary or volatile table when a transaction completes.
DELETE ROWS
Delete the contents of a global temporary or volatile table when a transaction completes.
DELETE is the default.