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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Rollback

Re: Rollback

From: Bob Fazio <rfazio_at_home.com.nospam>
Date: 2000/06/02
Message-ID: <ZvQZ4.229802$Tn4.2040251@news1.rdc2.pa.home.com>#1/1

No, but.

Attached is a script that will give you a select by rowid for a table by creating rowid ranges based upon the number of extents that you have on the table. This can be modified to do updates. Note it isn't perfect, but it's better than anything else that I have used. P.S. I changed it slightly, there may be a syntax issue since I haven't actually tested it as written:

declare
cursor c1(o varchar2,s varchar2) is select obj.data_object_id,e.owner,e.segment_name,e.relative_fno,e.block_id,e.blocks from dba_extents e,dba_objects obj

        where e.owner=o and segment_name=s and obj.owner=o and obj.object_name=s and obj.object_type=e.segment_type; start_rowid rowid;
end_rowid rowid;
begin

        for x in c1('&schema_owner','&table_name') -- change table
        loop
        start_rowid:=

dbms_rowid.rowid_create(1,x.data_object_id,x.relative_fno,x.block_id,0);

end_rowid:=dbms_rowid.rowid_create(1,x.data_object_id,x.relative_fno,x.block _id+x.blocks-1,65535);

        dbms_output.put_line('select count(*) from '||x.owner||'.'||x.segment_name||' where rowid between ');

        dbms_output.put_line(' '''||start_rowid||''' and '''||end_rowid||''';');

      dbms_output.put_line('');
        end loop;

end;
/
--
Robert Fazio, Oracle DBA
rfazio_at_home.com
remove nospam from reply address
http://24.8.218.197/
"Dmitry Likane" <dmitry_at_bigpond.com> wrote in message
news:%pHZ4.3386$Hz.26184_at_news-server.bigpond.net.au...

> Hi all,
>
> Is there any way to switch rollback off for a huge UPDATE/DELETE? It blows
> my rollback segment.
>
> Thanks,
> Dmitry
>
>
Received on Fri Jun 02 2000 - 00:00:00 CDT

Original text of this message

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