[AccessD] How does Access locking work

Jim Dettman jimdettman at verizon.net
Thu Sep 15 07:39:58 CDT 2011


Stuart,

  It's the server that holds the locks, not the clients.

  The .LDB file is an array of 255 64 byte slots, one for each user.  32
bytes for the computer name, 32 bytes for the username.  The .LDB file never
grows physically beyond 16k.

  Each slot is matched to the slot in the database header page, where two
bytes represent the operations the user is currently performing
(reading/writing, index update, etc).

  The clients place lock requests against the .LDB file.  By doing that, the
.MDB file is always free to be read/written by any client. Windows OS's (and
all others that I'm aware of) do not care if you try to lock part of a file
that doesn't exist.

Jim. 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan
Sent: Thursday, September 15, 2011 08:24 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] How does Access locking work

If it is stored in memory, how can multi-user/ server based BEs work?  

How can my workstation  read/write locks in the server's memory or the
memory on another 
workstation and/or how can they read my memory?   It must be physically
written somewhere 
accessible to all users such as the lock file.

-- 
Stuart

On 15 Sep 2011 at 7:47, Jim Dettman wrote:

> John,
> 
>   A lock is never written to disk.  It's completely stored in memory
>   (unless
> of course the OS starts paging to disk because it runs out of memory).
> 
> <<How do I speed that up.>>
> 
>   Faster processor and/or memory.
> 
> Jim.
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby
> Sent: Thursday, September 15, 2011 07:35 AM To: Access Developers
> discussion and problem solving Subject: Re: [AccessD] How does Access
> locking work
> 
> So what is a lock?  Something written to disk I assume?  Where? 
> Completely stored in memory? How do I speed that up.
> 
> John W. Colby
> www.ColbyConsulting.com
> 
> On 9/15/2011 1:51 AM, Drew Wutka wrote:
> > I think I have the old Jet white paper somewhere.  But basically Jet
> > would 'lock' the .ldb file where it needed to lock the .mdb.  So the
> > .mdb would never be locked (allowing for multiple edits), and the
> > lock on the .mdb would be actually on the .ldb file.
> >
> > So say the .mdb was 100 megs.  And it needed to lock the 50th
> > megabyte, the .ldb file was always small (I think it was 64 bits per
> > user, up to 255 users), so it would never reach the 50 meg size, but
> > the 'lock' would be placed on the 'virtual' 50 meg point of the
> > .ldb.
> >
> > Make sense?
> >
> > Drew
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 



-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list