Specifies how data in a DBMS table is locked during a read transaction.
| Valid in: | DATA and PROC steps (when accessing DBMS data using SAS/ACCESS software) |
|---|---|
| Category: | Data Access |
| Default: | LIBNAME option value [DB2 under UNIX and PC Hosts, DB2 under z/OS, Greenplum, HAWQ, Microsoft SQL Server, ODBC, OLE DB, Oracle, PostgreSQL, SAP ASE, SAP HANA, SAP IQ, Teradata, Vertica, Yellowbrick] |
| ROW [Amazon Redshift] | |
| Data source: | Amazon Redshift, DB2 under UNIX and PC Hosts, DB2 under z/OS, Greenplum, HAWQ, Microsoft SQL Server, ODBC, OLE DB, Oracle, PostgreSQL, SAP ASE, SAP HANA, SAP IQ, Teradata, Vertica, Yellowbrick |
| Notes: | Support for Amazon Redshift was added in the April 2016 release of SAS/ACCESS. |
| Support for Yellowbrick was added in SAS 9.4M7. | |
| Tip: | If you omit READ_LOCK_TYPE=, you receive either the default action for the DBMS that you are using or a lock for the DBMS that was specified with the LIBNAME statement. |
| See: | READ_ISOLATION_LEVEL= LIBNAME option, READ_ISOLATION_LEVEL= data set option, READ_LOCK_TYPE= LIBNAME option, UPDATE_ISOLATION_LEVEL= LIBNAME option, UPDATE_ISOLATION_LEVEL= data set option, UPDATE_LOCK_TYPE= LIBNAME option, UPDATE_LOCK_TYPE= data set option, and DBMS-specific locking information in the reference section for your SAS/ACCESS interface |
Table of Contents
locks a row if any of its columns are accessed. If you are using the interface to ODBC, Teradata, or DB2 under UNIX and PC Hosts, READ_LOCK_TYPE=ROW indicates that locking is based on the READ_ISOLATION_LEVEL= LIBNAME option.
| Data source | DB2 under UNIX and PC Hosts, Greenplum, HAWQ, Microsoft SQL Server, ODBC, Oracle, PostgreSQL, SAP HANA, SAP IQ, Teradata, Vertica |
|---|
locks a page of data, which is a DBMS-specific number of bytes.
| Data source | SAP ASE |
|---|
locks the entire DBMS table. If you specify READ_LOCK_TYPE=TABLE, you must also specify the CONNECTION=UNIQUE, or you receive an error message. Specifying CONNECTION=UNIQUE ensures that your table lock is not lost (for example, due to another table closing and committing rows in the same connection).
| Data source | DB2 under UNIX and PC Hosts, DB2 under z/OS, Greenplum, HAWQ, Microsoft SQL Server, ODBC, Oracle, SAP IQ, Teradata |
|---|
does not lock the DBMS table, pages, or any rows during a read transaction.
| Data source | Microsoft SQL Server, ODBC with Microsoft SQL Server driver, OLE DB, Oracle, SAP ASE |
|---|
locks the entire DBMS view.
| Data source | Teradata |
|---|