Use
SAS/ACCESS locking
options only when Teradata standard locking is undesirable. For tips
on using these options, see
Understanding SAS/ACCESS Locking Options and
When to Use SAS/ACCESS Locking Options. Teradata examples are available.
READ_LOCK_TYPE= TABLE | VIEW
UPDATE_LOCK_TYPE= TABLE | VIEW
UPDATE_MODE_WAIT= YES | NO
READ_ISOLATION_LEVEL= ACCESS | READ | WRITE
Here are the valid
values for this option.
Read Isolation Levels for Teradata
|
|
|
Obtains an ACCESS lock
by ignoring other users' ACCESS, READ, and WRITE locks. Permits other
users to obtain a lock on the table or view.
Can return inconsistent
or unusual results.
|
|
Obtains a READ lock
if no other user holds a WRITE or EXCLUSIVE lock. Does not prevent
other users from reading the object.
Specify this isolation
level whenever possible, it is usually adequate for most SAS/ACCESS
processing.
|
|
Obtains a WRITE lock
on the table or view if no other user has a READ, WRITE, or EXCLUSIVE
lock on the resource. You cannot explicitly release a WRITE lock.
It is released only when the table is closed. Prevents other users
from acquiring any lock but ACCESS.
This is unnecessarily
restrictive, because it locks the entire table until the Read operation
is finished.
|
UPDATE_ISOLATION_LEVEL= ACCESS | READ | WRITE
The valid values for
this option, ACCESS, READ, and WRITE, are defined in the following
table.
Update Isolation Levels for Teradata
|
|
|
Obtains an ACCESS lock
by ignoring other users' ACCESS, READ, and WRITE locks. Avoids a potential
deadlock but can cause data corruption if another user is updating
the same data.
|
|
Obtains a READ lock
if no other user holds a WRITE or EXCLUSIVE lock. Prevents other users
from being granted a WRITE or EXCLUSIVE lock.
Locks the entire table
or view, allowing other users to acquire READ locks. Can lead to deadlock
situations.
|
|
Obtains a WRITE lock
on the table or view if no other user has a READ, WRITE, or EXCLUSIVE
lock on the resource. You cannot explicitly release a WRITE lock.
It is released only when the table is closed. Prevents other users
from acquiring any lock but ACCESS.
Prevents all users,
except those with ACCESS locks, from accessing the table. Prevents
the possibility of a deadlock, but limits concurrent use of the table.
|
These locking options
cause the LIBNAME engine to transmit a locking request to the DBMS;
Teradata performs all data-locking. If you correctly specify a set
of
SAS/ACCESS read or update locking options,
SAS/ACCESS generates
locking modifiers that override the Teradata standard locking.
If you specify an incomplete
set of locking options,
SAS/ACCESS returns an error message. If you
do not use
SAS/ACCESS locking options, Teradata lock defaults are
in effect. For a complete description of Teradata locking, see the
LOCKING statement in your Teradata SQL reference documentation.