READ_LOCK_TYPE= LIBNAME Statement Option
Specifies how data in a DBMS table is locked during
a read transaction.
Valid in: |
LIBNAME statement |
Default: |
data source-specific |
Supports: |
DB2 UNIX/PC, ODBC, Oracle |
Syntax
READ_LOCK_TYPE=ROW |NOLOCK
Syntax Description
- ROW
-
locks a row if any
of its columns are accessed. If you are accessing a DB2 or ODBC database,
READ_LOCK_TYPE=ROW indicates that locking is based on the READ_ISOLATION_LEVEL=
option. (This value is valid for connecting to DB2, ODBC, or Oracle
databases.)
- NOLOCK
-
does not lock the DBMS
table, pages, or rows during a read transaction. (This value is valid
for connecting to the Microsoft SQL Server via the ODBC table driver.
)
Details
If you omit READ_LOCK_TYPE=,
the default is the data source's default action. You can set a lock
for one data source table by using the data set option or for a group
of DBMS tables by using the LIBNAME option.
Example: Specify a Row-Level Lock for Read and Update
In the following example,
the LIBNAME options specify that row-level locking is used when data
is read or updated:
libname mydblib fedsvr server="d1234.us.company.com"
port=2171 user=user1 pwd=pass1 dsn=oradsn
read_lock_type=row update_lock_type=row;
See Also
To apply this
option to an individual table, use the READ_LOCK_TYPE= data set option.