Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Autocommit

Re: Autocommit

From: Thomas J. Kyte <tkyte_at_us.oracle.com>
Date: 2000/04/24
Message-ID: <8e1kd6$gv2$1@nnrp1.deja.com>#1/1

In article <8e1jdi$fv3$1_at_nnrp1.deja.com>,   fcliffor_at_my-deja.com wrote:
> Oracle is not doing an autocommit the database is going through
> rollback segments and determining that some process wants to change
 the
> data so the next person who does a select gets the changed data even
> though it has not been commited yet.

You have that 100% backwards.

We goto the rollback segments to get the data as it existed BEFORE the transaction began. Oracle *never* serves up "uncommitted" data -- never.

We use rollback segments to provide read consistent views of the data. We would visit the rollback segments to retrieve the data as it appeared BEFORE the transaction changed it.

>If I remember correctly the
> second processs on the data should not be able to update the data.

that is correct.

> If
> the second process can change the data then the first process should
> get an error when they perform the commit on the data as the second
> process changed the data before the first process commited the data.
>
> In article <8e1c6l$8c5$1_at_nnrp1.deja.com>,
> Thomas J. Kyte <tkyte_at_us.oracle.com> wrote:
> > In article <8WLM4.907$Q_2.213055_at_carnaval.risq.qc.ca>,
> > "Mr.X" <pandore_at_itr.qc.ca> wrote:
> > > If there is no autocommit, why do when I insert data with a stored
 procedure
> > > without commiting, the data is available to other connections
> > > ???????????????
> > >
> >
> > I don't know -- why don't you give us some more information about
 the
> > tools you are using and the environment you are in.
> >
> > I can 100% assure you that *plsql does NOT autocommit*.
> >
> > I see you say:
> >
> > > > > P.S. : These are stored procedure whith formatted with HTML.
> >
> > So maybe I can assume you are using something like OAS and the plsql
> > cartridge. After each request OAS will commit since the web is
> > stateless. Each and every web page is a transaction. It is not
 that
> > plsql is commiting but rather that since no sessions are maintained
> > across web page requests -- your transaction is the web page.
> >
> > If you really want to, you can configure oas to maintain a session
> > state across web pages -- but you are configuring OAS, not plsql, in
> > this case. I would not recommend this as this is not the most
> > efficient way to use the web server.
> >
> > > Thomas J. Kyte <tkyte_at_us.oracle.com> a écrit dans le message :
> > > 8dvmn4$h01$1_at_nnrp1.deja.com...
> > > > In article <NptM4.838$Q_2.170979_at_carnaval.risq.qc.ca>,
> > > > "Mr.X" <pandore_at_itr.qc.ca> wrote:
> > > > > How can I disable the autocommit that is the default option in
 PL/SQL
 Oracle
> > > > > for a stored procedure ?
> > > > >
> > > >
> > > > there is no such feature. plsql does not ever "autocommit".
> > > >
> > > > various languages (microsofts api's almost always do due to
 their
> > > > locking mechanims) autocommit (eg: ODBC autocommits, JDBC
 autocommits).
> > > >
> > > > PLSQL does not autocommit.
> > > >
> > > > > I want to test the concurence and without disable this option
 a
 concurent
> > > > > stored procedure wait without sending an error message. I
 absolutly
 want
> > > > > this error message to threat it as a normal error.
> > > > >
> > > >
> > > > don't understand that statement at all.
> > > >
> > > > > P.S. : These are stored procedure whith formatted with HTML.
> > > > >
> > > > > Pat
> > > > >
> > > > >
> > > >
> > > > --
> > > > Thomas Kyte tkyte_at_us.oracle.com
> > > > Oracle Service Industries
> > > > http://osi.oracle.com/~tkyte/index.html
> > > > --
> > > > Opinions are mine and do not necessarily reflect those of Oracle
 Corp
> > > >
> > > >
> > > > Sent via Deja.com http://www.deja.com/
> > > > Before you buy.
> > >
> > >
> >
> > --
> > Thomas Kyte tkyte_at_us.oracle.com
> > Oracle Service Industries
> > http://osi.oracle.com/~tkyte/index.html
> > --
> > Opinions are mine and do not necessarily reflect those of Oracle
 Corp
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> >
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

--
Thomas Kyte                              tkyte_at_us.oracle.com
Oracle Service Industries
http://osi.oracle.com/~tkyte/index.html
--
Opinions are mine and do not necessarily reflect those of Oracle Corp


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Apr 24 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US