Consultor Eletrônico



Kbase P37194: What can cause a Table Lock (TAB IX)?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   04/11/2008
Status: Verified

GOAL:

What can cause a Table Lock (TAB IX)?

GOAL:

Reason to get a Full Table Lock

GOAL:

How a Full Table Lock may occur?

GOAL:

TAB IX in promon

GOAL:

_lock-type shows TAB

FACT(s) (Environment):

Progress 9.1x
OpenEdge 10.x
All Supported Operating Systems

CAUSE:

PROMON shows some sessions with IX Locking. A kbase suggests that this can happen with SQL clients, however we have none.

PROMOM shows that a table is in IX Limbo state, but no RECID is shown and we do not have any explicit table locks.

FIX:

Concerning the IX Locking in promon, you should be able to reproduce in 4GL by doing the following:

1. Start a Progress Server in Client/Server mode.
2. proserve sports2000 -N tcp -S prosv01 -H merlot.
3. Start a Progress session in the client connecting to the Server.
4. run the following code.

define buffer bcustomer for customer.
find last bcustomer no-lock no-error.
do trans:
create customer.
assign customer.custnum = if avail bcustomer then bcustomer.custnum + 1
else 1.
delete customer.
pause.
END.

Open a second Client Session and run again the code.

You will get error 2624.
<file-name> in use by <user> on <tty>. Wait or choose CANCEL to stop. (2624)

If you access promon and go option 4 and 1 (to display all the locks entries), you will notice that the table has TAB lock.

The entry in promon that looks like this:
Record Locking Table:
Usr Name Chain # Rec-id Table Lock Flags
5 <user> TAB 1239 0 2 IX L

This occurs since version 9 while processing purge locks in the 4gl.

A table lock will be taken out whenever an ABL DELETE statement is executed (i.e. delete a record from a table) and is held until the end of the transaction.

For SQL92 clients, table locks will be taken out when the transaction isolation level is set to SERIALIZED. No table locks will be taken out when using either the READ COMMITTED or REPEATABLE READ transaction isolation levels.

An IX table lock will conflict with someone else trying to lock the table in X (exclusive), S (shared) or SIX (shared table lock with intent to lock records exclusively) strengths. Those strengths of table locks will only be requested by SQL.

An IX table lock does not conflict with anybody else acquiring any strength of locks at the record level.