SAS/ACCESS Interface to Sybase |
Overview |
The following LIBNAME and data set options let you control how the Sybase interface handles locking. For general information about an option, see LIBNAME Options for Relational Databases.
SAS/ACCESS uses a cursor that you can update. PAGE is the default value for Sybase. When you use this setting, you cannot use the SCHEMA= option, and it is also recommended that the table have a defined primary key.
SAS/ACCESS uses Sybase browse mode updating, in which the table that is being updated must have a primary key and timestamp.
For reads, Sybase supports isolation levels 1, 2, and 3, as defined in the following table. See your Sybase documentation for more information.
Isolation Level | Definition |
---|---|
1 | Prevents dirty reads. This is the default transaction isolation level. |
2 | Uses serialized reads. |
3 | Also uses serialized reads. |
Sybase 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, Sybase supports isolation levels 1 and 3, as defined in the preceding table. See your Sybase documentation for more information.
Understanding Sybase Update Rules |
To avoid data integrity problems when updating and deleting data in Sybase 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:
Updates using the LIBNAME statement with UPDATE_LOCK_TYPE=PAGE. Note that this is the default setting for this option.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.