Lock Assignment [ IMAGE/SQL Administration Guide ] MPE/iX 5.0 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 and
DBOPEN mode, 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 | 1 through 4 | Any isolation | Exclusive data |
| modifies the | | level | set lock |
| TurboIMAGE/XL table | | | |
| | | | |
-------------------------------------------------------------------------------
| | | | |
| Read (SELECT) | 1 through 4 | RR, CS, or RC | Exclusive data |
| | | | set lock |
| | | | |
-------------------------------------------------------------------------------
| | | | |
| | | RU | None |
| | | | |
-------------------------------------------------------------------------------
| | | | |
| | 5 through 8 | Any isolation | None |
| | | level | |
| | | | |
-------------------------------------------------------------------------------
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.
See the next page for further information on Table 5-1 .
The operations that can modify TurboIMAGE/XL tables are an 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 isolation levels are established with a BEGIN WORK statement.
Locks always hold an exclusive dataset level lock until the end of a
transaction.
MPE/iX 5.0 Documentation