Identifying users locking records

Everything about buying, using, and managing OpenVMS systems not covered by other sections
Post Reply

Topic author
pmcmahon
Visitor
Posts: 2
Joined: Thu Jul 16, 2020 4:33 pm
Reputation: 0
Status: Offline

Identifying users locking records

Post by pmcmahon » Thu Jul 16, 2020 4:40 pm

What's the best way to determine which user/process is locking an ISAM or relative file record? We've tried a few different standalone "view record locks" utilities, but we haven't had much success getting them to work or integrating them into our software. We have a DCL command file that performs a "SHOW DEVICE/FILES" of each mounted volume and parses the data to idenfity the PIDs accessing a particular file, but that won't tell us which process is actually locking a particular record. Is there an easy way to get this info?


gl
Visitor
Posts: 1
Joined: Fri Jul 10, 2020 11:29 am
Reputation: 0
Status: Offline

Re: Identifying users locking records

Post by gl » Wed Jul 22, 2020 1:13 pm

Hello

Have a look at blocking on the freeware v8

A utility to locate the holder of an RMS record lock that is blocking other processes

https://www.digiater.nl/openvms/freeware/v80/blocking/


Topic author
pmcmahon
Visitor
Posts: 2
Joined: Thu Jul 16, 2020 4:33 pm
Reputation: 0
Status: Offline

Re: Identifying users locking records

Post by pmcmahon » Wed Jul 22, 2020 2:03 pm

Thanks. That's one of the utilities we've tried in the past, but I ran into some issues when trying to use it for what we need. This version is for VAX or Alpha, and it doesn't appear to build on Integrity. It's possible that there's an updated version somewhere or that we could get it to work somehow, but even on Alpha it didn't encompass that we need.

If a file is opened exclusively, it gives an "%RMS-E-FLK, file currently locked by another user" error message. Ideally, we'd like to know who has the file locked, but we could work around that by using our "SHOW DEVICE/FILES" method. However, the bigger hurdle is that the utility requires us to know the key information of the locked record in order to see who has it locked. We rarely have that level of detail and I'm not 100% sure how that works with relative files (but I'm sure I could probably figure it out).

The scenario we're trying to address is when a user reports that their process is "stuck" and all we're able to determine is that they're likely spinning sequentially through a large file and have hit a locked record somewhere. We generally use a read wait method that waits until the required record has been freed up. It'd be a Herculean task to go through our whole system to identify every read, key read or sequential read, to trap the lock and throw the details somewhere we could view. As a result, we need a method that will tell us all the lock information for a particular file without knowing the exact record or records that are locked.

Post Reply