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

Home -> Community -> Usenet -> c.d.o.misc -> Re: What constitutes a Transaction ?

Re: What constitutes a Transaction ?

From: Tim Rogers <timr_at_dircon.co.uk>
Date: 1996/12/19
Message-ID: <32B8FB2A.25C@dircon.co.uk>#1/1

Dave Young wrote:
>
> Hello, I am trying to confirm or deny exactly when a begin work and commit work
> actually takes place

When you first connect to the database you have started a transaction. The transaction ends (and a fresh one starts) when either you COMMIT WORK or ROLLBACK WORK. When you ROLLBACK everything you've done since the previous ROLLBACK or COMMIT (or since you connected to the database if you haven't yet issued a ROLLBACK or COMMIT) is rolled back.

When planning where to put COMMITs you should ask yourself what you'd want to happen if someone accidentally pulled the plug - how much of the data you've changed would you want to keep or discard? Quite often if you're manipulating data in a number of different tables you don't want a partially populated data structure, so you'd only COMMIT at the very end, safe in the knowledge that if you encounter an error the whole lot will be rolled back leaving nothing. Received on Thu Dec 19 1996 - 00:00:00 CST

Original text of this message

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