The Lock Display utility, lokdisp, provides information about all real-time database locks.
Teradata Database uses locks for concurrency control, ensuring data involved in a particular transaction remains consistent for the duration of that transaction, while the database remains available to multiple concurrent users and queries. For more information on Teradata Database locks, see SQL Request and Transaction Processing.
Locks are applied automatically as appropriate by Teradata Database. Optionally, you can specify the lock to be applied to a database object using the SQL LOCKING request modifier. (For more information, see SQL Data Manipulation Language.) Locks are applied to different levels of database objects as required by the particular operation requiring the lock. Locks can be applied with the following granularities:
- Partition (row-partition)
- Range of rows
- Row (locks rows having a particular rowhash value, which may be more than a single row)
Lock Display can obtain lock information from the following:
- A specific AMP
- A group of AMPs
- All AMPs
Lock information can also be monitored and displayed using the Lock Viewer portlet in Teradata Viewpoint. For more information, see Teradata Viewpoint User Guide.