TABLE - Advanced SQL Engine - Teradata Database

Database Utilities

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
xha1591998860283.ditamap
dita:ditavalPath
xha1591998860283.ditaval
dita:id
B035-1102
lifecycle
previous
Product Category
Teradata Vantageā„¢

The TABLE command displays granted and blocked table-level locks.

Syntax

{ TABLE | TA } [ DBname.Tablename | ALL ]

Syntax Elements

DBname
The name of a database.
Tablename
The name of a table in DBname.
ALL
That all tables (from all databases) that have a table-level lock request are considered.
ALL is the default if you do not specify an object name.

Usage Notes

The following table shows the components of TABLE command output.

Component... Specifies...
Tran the currently running transactions with locks being applied.
Host the logical host ID (origin of the transaction).
Session the session number for the transaction.
Mode the type of lock mode:
  • Access
  • Read
  • Write
  • Exclusive
User the logon-ID for whom the lock is being requested.
Database the name of the database with granted or blocked locks.
Table the name of the table with granted or blocked locks.

Examples: TABLE command examples

The following example shows the locks on AMP 0 on the database RECBDQTAC and table T1:

table

- The following amps are available:

  0     1     2     3

-> Which amp(s) do you want to request on (S=Sampling/A=all/C=cancel/Q=quit):
> a
a

---------------- AMP 0 REPORTS 1 LOCK ENTRIES -------------

                   GRANTED LOCK REQUEST(S):

Tran: 16383 00000114
Host:  2049 Session:     0, 1000 Mode: WR*  User: DBC
Database: RECBDQTAC                   Table: T1

---------------- AMP 2 REPORTS 1 LOCK ENTRIES -------------

                   GRANTED LOCK REQUEST(S):

Tran: 16383 00000114
Host:  2049 Session:     0, 1000 Mode: WR*  User: DBC
Database: RECBDQTAC                       Table: T1

The following is an example of trying to display table-level locks on a table while trying to create the table.

table all

 - The following amps are available:

0

 -> Which amp(s) do you want to request on (S=Sampling/A=all/C=cancel/Q=quit):

A

Host:     7169   Session:       0, 1441 Mode: EX    User: DBC

Database: STAFF                               Table: ??????????????????????????????

Table name is not printed.