Want to decrease size for ROLLBACK Segments

my database is oracle8i. Previous DBA increased rollback size to 18GB. i need space on my unix box.
i want to reduce size of rollback segment and utilized this space for other purpose.
This is my stats
Tablespace Name FILE_NAME SIZE IN MB
ROLLBACK /u01/rbsdata/rbs01.dbf 5000
ROLLBACK /u01/rbsdata/rbs02.dbf 5000
ROLLBACK /u01/rbsdata/rbs03.dbf 6000
There are 12 rollback segments allocated to him
SEGMENT_NAME FILE_NAME SIZE
rbs0 /u01/rbsdata/rbs01.dbf 5000
rbs12 /u01/rbsdata/rbs01.dbf 5000
Now Could any one suggest to reduxe size with best performing and not affected my production database.
Thanks
Chetan

Hi Chetan,
You can adapt the following script as per your needs. It will search for all rollback segments other than 'SYSTEM' and construct the sql order to reduce the size of each rollback segment.
connect user/*******@test
SET SERVEROUTPUT ON size 50000
SET HEAD OFF FEEDBACK OFF VERIFY OFF
SPOOL D:\shrink.sql
BEGIN
     -- RBS to be shrinked
     FOR toto IN (select Segment_Name from DBA_SEGMENTS
where Segment_Type = 'ROLLBACK'
and segment_name not in 'SYSTEM')
     LOOP
          DBMS_OUTPUT.PUT_LINE('alter rollback segment '||toto.Segment_Name||' '||'shrink to 60M;');
     END LOOP;
END;
SPOOL OFF
SET HEAD ON FEEDBACK ON VERIFY ON
spool d:\shrink.log
select to_char(sysdate, 'dd/mm/yyyy hh24:mi:ss') "Shrinked" from dual;
@D:\shrink.sql
spool off
Exit
R.Tirou

Similar Messages

  • OPTIMAL size for rollback segment in Oracle 8i

    In our Database we have 13 Rollback segments & total size of all rollback segments is 33gb.
    Used % it is showing 99.84%.
    each rollback segment having near around 4gb of size.
    I am in confusion to set OPTIMAL value for each rollback
    segment.
    can any one help me out reg this.
    My roll back seg statistics are as fallows:
    SEGMENT_NAME TABLESPACE_NAME WAITS SHRINKS WRAPS STATUS
    R00 SYSTEM 0 0 12 ONLINE
    RBS0 RBS 0 0 19 ONLINE
    RBS01 RBS 0 0 16 ONLINE
    RBS02 RBS 1 0 12 ONLINE
    RBS03 RBS 0 0 11 ONLINE
    RBS04 RBS 0 0 21 ONLINE
    RBS05 RBS 1 0 22 ONLINE
    RBS06 RBS 0 0 16 ONLINE
    RBS07 RBS 0 0 15 ONLINE
    RBS08 RBS 0 0 12 ONLINE
    RBS09 RBS 1 0 19 ONLINE
    SEGMENT_NAME TABLESPACE_NAME WAITS SHRINKS WRAPS STATUS
    RBS12 RBS 0 0 13 ONLINE
    RBS13 RBS 0 0 18 ONLINE
    SYSTEM SYSTEM 0 0 0 ONLINE

    Aman,
    Definitely that would be a great approach to share the knowledge; but right now my notes are still in the shape of notes only; i have'nt tested them. I simply read forum and asktom and whenever i found good lines i copy and paste them and whenever i found the similar question in the forum i paste / repharase there in my own language and understanding (because till then i have tested and learnt them very well.)
    Although i am highly obliged by your suggestation; let me that much knowledgable; so that i may run my own blog...!
    Regards
    Girish Sharma

  • Quick Cleanup of Temporary Segments and also for  Rollback Segment

    Do you know a tip allowe to do a quick
    Cleanup of Temporary Segments and also for Rollback Segment; same time we
    need to wait about 2 hours to cleanup these tablespaces.
    we have to take action immediately to prevent other sessions to fail as well
    and we cannot bounce the Oracle instance. So, how do we get rid of this
    temporary segment as quickly as possible?
    Rq: the shrink commande same time not cleanup Rollback Segment, i don't know why (Ex:Alter rollback segment R01 shrink; )
    Thank you

    According to my knowledge the rollback tablespace can not be cleanup as you want because in the rollback segments are the transactions without commit and because of that you can not do that. The Rollback tablespace cleans up itself when pending transactions make commit.
    [email protected]
    Joel P�rez

  • How to get the size of rollback segments

    Hi,
    on which oracle table can I see which are the rollback segments and its own size?
    Thanks!

    doc questions like this one are best answered by querying the view DICT which is present in every release of Oracle (and which you of course -again- fail to mention)
    Sybrand Bakker
    Senior Oracle DBA

  • How can I use ken burns end transition frame to set cropping size for next segment?

    I am trying to figure out how to trivially take a large frame view, in a clip, and use a Ken Burns transition to "zoom" into a new view, and then grab the ending "frame" location and size and set that as the clipping rectangle in the next segment.  It seems like I should be able to just select the end fram view, type CMD-C to copy, and then select the next segment, choose "Clip", and type CMD-V to paste that "rectangle" as the clip.  This doesn't work, so I am looking for another way.  There's nothing in the popup menus or the main menus that I can find.
    Is this possible?

    I am afraid there is no easy way to this with Ken Burns. A better way may be to animate the Crop tool instead, using keyframes.

  • How can I avoid using rollback segment for batch updates.

    I am currently trying to avoid associating a large amount of space for rollback segment as this gets filled up only during the nightly batch updates. All that space will never be used during the day. Hence want to know if there is any way of avoiding the use of rollback segment at the session level.
    Rajesh

    No, but what you can do is create a large rollback segment to use with your batch job, at the start of your batch job bring the segment online, then use set transaction to use that rollback segment, when the batch job is finished and committed, you can then bring the rollback segment offline.
    If you are really pressed for space, as an alternate plan, you could actually create the large segment before the batch job and drop it after.

  • Rollback segments using UNDO Tablespace?

    First, I created a database for a vendor with an Undo Tablespace UNDOTBS. Then the vendor requested me to create rollback segments instead. So I created a new tablespace RBSTBS just to hold these segments. When I tried to create the rollback segment using the newly created tablespace RBSTBS, it complained that I am not allowed to use non-system tablespaces.
    So instead, I used the Undo tablespace UNDOTBS to hold the rollback segment. It worked.
    Am I really allowed to use the UNDO tablespace to hold rollback segments? Can't I use normal tablespaces for rollback segments?
    Another thing, the vendor wanted me to create rollback segments of 200MB each. Where do I set this while creating the rollback segment? Is this the INITIAL, NEXT, or OPTIMAL size?
    I know that Oracle recommends using UNDO rather than rollback segments. Is there any advantage in using traditional rollback segments?
    Thanks for any help!

    Advantage with rollback segment is you can force your transaction to use any specific rollback segment, where as with undo you don't have any control. Oracle does it for us.
    Thanks and Regards,
    Satheesh Babu.S
    Bangalore.

  • How to increase rollback segment

    hi,
    I am using oracle8i in solaris
    I got a situation to increase rollback segment but i dont know how to do so?
    can any one help me in solving this..........
    I also want to know wat is the maximum max_extents size we can keep.....
    This is my rollback segments
    SQL> select segment_name, max_extents,TABLESPACE_NAME FROM dba_rollback_segs;
    SEGMENT_NAME MAX_EXTENTS TABLESPACE_NAME
    SYSTEM 121 SYSTEM
    RBS 121 SYSTEM
    RBS1 121 RBS
    RBS2 121 RBS
    RBS3 121 RBS
    RBS4 121 RBS
    RBS99 32765 RBS1
    7 rows selected.
    With Regards
    Boo

    If you have metalink access, there are really couple of good notes on how to tune and create optimal rollback segments.
    Rollback Segment Configuration Tips Doc ID:      Note:69464.1
    Regarding the size of the rollback segment, it is depends on the nature of the application and the transaction size, whether short transaction or lenghty transactions.
    If oltp with very small transaction, create rollback segment with very small value and make minextents 20, so that you dont need to have recursive call to create extents initially.
    ORA-01628: max # extents (121) reached for rollback segment RBS1Make the extent unlimited.
    ALTER ROLLBACK SEGMENT RBS1
    STORAGE ( MAXEXTENTS UNLIMITED)
    2) how many rollback segment can we hav?1 rollback segment = 4 concurrent transactions.
    Now you decide, how many concurrent transaction do you have.
    .3) what is the maximum extent size we can set?I would recommend to set the extent size according to nature of your application.
    <<1) if there is more than one rollback segment in that, i want to know which one is active how to know this....... where to check this.........
    SELECT r.name "RB NAME ", p.pid "ORACLE PID",
    p.spid "SYSTEM PID ", NVL (p.username, 'NO TRANSACTION') "OS USER",
    p.terminal
    FROM v$lock l, v$process p, v$rollname r, v$session s
    WHERE l.sid = s.sid(+)
    AND s.paddr = p.addr
    AND TRUNC (l.id1(+)/65536) = r.usn
    AND l.type(+) = 'TX'
    AND l.lmode(+) = 6
    ORDER BY r.name;
    Jaffar

  • Rollback segment error ORA-1628

    Hellow
    Currently we are working on Oracle 8i database.The database contain spatial data around 10GB.We have a tablespace RBS containing 4 rollback segments. The issue is whenever we try to insert spatial data we get this error message (in the alert file)
    ORA-1628: max # extents 121 reached for rollback segment R01
    Failure to extend rollback segment 2 because of 1628 condition
    FULL status of rollback segment 2 cleared.
    I extended the size of RBS tablespace by adding another datafile, but still it doesn't help.
    Also i found that RBS tablespace is marked as PERMANENT...it means the rollback data does not get flushed out periodically?Also Should this tablespace be temporary? How can i counter this problem?
    Regards
    Sam

    Hi,
    01628, 00000, "max # extents (%s) reached for rollback segment %s"
    // *Cause:  An attempt was made to extend a rollback segment that was
    //          already at the MAXEXTENTS value.
    // *Action: If the value of the MAXEXTENTS storage parameter is less than
    //          the maximum allowed by the system, raise this value. => Alter your RBS and allow more than 121 extents to be created in this RBS.
    Also i found that RBS tablespace is marked as PERMANENT.Yes, it's normal.
    ..it means the rollback data does not get flushed out periodically?No
    Also Should this tablespace be temporary? No, this can't be
    How can i counter this problem?Free advise: RTFM about Rollback Segments! Start here (8i doc) or read the Concepts book.
    Regards,
    Yoann.

  • Which rollback segment ???

    rdbms 9207
    is there a way to tell which rollback segments a process used after it has been executed. i have a script that will give me some good info on rbsegs during execution but that's not what i want. i have a process running for more than an hour that is using "set transaction use rollback segment rbsxl;" it does several commits and then issues the set stmnt after every commit. anyway... problem is... sometimes it blows up because it grabs a different rollback segment which are all smaller than rbsxl. sqltrace hasn't seemed to help. statspack?? oem?? any ideas??
    would love to know where it's grabbing this other rbseg. even a mod to the program to output the current rbseg would be nice.... just don't know how.
    thanks
    -doug-

    Hmm...some thoughts:
    1.) Since you're on 9.2, why not moveto AUM? Much easier to deal with.
    2.) If you want to stick w/ conventional rollback segments, you ought to make sure they are equisized (governed by optsize) and are able to grow enough to fit your needs (based on free space in the rollback segment tablespace).
    3.) If you really want to just see what's going on w/ the code, try a 10046 trace. Everything should be captured there, including all 'set transaction use rollback segment' statements, and it may help you identify if there are any commits that are not followed by a 'set transaction use rollback segment' statement. My guess is that after one of the commits, you missed a 'set transaction ...' statement.
    Hope that helps,
    -Mark

  • Rollback segment issue in oracle8i

    We are having 33GB size of Rollback segment , it is not coming down even after when the database get bounced.
    Even the transactions are not happening also it is showing same value and it is not coming down.
    My question is after transaction get over whether rollback segment is deallocated or not?
    Please explain in detail , how to deallocate those unused rollback segments.

    we dont have any distributed transactions.
    can u tell me is there any formula to set OPTIMAL value for roll back segments.
    please tell me the dependencies,
    & i have some more quries....
    1. If we shrink the rollback segment, will it grow later on when the transactions are going high???
    2.If we shrink through OEM, automatically oracle is shrinking that perticular RBS.
    here my doubt is on which basis Oracle is shrinking that RBS.
    Please give info,, in detail...

  • General - rollback segments

    Been reading manuals, I have few question to clarify about rollback segments ( Lets leave undo tablespace and automatic undo management aside )
    1) Rollback segments can be created in a tablespace - is there a max size/limit which could be specified for a rollback segment to use within a tablespace? - From reading manuals, the storage clause doesnt mention about max size/limt for a rollback segment; is it possible for rollback segment to fill-up tablespace (ummm due to some wired query[read consistency]/transaction) ?
    2) We can create a separate rollback tablespace and have multiple rollback segments.
    If there are 3 user tablespaces (T1/T2/T3), 1 rollback tablespace (RT).
    - I create 1 rollback segment in tablespace T1, T2, T3
    - I create 2 rollback segments in rollback tablespace RT
    A user with "default tablespace T1" when running a transaction, which rollback segment will be used by this user (when rollback segment is not explicitly specified)?
    Oracle-Student

    user11359766 wrote:
    Will the transaction spill over to the second rollback segment (i.e start using the 2nd rollback segment which is available and not being used by any other active transaction) or oracle will return an error since the first rollback segment assigned is filled up and the transaction is still active?This will be applied to both SMU and MMU.
    From the same link above,
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96524/b_deprec.htm#634941
    For the duration of a transaction, the associated user process writes rollback information only to the assigned rollback segment.I hope its self explanatory that the transaction can't roll over to any other roll back segment once its own gets out of space. In teh case of SMU also, if the undo datafile can't grow, your transaction would be stopped.
    HTH
    Aman....

  • Unable to extend rollback segment 0

    I'm migrating a 7.3.4 database to 8.0.5 using MIG80 and i get messages:
    ora-01562 Unable to extend rollback segment 0
    ora-01528 max # extents <121> reached for rollback segment system
    My tablespace system's original size is 120M, now I have it grown to 400M, also have my rbs tablespace grown to 200M, I'm using MULTIPLIER=30, i've migrated 2 databases same sized but this time does'n work.
    Can you help me?
    I4m kind of hurry, i have to migrate 7 databases by august 25.
    Thanks

    Dear friend
    Create rollback segment with large
    in size.
    sql> set transaction use rollback segment 'Name of the roll'
    suresh
    null

  • Rollback segment error

    Hello experts,
    My problem is as follows:
    I need to perform a large transaction on one of my tables in my
    database. I have to delete a large number of records using a
    command as follows:
    Delete from mytable where ordernumber like '2000%';
    Each time i launch this command i have the following error:
    ERROR at line 1:
    ORA-01562: failed to extend rollback segment (id = 3)
    ORA-01628: max # extents (30) reached for rollback segment R03
    I know that i have a problem with my rollback segment. I have
    thus created a large rollback segment so that my transaction can
    use it.
    I don't know how to tell my transaction use the large rollback
    segment that i created.
    (i know there is a command called set transation user rollback
    segment large_rs1, i have tried it on sqlplus. it gives me
    error: ORA-01453: SET TRANSACTION must be first statement of
    transaction)
    Please help
    thanks in advance for a reply
    Kind regards
    Yogeeraj

    First, you have to create a bigger rollback segment (i.e. RBBIG).
    Then, before each query, you must type:
    set transaction use rollback segment rbbig;
    This will force the use of the specified rollback segment.
    Hope this helps.

  • Error rollback segment - urgent

    hi
    i have created locally managed tablesspace and in init.ora file i have sent unto management as manual as our application needs to specify rollback segments
    when i created rollback segments and attached to a locally managed tablespace i am getting ora-01552 error
    i have also speecified names of rollback segment in init.ora file
    ERROR at line 1:
    ORA-01552: cannot use system rollback segment for non-system tablespace 'ROLLTBLS'
    can i not specify a rollback segment to locally managed tablespace
    regards
    Kedar

    the database is in open mode and the undo_management is set to manual. after i created the locally managed tablespace i ran the script for rollback segment refering to one of the above locally managed tablespace
    what other checks do i have to make for creating rollback segment.

Maybe you are looking for

  • Memory speed for HP Pavilion dv6-7051sa

    First time posting here - Can you tell me what speed memory this product comes shipped with. I have ordered one with 4gb, but I know it can be upgraded to 8gb. I see from the intel specs it supports 1066 and 1333mhz (non-ECC) memory I just need to kn

  • Content Server problem after 5.0.2 upgrade

    Hi, We've just upgraded our staging environment from 5.0.1 to 5.0.2 and have lost all branding. The diagnostic script reports the following error: ========== Community Branding Image Publishing Target : FAIL Settings Community Branding Image Publish

  • How do I change the Version Code in the Flash Android settings Android app market?

    I recently tried to update my app in the Android app market and when I uploaded it I got the following message: "The new apk's versionCode (1000000) already exists." In the Flash Adnroid settings I changed the version label but that did not help. So

  • Archiving xml messages in PI using DAS

    Hallo, I like to archive certain outbound messages in PI, this for security reasons. This means that a messages must be archived as soon as is enters the adapter, intergration server. Is this possible in PI our can I only archive messages which are l

  • Java httpservlet and php

    Hi. I'm trying to work out an interface in php for a java http servlet. But i have some problems when i try to redirect my response to the php page. Any idea how i can do this (or if i can do this)?