TMF Application Programmer's Guide (G06.26+)
TMF Programming Environment
HP NonStop TMF Application Programmer’s Guide—522419-005
1-12
Levels of Consistency
3. When accessing NonStop SQL/MP objects, specify REPEATABLE ACCESS for all
database operations.
4. When accessing Enscribe files, obtain a file lock at the beginning of the transaction
and then let the DP2 disk process release the file lock when the transaction
commits.
Note that the use of file locks with Enscribe files severely limits the amount of
concurrent access, thereby reducing throughput and increasing the response time for
end users. In most cases, it is impractical to use Enscribe file locks.
Levels of Consistency
Consistency and concurrency are inversely proportional to one another; as one
increases, the other decreases. When using NonStop SQL/MP, you balance
consistency and concurrency through the use of access options.
NonStop SQL/MP includes three access options, each corresponding to a general
level of consistency. The access option specified by a particular transaction
determines how much that transaction will be insulated from the effects of other
concurrently running transactions.
The three access options, and the corresponding levels of consistency, are as follows:
•
REPEATABLE ACCESS—Level-3 consistency
•
STABLE ACCESS—Level-2 consistency
•
BROWSE ACCESS—Level-1 consistency
The consistency level of a transaction depends on the lowest level of consistency
provided by any access option used in the transaction. For example, three
REPEATABLE ACCESS options and one STABLE ACCESS option used in a
transaction result in second-level consistency because of the one STABLE ACCESS
option.
REPEATABLE ACCESS
REPEATABLE ACCESS, sometimes referred to as “level-3 consistency,” provides
maximum insulation from other transactions. With REPEATABLE ACCESS enabled, a
transaction can run as though it were the only one active in the system. The
transaction will not read uncommitted changes made by other transactions. This
guarantees that any data you read is both stable and consistent; the data is neither in
transition nor will it be backed out after you have read it.
Furthermore, other transactions cannot alter any uncommitted changes made by the
transaction. This guarantees you the opportunity to change the database from one
consistent state to another consistent state. If your transaction has updated a set of
detail items, subtotals, and totals so that they are consistent with one another, no other
transaction can disturb that consistency.