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: SAVEPOINT... ROLLBACK question

Re: SAVEPOINT... ROLLBACK question

From: Hans Forbrich <forbrich_at_yahoo.net>
Date: Thu, 04 Dec 2003 15:58:17 GMT
Message-ID: <3FCF5970.3BEF58ED@yahoo.net>


Ubiquitous wrote:
>
> Daniel Morgan <damorgan_at_x.washington.edu> wrote:
>
> : You don't provide enough information but ...
> :
> : create table test (
> : testcol varchar2(10));
> : SQL> savepoint a;
> : Savepoint created.
> : SQL> insert into test values ('A');
> : 1 row created.
> : SQL> savepoint b;
> : Savepoint created.
> : SQL> insert into test values ('B');
> : 1 row created.
> : SQL> rollback to a;
> : Rollback complete.
> : SQL> select count(*) from test;
> : COUNT(*)
> : ----------
> : 0
> : What do yo think it should be doing?
>
> That's what I am expecting to happen, but when I call the rollback statement,
> it doesn't roll all the way back to SAVEPOINT A. I suspect there's a commit
> in the stored procedure step, but wouldn't using ROLLBACK TO A override it?
>
> What would happen if it didn't include the CREATE TABLE statement and
> started with SAVEPONT A instead? I'll have to experiment some more.
>

Are there any DDL operations in the middle - all DDL (CREATE, ALTER, DROP ...) have an implied commit! Received on Thu Dec 04 2003 - 09:58:17 CST

Original text of this message

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