Locking in the SAP ASE Interface

Overview

These LIBNAME and data set options let you control how the SAP ASE interface handles locking. For general information about an option, see LIBNAME Options for Relational Databases.

READ_LOCK_TYPE= PAGE | NOLOCK

The default value for SAP ASE is NOLOCK.

UPDATE_LOCK_TYPE= PAGE | NOLOCK

PAGE

SAS/ACCESS uses a cursor that you can update. PAGE is the default value for SAP ASE. When you use this value, you cannot use the SCHEMA= option, and it is also recommended that the table have a specified primary key.

NOLOCK

SAS/ACCESS uses SAP ASE Browse mode updating, in which the table that is being updated must have a primary key and timestamp.

READ_ISOLATION_LEVEL= 1 | 2 | 3

For reads, SAP ASE supports isolation levels 1, 2, and 3, as specified in the following table. See your SAP ASE documentation for more information.

Isolation Levels for SAP ASE

Isolation Level

Definition

1

Prevents dirty Reads. This is the default transaction isolation level.

2

Uses serialized Reads.

3

Also uses serialized Reads.

UPDATE_ISOLATION_LEVEL= 1 | 3

SAP ASE uses a shared or update lock on base table pages that contain rows representing a current cursor position. This option applies to updates only when UPDATE_LOCK_TYPE=PAGE because cursor updating is in effect. It does not apply when UPDATE_LOCK_TYPE=NOLOCK.

For updates, SAP ASE supports isolation levels 1 and 3, as specified in the preceding table. See your SAP ASE documentation for more information.

Understanding SAP ASE Update Rules

To avoid data integrity problems when updating and deleting data in SAP ASE tables, take these precautionary measures:

It is not always obvious whether updates are using cursor processing. Cursor processing is never used for LIBNAME statement updates if UPDATE_LOCK_TYPE=NOLOCK. Cursor processing is always used in these situations:

Last updated: February 3, 2026