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: DBMS_TRANSACTION.USE_ROLLBACK_SEGMENT question

Re: DBMS_TRANSACTION.USE_ROLLBACK_SEGMENT question

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Fri, 09 Nov 2001 15:29:39 +0000
Message-ID: <3BEBF663.59EE@yahoo.com>


Anonymous wrote:
>
> Mark,
>
> I think I have something wrong in my procedure. I am using Forms 4.5
> and have a button with when-button-pressed trigger:
>
> DBMS_TRANSACTION.USE_ROLLBACK_SEGMENT('invalid_rollback_segment');
>
> when I press this button, no error message return. However, when I add
> exception handler, error message return.
>
> Thanks for your help.
>
> David
>
> mark.powell_at_eds.com (Mark D Powell) wrote in message news:<178d2795.0111070927.4c7b1f25_at_posting.google.com>...
> > mail_for_deja_at_yahoo.com (Anonymous) wrote in message news:<8ee5d7c9.0111062339.6485c45_at_posting.google.com>...
> > > Hi all,
> > >
> > > I am using DBMS_TRANSACTION.USE_ROLLBACK_SEGMENT to assign a
> > > particular rollback segment for a transaction. However, I found that
> > > even I specify a non-exist rollback segment to this function, there is
> > > no error message return. How can I check whether the rollback segment
> > > passed to this function is a valid rollback segment?
> > >
> > > Thanks,
> > > David
> >
> > David, how are you calling this Oracle provided package procedure?
> > What version of Oracle are you running against?
> >
> > Observe (version 8.1.7.2):
> > UT1> @test1
> > UT1> set echo on
> > UT1> set serveroutput on
> > UT1> declare
> > 2 v_rc number := 0 ;
> > 3 begin
> > 4 DBMS_TRANSACTION.USE_ROLLBACK_SEGMENT('ROLL01');
> > 5 v_rc := SQLCODE ;
> > 6 dbms_output.put_line('The Return Code was '||v_rc);
> > 7 end;
> > 8 /
> > The Return Code was 0
> >
> > PL/SQL procedure successfully completed.
> >
> > UT1> rollback;
> >
> > Rollback complete.
> >
> > UT1> @test1
> > UT1> set echo on
> > UT1> set serveroutput on
> > UT1> declare
> > 2 v_rc number := 0 ;
> > 3 begin
> > 4 DBMS_TRANSACTION.USE_ROLLBACK_SEGMENT('ROLL51');
> > 5 v_rc := SQLCODE ;
> > 6 dbms_output.put_line('The Return Code was '||v_rc);
> > 7 end;
> > 8 /
> > declare
> > *
> > ERROR at line 1:
> > ORA-01534: rollback segment 'ROLL51' doesn't exist
> > ORA-06512: at "SYS.DBMS_TRANSACTION", line 65
> > ORA-06512: at line 4
> >
> > If would appear to me that Oracle does issue an error, which I could
> > trap and use to make a decission from.
> >
> > -- Mark D Powell --

See if you have an ON-ERROR trigger in the form which is catching the error (and doing nothing with it)

hth
connor

-- 
==============================
Connor McDonald

http://www.oracledba.co.uk

"Some days you're the pigeon, some days you're the statue..."
Received on Fri Nov 09 2001 - 09:29:39 CST

Original text of this message

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