13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

834 Understanding <strong>SAS</strong>/<strong>ACCESS</strong> Locking Options 4 Chapter 28effect. For a complete description of Teradata locking, see the LOCKING statement inyour Teradata SQL reference documentation.Understanding <strong>SAS</strong>/<strong>ACCESS</strong> Locking Options<strong>SAS</strong>/<strong>ACCESS</strong> locking options modify Teradata’s standard locking. Teradata usuallylocks at the row level; <strong>SAS</strong>/<strong>ACCESS</strong> lock options lock at the table or view level. Thechange in the scope of the lock from row to table affects concurrent access to DBMSobjects. Specifically, READ and WRITE table locks increase the time that other usersmust wait to access the table and can decrease overall system per<strong>for</strong>mance. Thesemeasures help minimize these negative effects.3 Apply READ or WRITE locks only when you must apply special locking onTeradata tables.<strong>SAS</strong>/<strong>ACCESS</strong> locking options can be appropriate <strong>for</strong> special situations, asdescribed in “When to Use <strong>SAS</strong>/<strong>ACCESS</strong> Locking Options” on page 834. If<strong>SAS</strong>/<strong>ACCESS</strong> locking options do not meet your specialized needs, you can useadditional Teradata locking features using views. See CREATE VIEW in yourTeradata SQL reference documentation <strong>for</strong> details.3 Limit the span of the locks by using data set locking options instead of LIBNAMElocking options whenever possible. (LIBNAME options affect all tables that youopen that your libref references. Data set options apply only to the specified table.)If you specify these read locking options, <strong>SAS</strong>/<strong>ACCESS</strong> generates and submits toTeradata locking modifiers that contain the values that you specify <strong>for</strong> the three readlock options:3 READ_ISOLATION_LEVEL= specifies the level of isolation from other table usersthat is required during <strong>SAS</strong>/<strong>ACCESS</strong> read operations.3 READ_LOCK_TYPE= specifies and changes the scope of the Teradata lock during<strong>SAS</strong>/<strong>ACCESS</strong> read operations.3 READ_MODE_WAIT= specifies during <strong>SAS</strong>/<strong>ACCESS</strong> read operations whetherTeradata should wait to acquire a lock or fail your request when the DBMSresource is locked by a different user.If you specify these update lock options, <strong>SAS</strong>/<strong>ACCESS</strong> generates and submits toTeradata locking modifiers that contain the values that you specify <strong>for</strong> the three updatelock options:3 UPDATE_ISOLATION_LEVEL= specifies the level of isolation from other tableusers that is required as <strong>SAS</strong>/<strong>ACCESS</strong> reads Teradata rows in preparation <strong>for</strong>updating the rows.3 UPDATE_LOCK_TYPE= specifies and changes the scope of the Teradata lockduring <strong>SAS</strong>/<strong>ACCESS</strong> update operations.3 UPDATE_MODE_WAIT= specifies during <strong>SAS</strong>/<strong>ACCESS</strong> update operationswhether Teradata should wait to acquire a lock or fail your request when theDBMS resource is locked by a different user.When to Use <strong>SAS</strong>/<strong>ACCESS</strong> Locking OptionsThis section describes situations that might require <strong>SAS</strong>/<strong>ACCESS</strong> lock optionsinstead of the standard locking that Teradata provides.3 Use <strong>SAS</strong>/<strong>ACCESS</strong> locking options to reduce the isolation level <strong>for</strong> a read operation.When you lock a table using a READ option, you can lock out both yourself andother users from updating or inserting into the table. Conversely, when other

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!