HP 3000 Manuals

Lock Assignment [ IMAGE/SQL Administration Guide ] MPE/iX 5.5 Documentation


IMAGE/SQL Administration Guide

Lock Assignment 

Locks are assigned to IMAGE/SQL tables in two ways.  First, you can
explicitly set a lock with the LOCK TABLE statement.  Second, you can
implicitly assign locks on PUBLIC tables depending on the operation,
DBOPEN mode, and ALLBASE/SQL Isolation Level as shown in Table 5-1 .

          Table 5-1.  Assigned Locks 

-------------------------------------------------------------------------------------
|                                |                |                |                |
|           IMAGE/SQL            | TurboIMAGE/XL  |  ALLBASE/SQL   | Lock Assigned  |
|         or ALLBASE/SQL         |  DBOPEN Mode   |   Isolation    |                |
|           Operation            |                |     Level      |                |
|                                |                |                |                |
-------------------------------------------------------------------------------------
|                                |                |                |                |
| Any operation that modifies    | 1 through 4    | Any isolation  | Exclusive data |
| the TurboIMAGE/XL table        |                | level          | set lock for   |
|                                |                |                | master         |
|                                |                |                | dataset.       |
|                                |                |                | Predicate      |
|                                |                |                | level lock for |
|                                |                |                | detail dataset |
|                                |                |                | if the "where" |
|                                |                |                | clause is      |
|                                |                |                | specified.     |
|                                |                |                |                |
-------------------------------------------------------------------------------------
|                                |                |                |                |
| Read (SELECT)                  | 1 through 4    | RR, CS, or RC  | Exclusive data |
|                                |                |                | set lock for   |
|                                |                |                | master         |
|                                |                |                | dataset.       |
|                                |                |                | Predicate      |
|                                |                |                | level lock for |
|                                |                |                | detail dataset |
|                                |                |                | if the "where" |
|                                |                |                | clause is      |
|                                |                |                | specified.     |
|                                |                |                |                |
-------------------------------------------------------------------------------------
|                                |                |                |                |
|                                |                | RU             | None           |
|                                |                |                |                |
-------------------------------------------------------------------------------------
|                                |                |                |                |
|                                | 5 through 8    | Any isolation  | None           |
|                                |                | level          |                |
|                                |                |                |                |
-------------------------------------------------------------------------------------

[REV BEG]

The SQL statements that can modify TurboIMAGE/XL tables are INSERT,
UPDATE, or DELETE.

The DBOPEN mode is assigned at ATTACH time.  To see what mode is
assigned, use the IMAGESQL DISPLAY USERS command.  If you have DBA
authority, you can change the mode with the UPDATE USER command.

The following are the isolation levels supported in ALLBASE/SQL and
IMAGE/SQL.

RR         Repeatable Read.  The transaction uses locking strategies to
           guarantee repeatable reads, the default isolation level.

CS         Cursor Stability.  Transaction uses locking strategies to
           assure cursor-level stability only.

RC         Read Committed.  Transaction uses locking strategies to
           retrieve only rows that have been committed by some
           transaction.

RU         Read Uncommitted.  Transaction reads data without obtaining
           additional locks.

The isolation levels are established with a BEGIN WORK statement.  Locks
are released when a COMMIT WORK or ROLLBACK WORK statement is issued.
Therefore, to release any locks, issue a COMMIT WORK statement as
frequently as possible.

For more information on isolation levels, and how they do locking on
ALLBASE tables, refer to the ALLBASE/SQL Reference Manual.
[REV END]



MPE/iX 5.5 Documentation