Concurrency Control - Teradata Tools and Utilities

Teradata® Archive/Recovery Utility Reference

Product
Teradata Tools and Utilities
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-06-05
dita:mapPath
fac1527114221922.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2412
Product Category
Teradata Tools and Utilities
When not running an Online Archive, the ARCHIVE statement places a HUT read lock on the:
  • Database when archiving the database
  • Table when archiving the table

If there is an existing SQL read lock or access lock (created by using the LOCKING FOR ACCESS modifier) on the database, Teradata ARC can obtain its read lock and start the archive. If there is an existing SQL write lock or an exclusive lock on the database or table, Teradata ARC will be blocked until the blocking lock is released. Once the read or access lock is obtained, it is maintained on that object until it's data is archived and then the lock will be released.

When running an Online Archive, the ARCHIVE statement places a transaction table read lock on all of the object(s) to be archived to establish a consistency point so that Online Logging can be started on all of the involved objects at the same time. After the consistency point is established and Online Logging is enabled, the read lock is released prior to archiving any of the table data.

Establishing the consistency points defines the state of the tables to which they will be restored. While waiting for the table read locks required to set the consistency point, new write transactions will wait behind those read lock requests. If it is important to reduce impact to the write transactions, then there are some important considerations for reducing the time to establish a consistency point. New write transactions can be expected to wait for at least as long as the longest running write transaction in the system that accesses one of the tables in the consistency point. The options to shorten the wait time on the new write transactions are four fold.
  • First, you may exclude tables being written to from this archive.
  • Second, you may pause the start-up of all or most of the write transactions while the consistency point is being established.
  • Third, you may shorten or break up the long running write transactions so that they finish quicker.
  • Fourth, you may break a consistency point up into smaller groups of tables making multiple smaller consistency points.

Refer to Introduction to Teradata (B035-1091) for details on concurrency control and transaction recovery.