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

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle 8.1.7 ODBC can't see changes made by other process

Re: Oracle 8.1.7 ODBC can't see changes made by other process

From: Andrew Allen <ajallen_at_mailhost.det.ameritech.net>
Date: Thu, 20 Sep 2001 01:51:26 GMT
Message-ID: <3BA94BB8.3A912F87@mailhost.det.ameritech.net>


Michael Wernado wrote:
>
> Wrong! The writing process finished its transaction correctly. Any
> Process who is started after the inserting transaction can see the
> data, but not this one which was started just before the inserting
> transaction.
> Besides: With the Oracle 8.0.5 ODBC driver it works well - it seems to
> be a problem of the new oracle 8.1.7 ODBC driver or the MDAC.
>
> Michael
>
> "Jim Kennedy" <kennedy-family_at_home.com> wrote in message news:<Bf1q7.4808$JN.18807_at_news1.sttls1.wa.home.com>...
> > Let me guess, the process writing the data has not done a commit.
> > If the process writing the data has not done a commit (completed the
> > transaction) then the process reading the data won't see it.
> > This is normal.
> > Jim

all right. Let me try to explain it. Oracle, presents what we call a read consistent view of the data. This means that a query is GUARANTEED by Oracle to see the data the way it was at the moment in time when that particular query started. For example: 1. User opens a cursor to read data from table a 2. User starts reading the cursor one row at a time in a FOR. . . LOOP
3. Another user updates data in table a that our user, above is reading.
4. User will not see the changes made in number 3 because Oracle is guarantees a read consistent view of the data. That is, the cursor only sees committed data at the time it started executing.

Also. . .

  1. Query 1 updates data in table a
  2. Query 2 selects data from table a -- query 2 will not see the updates made by query 1 because query 1 had not committed the changes before query 2 started.
  3. Query 1 commits its changes to table a -- query 2 will still not see the updates made by query 1 because query 1 had not committed before query 2 started.
  4. Query 3 selects data from table a -- query 3 will see the changes made by query 1 because query 1 committed its changes before query 3 started.

The same applies to inserts and deletes.

Now if:
1. Query 1 updates data in table a
2. Query 2 updates the same data in table a -- query 2 will wait until query 1 commits.

-- 
Andrew Allen
Livonia, MI
E- Mailto:ajalle_at_ameritech.net
Received on Wed Sep 19 2001 - 20:51:26 CDT

Original text of this message

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