Re: how to commit one command in a transaction ?

From: Eric Bole-Feysot <ebole_feysot_at_bigfoot.com>
Date: Fri, 24 Apr 1998 09:04:25 GMT
Message-ID: <35405364.1306511374_at_seaquest>


On Thu, 23 Apr 1998 09:41:11 -0700, "Kevin P. Fleming" <kfleming_at_access-laserpress.com> wrote:

>You need to use SAVEPOINTs, which allow you to rollback only to a
>specific point in the transaction.

Hi Kevin

I already looked at savepoints, but it doesn't do what I want ... look:

 insert into logs values ('I do that');
 SAVEPOINT sp1;

 insert...(1)
 update..(2)
 insert..(3)

 insert into logs values ('and that');
 SAVEPOINT sp2;
 insert... ( suppose it crashes )

         rollback to what ?
         insert into logs value(error);
         commit;
 

As you can see, If I rollback to sp1, I loose my second log and If I want my two entries logs, I must rollback to sp2, but it commits commands 1, 2 and 3.

I need, in fact, something to say to Oracle : Hey, I know I'm in transaction, but please consider the folowing statement ouside current transaction and commit him alone, but don't touch actual transaction cause it's not finish yet..

  • Eric -
  • Eric -
*----------------------------------------------------------*
Bole-Feysot Eric - BOBST SA - Switzerland

ebole_feysot_at_bigfoot.com (remove underscore to reply)

*----------------------------------------------------------*
Received on Fri Apr 24 1998 - 11:04:25 CEST

Original text of this message