Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - SQL Usage » Transactions and isolation levels » Isolation level tutorials


Tutorial: Understanding dirty reads

The following tutorial demonstrates the type of inconsistency that can occur when multiple transactions are executed concurrently: the dirty read. In this scenario, two employees at a small merchandising company access the corporate database at the same time. The first person is the company's Sales Manager; the second is the Accountant.

The Sales Manager wants to increase the price of tee shirts sold by their firm by $0.95, but is having a little trouble with the syntax of the SQL language. At the same time, unknown to the Sales Manager, the Accountant is trying to calculate the retail value of the current inventory to include in a report needed for the next management meeting.


For this tutorial to work properly, the Automatically Release Database Locks option must not be selected in Interactive SQL. You can check the setting of this option by clicking Tools » Options, and then clicking SQL Anywhere in the left pane.

 See also

Lesson 1: Creating a dirty read
Lesson 2: Avoiding dirty reads using snapshot isolation