Locks
Posted in 1994
In Message-Id: <Pine.3.89.9407060806.A22251-0100000@dev.jcdc.eta.gov>
paulw@dev.jcdc.eta.gov writes:
> Currently we are run On-line 5.01 under AIX 3.2.4(?), and every now and
> then we get an error indicating a table/row is locked. Is there any easy
> way to view who has what currently locked in the system?
>
> ------------------------------------------------------------------------------
> Paul Watje SPAMIS Data Center
> paulw@spamis.jcdc.eta.gov Largest Informix Shop
> Voice: (800) 598-5008 in San Marcos, TX
> FAX: (512) 396-6600
Sort of. You can tell who has locks, and the type of lock held using the
tbstat utility.
$ tbstat -u <-- who is logged on
$ tbstat -k <-- who is holding locks, xreference user address
Are you using row locking or page locking? Page locking will lock whatever
happens to be on that page, and may lock something that another process needs.
For that reason we use row locking data tables, and increase (vastly) the
number of locks (using tbmonitor.) It may be appropriate to set the locking
level to "dirty read", or to wait x time, depending on the application.
See the tbstat description in the OnLine Administrator's Guide.
Another way is to generate log file output from your user's process every time
it places a lock. Then you can monitor the status of who has exactly what.
Good luck,
__________________________________________________________________
| Clem Akins Standard Disclaimers Apply |
| Reynolds Metals Co. "Climb High, Cave Deep!" |
| Muscle Shoals, Alabama USA cwakins@leia.rmc.com |
| or maybe cwakins@leia.alloys.rmc.com, or jabba.alloys.rmc.com, |
| or ...hell just put it in a bottle and throw it in the river! |
|________________________________________________________________|