Isolation levels, Primary keys and locking – Sybase 12.4.2 User Manual

Page 322

Advertising
background image

Isolation levels

302

GRANT, REVOKE,
and SET OPTION are
not restricted

While the commands

GRANT

,

REVOKE

, and

SET OPTION

are also considered

DDL operations, they cause no concurrency conflicts, and so are not restricted.

GRANT

and

REVOKE

always cause an automatic commit;

SET OPTION

causes

an automatic commit except when it is specified as

TEMPORARY

.

GRANT

and

REVOKE

are not allowed for any user currently connected to the database.

SET

OPTION

affects all subsequent SQL statements sent to the database server,

except for certain options that do not take effect until after you restart the
database server. See the Adaptive Server IQ Reference Manual for details of
setting options.

Primary keys and locking

Because only one user can update a table, primary key generation does not
cause concurrency conflicts.

Isolation levels

An important aspect of transaction processing is the database server’s ability to
isolate an operation. ANSI standards define four levels of isolation. Each
higher level provides transactions a greater degree of isolation from other
transactions, and thus a greater assurance that the database remains internally
consistent.

The isolation level controls the degree to which operations and data in one
transaction are visible to operations in other, concurrent transactions. IQ
snapshot versioning supports the highest level of isolation. At this level, all
schedules may be serialized.

Snapshot versioning maintains this high level of isolation between concurrent
transactions by following these rules:

Transaction management maintains a snapshot of committed data at the
time each transaction begins.

A transaction can always read, as long as the snapshot version it uses is
maintained.

A transaction's writes are reflected in the snapshot it sees.

Once a transaction begins, updates made by other transactions are
invisible to it.

Advertising