Re: Pro*C and Locking Mechanism

From: Michael Krolewski <vandra_at_u.washington.edu>
Date: Sat, 20 Mar 1999 01:26:52 -0800
Message-ID: <36F369DC.CFD3842E_at_u.washington.edu>


Dogan Cibiceli wrote:

> Hi,
> The question might be obvious to most but nevertheless I would like to
> know the answer. My question is about release and obtaining locks. When
> a Pro*C program starts to execute and acquires locks as it goes, does
> it hold all locks it acquired until it comes across a commit ? Let'say
> I have selected (NO Update OF Clause) some values from a bunch of tables
> and updated a bunch of tables, and inserted and deleted some stuff. I go
> on in this manner. This module will hold all the locks it acquired from
> the start until I issue a commit. Is that right ? Thanks in advance :)
>
> Dogan

  Dogan:

    It is probably overstating your problem. Generally anyone doing anything in
Oracle does not think in terms of locks. The locking of rows is automatic and
part of the underlying Oracle db support.

Generally, most people work with autocommit on. Thus each statement is commited as it is executed. One can remove the autocommit and use an explicit transaction start and end point inconjunction with commits.

Mike Krolewski Received on Sat Mar 20 1999 - 10:26:52 CET

Original text of this message