Re: Locks which survive COMMIT

From: Jan-Peter Meyer <jan-peter.meyer_at_scg.de>
Date: 1995/06/09
Message-ID: <3r8s0a$j17_at_horus.mch.sni.de>#1/1


p0070621_at_brookes.ac.uk (Tommy Wareing) wrote:
>Does anyone have any suggestions on how to perform a COMMIT without releasing
>a lock?
>
>I'm currently writing a program using PRO*C which updates the database.
>
>For speed, I want to only read from the database once. So I load some of the
>reference tables into memory when the program starts up, and put a share lock
>on the entire table to ensure consistant data.
>
>But when I've finished processing a 'chunk' (a person in fact), I want to
>write the necessary changes back to the database, and COMMIT them so that
>other processes can see these changes. Unfortunately, this releases the
>lock on my reference table.

Try using two connections. One two read and hold your lock, one to do your updates and commits.

>
>--
> _________________________ __________________________________________
>/ Tommy Wareing \ / I've been looking for an original sin, \
>| p0070621_at_brookes.ac.uk X One with a twist and a bit of a spin |
>\ 0865-483389 / \ -- Pandora's Box, Jim Steinman /
> ~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
Received on Fri Jun 09 1995 - 00:00:00 CEST

Original text of this message