- 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.
- 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.