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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

584 Locking in the In<strong>for</strong>mix Interface 4 Chapter 19user ID (USER=)password (USING=)server (SERVER=)Due to an In<strong>for</strong>mix database limitation, the maximum number of tables that you canspecify to per<strong>for</strong>m a join is 22. An error message appears if you specify more than 22.For more in<strong>for</strong>mation about when and how <strong>SAS</strong>/<strong>ACCESS</strong> passes joins to the DBMS,see “Passing Joins to the DBMS” on page 43.Locking in the In<strong>for</strong>mix InterfaceIn most cases, <strong>SAS</strong> spooling is on by default <strong>for</strong> the In<strong>for</strong>mix interface and providesthe data consistency you need.To control how the In<strong>for</strong>mix interface handles locking, you can use the“READ_ISOLATION_LEVEL= LIBNAME Option” on page 175. Here are the validvalues.COMMITTED_READretrieves only committed rows. No locks are acquired, and rows can be lockedexclusively <strong>for</strong> update by other users or processes. This is the default setting.REPEATABLE_READgives you a shared lock on every row that is selected during the transaction. Otherusers or processes can also acquire a shared lock, but no other process can modifyany row that is selected by your transaction. If you repeat the query during thetransaction, you re-read the same in<strong>for</strong>mation. The shared locks are released onlywhen the transaction commits or rolls back. Another process cannot update ordelete a row that is accessed by using a repeatable read.DIRTY_READretrieves committed and uncommitted rows that might include phantom rows,which are rows that are created or modified by another user or process that mightsubsequently be rolled back. This type of read is most appropriate <strong>for</strong> tables thatare not frequently updated.CURSOR_STABILITYgives you a shared lock on the selected row. Another user or process can acquire ashared lock on the same row, but no process can acquire an exclusive lock tomodify data in the row. When you retrieve another row or close the cursor, theshared lock is released.If you set READ_ISOLATION_LEVEL= to REPEATABLE_READ orCURSOR_STABILITY, it is recommended that you assign a separate libref and that youclear that libref when you have finished working with the tables. This techniqueminimizes the negative per<strong>for</strong>mance impact on other users that occurs when you lockthe tables. To clear the libref, include this code:libname libref clear;For current In<strong>for</strong>mix releases, READ_ISOLATION_LEVEL= is valid only whentransaction logging is enabled. If transaction logging is not enabled, an error isgenerated when you use this option. Also, locks placed whenREAD_ISOLATION_LEVEL= REPEATABLE READ or CURSOR_STABILITY are notfreed until the libref is cleared.To see the SQL locking statements that <strong>SAS</strong> issues to the In<strong>for</strong>mix server, include inyour code the “<strong>SAS</strong>TRACE= System Option” on page 408.

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

Saved successfully!

Ooh no, something went wrong!