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: Mark D Powell <mark.powell_at_eds.com>
Date: 7 Nov 2001 09:27:00 -0800
Message-ID: <178d2795.0111070927.4c7b1f25@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.

Received on Wed Nov 07 2001 - 11:27:00 CST

Original text of this message

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