I am trying to confirm what locks, if any, dbschema places on tables. I
have 2 versions, 7.13.UC2 and 7.24.UC6. In 7.13 a shared lock is placed
on the tables and held until the dbschema command finishes. This can be
seen in onstat -k. 7.24 does not seem to place any locks on the tables.
Is this correct?
The database must be logged. Non-logged databases do not show any locks
in either version.
I opened a case with Informix Tech Support and have received an answer
that I don't agree with and understand. Informix's answer follows:
--------------------------------------------------------------------
Regarding your query wheter dbschema locks tables, the answer is yes.
we lock a table by placing a row lock in systables.
If one has a lock on a datatable, we get the dbschema information from
systables, a lock on a datatable affects queries from a systable.We lock
a table by placing a row lock in systables.
dbschemas are in tabid order. Here's the steps to can try to track the
lock:
1. find the last table that was dbschemaed
2. select tabid from sysmaster:systables where tabname =
"last_table_dbschemaed"
3. select hex(partnumber) from sysmaster:systables where tabid >
tabid_above
and tabid < tabid_above + 5
4. match the above hex(partnumber) to the 'onstat -k' tblsnum ( sixth
column ).
This is the lock.
-----------------------------------------------------------------------
Does anyone agree with this?
Steve Berg
Neuberger & Berman LLC