There are 4 types of Locks in Teradata Database mentioned below –
The use of an access lock allows for reading data while modifications are in process. Access locks are designed for decision support on tables that are updated only by small, single-row changes. Access locks is not concerned about data consistency. Access locks prevent other users from obtaining the Exclusive locks on the locked data.
Read locks are used to ensure consistency during read operations. Several users may hold concurrent read locks on the same data, during this time no data modification is permitted. Read locks prevent other users from obtaining the Exclusive locks and Write locks on the locked data.
Write locks enable users to modify data while maintaining data consistency. While the data has a write lock on it, other users can only obtain an access lock. During this time, all other locks are held in a queue until the write lock is released.
Exclusive locks are applied to databases or tables and not to rows. When an exclusive lock is applied, no other user can access the database or table. Exclusive locks are used when a DDL command is executed .An exclusive lock on a database or table prevents other users from obtaining any lock on the locked object.