Re: concurrency problems
Posted in 1991
Topics: Migration, Import/Export & Data Conversion
Tony:
The following is the correct syntax:
ALTER TABLE foo LOCK MODE (ROW);
or
ALTER TABLE foo LOCK MODE (PAGE);
This is documented in the OnLine Programmer's Manual on page 102. An example
is given on page 106.
scottm
--------------------------------------------------------------------------
From uunet!rmy.emory.edu!informix-list-owner Thu Sep 26 21:40:55 1991
Received: from informix.com (infmx) by washington. (4.0/SMI-4.0)
id AA04527; Thu, 26 Sep 91 21:40:52 EDT
Received: from uunet.UUCP by informix.com (4.1/SMI-4.1)
id AA16167; Thu, 26 Sep 91 18:40:32 PDT
Received: from rmy.rmy.emory.edu by relay2.UU.NET with SMTP
(5.61/UUNET-internet-primary) id AA07260; Thu, 26 Sep 91 20:52:29 -0400
Received: from csslc.rmy.emory.edu by
rmy.rmy.emory.edu (5.65/Emory_rmy.3.2.6) via SMTP
id AA22464 ; Thu, 26 Sep 91 20:52:14 -0400
Return-Path: informix-list-owner@rmy.emory.edu
Received: from Gateway.DHL.COM by
rmy.rmy.emory.edu (5.65/Emory_rmy.3.2.6) via SMTP
id AA12669 ; Thu, 26 Sep 91 16:44:29 -0400
Received: by gateway.DHL.COM id aa19899; 26 Sep 91 13:41 PDT
Received: from moses by gateway.DHL.COM id aa19820; 26 Sep 91 13:32 PDT
Received: by moses.lhr-sys.ssf-sys.DHL.COM
(5.61/1.8) id AA29947; Thu, 26 Sep 91 21:34:11 +0100
From: Tony Heskett <uunet!lhr-sys.ssf-sys.DHL.COM!theskett>
Subject: Re: concurrency problems
To: informix-list@rmy.emory.EDU
Date: Thu, 26 Sep 91 21:34:10 GMT-0:00
In-Reply-To: <9109251518.AA21081@washington.>; from "A. Scott Myers SSE" at Sep 25, 91 11:18 am
X-Mailer: ELM [version 2.2 PL15]
Message-Id: <9109261332.aa19820@gateway.DHL.COM>
X-Informix-List-Id: <list.454>
Status: R
Scott Myers writes (re concurrency problems) :
> These errors are probably associated with trying to access rows that are
> locked by another user.
>
> When you create tables with OnLine, the default is to use page level locking
> (page size is typcially 2K bytes). To get row level locking you must
> explicitly specify in your CREATE TABLE statement. If you are using page
> level locking for the tables associated with these errors, you can use the
> ALTER TABLE statement to change them to row level locking which should
> reduce or eliminate concurrency problems.>
> Scott Myers - Informix (uunet!infmx!scottm)
I've never been able to get these to work:
ALTER TABLE foo LOCK MODE ROW;
ALTER TABLE foo LOCK MODE PAGE, ROW;
Eventually I give up and do an ASCII unload, drop, create (lock
mode row) and reload.
What am I doing wrong ? The manual and '?' when on "New" in isql
both give the syntax as above, so far as I can see ...
(Versions I just tried are isql 4.00.UE1, Online 4.00.UE3 on a Fuji,
isql 2.10.03K, Online 4.00.UH1 on a Pyramid).
PS. Thanks to DAS for offering some *MUCH* better get_key() stuff.
--
Cheers - Tony.
____________________________________________________________________________
Tony Heskett: theskett@lhr-sys.ssf-sys.dhl.com | Vox: (+44) 81 747 8330
DHL Systems : Kings House, Great West Road, TW8 9HS | Fax: (+44) 81 747 0875