Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp
Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!ihnp4!ucbvax!decvax!decwrl!sun!rmarti
From: rmarti@sun.uucp (Bob Marti)
Newsgroups: net.database
Subject: Re: IBM DB2 lacks record locking
Message-ID: <2953@sun.uucp>
Date: Thu, 31-Oct-85 16:25:52 EST
Article-I.D.: sun.2953
Posted: Thu Oct 31 16:25:52 1985
Date-Received: Sun, 3-Nov-85 06:30:02 EST
Distribution: net
Organization: Sun Microsystems, Inc.
Lines: 22

> >From Datamation, October 15 issue, page 13:
>
> "... Notably absent so far from [DB2] has been an effective record-level
> locking feature that is critically important for performing simultaneous
> updates to a single database."
>
> And we thought that only Unix DBMS's had problems with record locking :-)

According to Chris Date's book "A Guide to DB2", DB2 does implicit record-
level locking inside transactions.  It turns out, however, that depending
on some "lockable unit" system parameter, locking a record implies one of
the following:
  - locking of the page where the record is physically stored
  - locking of the tablespace (a set of tables defined by the DBA) to which
    the record belongs
The parameter can be set to PAGE, TABLESPACE, or ANY.  In the latter case,
DB2 decides for itself what it thinks is best for a given access plan.

If you want to know more about locking in DB2 see chapter 11 in Date's DB2
book.

--Bob Marti   {decvax, ucbvax, seismo}!sun!rmarti