Difference between revisions of "SET TXLEVEL"

From Recital Documentation Wiki
Jump to: navigation, search
 
 
Line 1: Line 1:
{{YLM to do}}
+
==Purpose==
 +
To set the current transaction level
 +
 
 +
 
 +
==Syntax==
 +
SET TRANSACTION UNCOMMITTED | COMMITTED
 +
 
 +
 
 +
==See Also==
 +
[[CLOSE]], [[Configuration Files]], [[DECLARE CURSOR]], [[DROP CURSOR]], [[FETCH]], [[OPEN]], [[SQL SELECT|SELECT]], [[TXLEVEL()]], [[TXNISOLATION()]], [[TXNLEVEL()]]
 +
 
 +
 
 +
==Description==
 +
Three aspects of transaction behavior are configurable: dirty reads, non-repeatable reads and phantom reads.  Dirty reads occur when a transaction updates a row, then a second transaction reads that row before the first transaction commits.  If the first transaction rolls back the change, the information read by the second transaction becomes invalid.  Non-repeatable reads occur when a transaction reads a row then another transaction updates the same row.  If the second transaction commits, subsequent reads by the first transaction get different values than the original read.  Phantoms occur when a transaction reads a set of rows that satisfy a search condition and then another transaction updates, inserts, or deletes one or more rows that satisfy the first transaction’s search condition.  In this case, if the first transaction performs subsequent reads with the same search condition, it reads a different set of rows.
 +
 
 +
 
 +
{| class="wikitable"
 +
!Keywords||Description
 +
|-
 +
|UNCOMMITTED||This will enable dirty reads, non-repeatable reads and phantom reads.  This is the default.
 +
|-
 +
|COMMITTED||This will disable dirty reads and enable non-repeatable reads and phantom reads.
 +
|-
 +
|}
 +
 
 +
 
 +
==Example==
 +
<code lang="recital">
 +
set txlevel committed
 +
</code>
 +
 
 +
 
 +
==Products==
 +
Recital Server, Recital
 +
[[Category:Documentation]]
 +
[[Category:Commands]]
 +
[[Category:Set_Commands|TXLEVEL]]

Latest revision as of 16:18, 5 November 2009

Purpose

To set the current transaction level


Syntax

SET TRANSACTION UNCOMMITTED | COMMITTED


See Also

CLOSE, Configuration Files, DECLARE CURSOR, DROP CURSOR, FETCH, OPEN, SELECT, TXLEVEL(), TXNISOLATION(), TXNLEVEL()


Description

Three aspects of transaction behavior are configurable: dirty reads, non-repeatable reads and phantom reads. Dirty reads occur when a transaction updates a row, then a second transaction reads that row before the first transaction commits. If the first transaction rolls back the change, the information read by the second transaction becomes invalid. Non-repeatable reads occur when a transaction reads a row then another transaction updates the same row. If the second transaction commits, subsequent reads by the first transaction get different values than the original read. Phantoms occur when a transaction reads a set of rows that satisfy a search condition and then another transaction updates, inserts, or deletes one or more rows that satisfy the first transaction’s search condition. In this case, if the first transaction performs subsequent reads with the same search condition, it reads a different set of rows.


Keywords Description
UNCOMMITTED This will enable dirty reads, non-repeatable reads and phantom reads. This is the default.
COMMITTED This will disable dirty reads and enable non-repeatable reads and phantom reads.


Example

set txlevel committed


Products

Recital Server, Recital