Re: Locked Tables
Posted in 1995
In article <45j8v1$7ld@cssun.mathcs.emory.edu>, ryeardly@eurobrok.co.uk says:
>
>Can anybody tell me how to find which user is accessing
>a table using Online V5.04.
>
You need to do a sequence of things;
1 - On the database in question run this select statement
in dbaccess or isql
select tabname,hex(partnum) from systables where tabid > 99
order by tabname
print out the result.
2 - When the mystery user is locking you out of the table do a
tbstat -k
the col in this output marked tblsnum (3rd in from the right )
will match the hex(partnum) from 1 above
For the table you are interested in note the owner of all
locks shown. Ignore any locks begining with an I eg IX locks
The owner is identified by the number in the 3rd col from
the left.
3 - Do a tbstat -u and check the left most col to match the owner
you got from step 2 - and on the same line you will find
the PID and user name of the culprit
This works, but nobody has ever called it user friendly :->
It is worth getting to know tbstat for all those uncomfortable
moments when you would really rather be somewhere else.