13.01.2013 Views

OpenEdge Data Management: DataServer for Microsoft SQL Server

OpenEdge Data Management: DataServer for Microsoft SQL Server

OpenEdge Data Management: DataServer for Microsoft SQL Server

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.

<strong>Data</strong> source record locking<br />

<strong>Data</strong> source record locking<br />

In a <strong>Data</strong><strong>Server</strong> application, MS <strong>SQL</strong> <strong>Server</strong> handles all of its own locking issues. ABL<br />

locking rules are modified when you access in<strong>for</strong>mation from a MS <strong>SQL</strong> <strong>Server</strong> data<br />

source. As a result, the <strong>OpenEdge</strong> phrases NO–LOCK and SHARE–LOCK have<br />

isolation-level dependencies. The EXCLUSIVE-LOCK behaves the same in MS <strong>SQL</strong><br />

<strong>Server</strong> as in an <strong>OpenEdge</strong> database.<br />

Table 17 provides data source specific comparisons.<br />

Table 17: <strong>OpenEdge</strong> database and data source locking<br />

<strong>OpenEdge</strong> <strong>Data</strong> source<br />

NO–LOCK Supports the NO–LOCK option in a manner consistent with the<br />

<strong>OpenEdge</strong> database when transaction isolation level is set<br />

to read uncommitted.<br />

SHARE–LOCK Supports shared locks at the table, page, and record level.<br />

However, the scope and duration of the <strong>OpenEdge</strong><br />

database vs. MS <strong>SQL</strong> <strong>Server</strong> shared locks can differ<br />

depending on how data source cursors behave at a<br />

transaction boundary and how isolation levels are set. The<br />

repeatable read isolation level emulates the <strong>OpenEdge</strong><br />

database SHARE-LOCK behavior most closely. For more<br />

in<strong>for</strong>mation, see your MS <strong>SQL</strong> <strong>Server</strong> documentation.<br />

EXCLUSIVE–LOCK Supports the EXCLUSIVE-LOCK option in a manner<br />

consistent with the <strong>OpenEdge</strong> database using any available<br />

isolation level. However, the MS <strong>SQL</strong> <strong>Server</strong> optimizer<br />

might produce locks at either the table, page, or the record<br />

level.<br />

The <strong>Data</strong>Direct drivers provide four transaction isolation levels in the following order<br />

from least to most restrictive: read uncommitted, read committed, repeatable read, and<br />

serializable. In a multi-user configuration, you can isolate users from each other in your<br />

data source by setting the isolation level. In your <strong>OpenEdge</strong> schema holder, use the<br />

–Dsrv TXN_ISOLATION,n connection parameter (where n = 1, 2, 4, or 8) to set the<br />

isolation level in ODBC. See <strong>Microsoft</strong> documentation and the MS <strong>SQL</strong> <strong>Server</strong><br />

documentation <strong>for</strong> more in<strong>for</strong>mation.<br />

Note: MS <strong>SQL</strong> <strong>Server</strong> might use page-level or table-level locking rather than<br />

record-level locking, if its optimizer determines this is the best choice. This can<br />

affect data access when two or more users attempt to read or update different<br />

records that are on the same page. See your MS <strong>SQL</strong> <strong>Server</strong> documentation<br />

<strong>for</strong> details.<br />

<strong>OpenEdge</strong> <strong>Data</strong> <strong>Management</strong>: <strong>Data</strong><strong>Server</strong> <strong>for</strong> <strong>Microsoft</strong> <strong>SQL</strong> <strong>Server</strong> 93

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

Saved successfully!

Ooh no, something went wrong!