Different rollback segment used. why?

Hi. I am trying to use rollback segment RB6 in a delete process in a stored procedure using SET TRANSACTION USE ROLLBACK SEGMENT RB6;
However, when the procedure is called and performed, an error is thrown:
ORA-01562: failed to extend rollback segment number 2
ORA-01650: unable to extend rollback segment RB2 by 128 in tablespace my_table_space
If you notice, the error refers to segment RB2. I have not set RB2 as a rollback segment in this procedure. How is it possible? I am using RB6 and now it's throwing an error regarding RB2? Please help. Thanks.

It depends on where in the code you SET TRANSACTION, when you call the procedure, where delete transaction starts and where it ends. i.e does the delete part of the code run within that same windows?
The database can decide which rollback segment to use for different transactions.
BTW - What is your oracle release?

Similar Messages

  • Sql to find check Percent of Rollback Segment Used?

    I have the following queries to find information about rollback segments.
    I want the sql to find % of rollback segment used.
    --rollsegs.sql
    select SEGMENT_NAME, OWNER, TABLESPACE_NAME, SEGMENT_ID, status
    from dba_rollback_segs order by segment_name;
    select name, extents, writes, xacts, gets,waits, shrinks, aveactive, status
    from v$rollname n, v$rollstat s
    where n.usn = s.usn
    order by name;
    --rolbstat.sql
    select name, rssize, hwmsize "High", optsize "Opt", wraps, extends, shrinks,
    aveshrink "Aveshr", aveactive "Aveact"
    from v$rollname n, v$rollstat s
    where n.usn = s.usn
    order by name;
    set numformat 999999990;

    DrBurgs, there was a time when your session was assigned a rollback segment that rollback segment held all the updates performed by your session but by Oracle version 8.1 every transaction executed by your session could be assigned to a different rollback segment.
    So every 100,000 or whatever value of N use choose as your commit point could result in a different rollback segment being used. You can use v$rollstat and v$transaction to monitor rollback segment usage while the job is running.
    You stated that you had one rollback segment for every tablespace. There is no relation in Oracle between the number of tablespace and the number of rollback segments you should have.
    You should choose the number of rollback segments to create based on the expected user load and how large a transaction you need to be able to support. For manually defined rollback segments set the initial extent size and the next extent size equal with pctincrease = 0. Then set optimal to the size you would like each rollback segment to be. This size should be large enough that shrinks do not happen often but small enough that one segment that expands will not result in other rollback segments being able to extend. By using uniform extent size you guarentee that every free extent is usable by any other rollback segment that needs to extend.
    With a true warehouse you probably have very little update compared to your select load and the updates are probably load jobs. In this case you may need very few, very large rollback segments to handle the load.
    HTH -- Mark D Powell --

  • 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.

  • Creating rollback segments using PUBLIC

    One of our dba's dropped and recreated the 6 rollback segments ( 8i ) but didnt use the PUBLIC option. When the server was rebooted they came up as offline. Another dba did the same but used the PUBLIC option and they are now fine.
    I have looked through the ORacle docs on creating rollback segments and it doesnt seem to say that using the PUBLIC option is essential . I seems to think that u need to do this if using parallel server option.
    So what is the real truth ?
    George

    Private rollback segments need to be defined in init.ora.
    -Antti

  • 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

  • Forcing a specific rollback segment on a transaction does not seem to work

    Hi!
    We're using Oracle 9.2.0.5.0 on Sun Solaris and we're still configured to use Rollback Segments.
    We have an issue with Snapshot too old due to RBS too small on a long query I attach below for reference:
    set heading off
    set pagesize 0
    set feedback off
    set linesize 200
    <<<<< SET TRANSACTION USE ROLLBACK SEGMENT UMF_RBS_LARGE_TRAN; <<<<<
    SELECT ucms_cards.msisdn
    || ';;' || to_char(to_date(substr(ucms_cards.notes,14+length(ucms_cards.msisdn),19),'MM-DD-YYYY.HH24-MI-SS'),'DD/MM/YYYY HH24:MI:SS')
    || ';;' || to_char(ucms_batches.expiry_date,'dd/mm/yyyy')
    || ';;' || ucms_cards.serial_no
    || ';;' || ucms_cards.serial_no
    || ';;' || ucms_cards.batch_serial_no
    || ';;' || ' '
    || ';;' || CASE ucms_cards.card_status
    WHEN 'used' THEN '1'
    ELSE '0'
    END
    || ';;' || CASE WHEN date_booked_in is null THEN '01/01/1970 00:00:00' ELSE to_char(date_booked_in,'DD/MM/YYYY') || ' 00:00:00' END
    || ';;' || ' '
    from ucms_batches,ucms_cards, UCMS_EVENT_LOG
    WHERE ucms_cards.batch_serial_no = ucms_batches.serial_no
    AND ucms_cards.serial_no = substr(UCMS_EVENT_LOG.ENTITY_ID,11,length(UCMS_EVENT_LOG.ENTITY_ID)-9)
    AND UCMS_EVENT_LOG.PARTY_NO in (0)
    AND UCMS_EVENT_LOG.TIMESTAMP>=TO_TIMESTAMP(TO_CHAR(SYSDATE-1, 'DD-MM-YYYY') || ' 00:00:01', 'DD-MM-YYYY HH24:MI:SS')
    AND UCMS_EVENT_LOG.TIMESTAMP<=TO_TIMESTAMP(TO_CHAR(SYSDATE-1, 'DD-MM-YYYY') || ' 23:59:59', 'DD-MM-YYYY HH24:MI:SS')
    AND UCMS_EVENT_LOG.USER_ID LIKE 'SCP-AGENT1%'
    AND UCMS_EVENT_LOG.EVENT_TYPE_ID IN (1,2)
    AND UCMS_EVENT_LOG.ENTITY_TYPE_ID LIKE 'ucms_cards%'
    UNION
    SELECT ucms_imported_cards.msisdn
    || ';;' || to_char(to_date(substr(ucms_imported_cards.notes,14+length(ucms_imported_cards.msisdn),19),'MM-DD-YYYY.HH24-MI-SS'),'DD/MM/YYYY H24:MI:SS')
    || ';;' || to_char(ucms_imported_cards.expiry_date,'dd/mm/yyyy')
    || ';;' || ucms_imported_cards.serial_no
    || ';;' || ucms_imported_cards.serial_no
    || ';;' || DBMS_UTILITY.GET_HASH_VALUE(ucms_imported_cards.card_type,1,65536)
    || ';;' || ' '
    || ';;' || CASE ucms_imported_cards.card_status
    WHEN 'used' THEN '1'
    ELSE '0'
    END
    || ';;' || '01/01/1970 00:00:00'
    || ';;' || ' '
    from ucms_imported_cards, UCMS_EVENT_LOG
    where ucms_imported_cards.serial_no = substr(UCMS_EVENT_LOG.ENTITY_ID,11,length(UCMS_EVENT_LOG.ENTITY_ID)-9)
    AND UCMS_EVENT_LOG.PARTY_NO in (0)
    AND UCMS_EVENT_LOG.TIMESTAMP>=TO_TIMESTAMP(TO_CHAR(SYSDATE-1, 'DD-MM-YYYY') || ' 00:00:01', 'DD-MM-YYYY HH24:MI:SS')
    AND UCMS_EVENT_LOG.TIMESTAMP<=TO_TIMESTAMP(TO_CHAR(SYSDATE-1, 'DD-MM-YYYY') || ' 23:59:59', 'DD-MM-YYYY HH24:MI:SS')
    AND UCMS_EVENT_LOG.USER_ID LIKE 'SCP-AGENT1%'
    AND UCMS_EVENT_LOG.EVENT_TYPE_ID LIKE '2%'
    AND UCMS_EVENT_LOG.ENTITY_TYPE_ID LIKE 'ucms_imported_cards%';
    As you see we forced the session to use a huge RBS created for the purpose, but strangely after a long while the query fails with a RBS too small failure due to another RBS, not the one specified.
    Is there any chance the UNION or any other component of the query is implicitly opening a new transaction with a different RBS associated?
    Any chance to force the same RBS specified explicitly?
    Thanks!
    Mike

    albertone wrote:
    but strangely after a long while the query fails with a RBS too small failure due to another RBS, not the one specified.You misunderstand snapshot too old. It can be caused by other sessions same as by your session. Assume AFTER your session issued select some other session modified one (or more) tables ucms_batches, ucms_cards, UCMS_EVENT_LOG and committed changes. By the time your select reaches to fetch rows modified by that other session rollback extents in rollback segment used by that other session were reused. You will get snapshot too old. Bottom line - all sessions modifying table(s) used by your select must use rollback segments large enough so they are not overwritten before corresponding rows are needed by your select.
    SY.

  • How to find out rollback segment offile or online for pertcular schema????

    how to find rollbacksegment is online or ofline and space information regarding rollbacksegment?
    this is freshely installed 11.5.10.2. defultly how much free space we have????????//
    regards
    dba

    Default rollback segments are always online on database startup.
    if you create any new rollback segments then they will be offline by default during startup.
    for making newly created rollback segments online by default edit your init_sid.ora file and add the name of rollback segment in rollback_segment parameter.
    BTW,why are you concerned about rollback segments,use undo tablespace.

  • GettingTransaction in a specific Rollback segment

              Hi
              I m using bea weblogic 6.0. as Application Server and Oracle 8.x as Database.
              I get user transaction from weblogic server by looking up ("javax.transaction.UserTransaction")
              Now my requirement is that i want to begin transaction with a particular rollback
              segment. ( oracle
              allows this ) but UserTransaction object that we get from weblogic has only one
              method .begin()
              In this case is it possible for me to get usertransaction and begin transaction
              in a particular rollback
              segment.
              Thanks
              Pranav
              

    albertone wrote:
    but strangely after a long while the query fails with a RBS too small failure due to another RBS, not the one specified.You misunderstand snapshot too old. It can be caused by other sessions same as by your session. Assume AFTER your session issued select some other session modified one (or more) tables ucms_batches, ucms_cards, UCMS_EVENT_LOG and committed changes. By the time your select reaches to fetch rows modified by that other session rollback extents in rollback segment used by that other session were reused. You will get snapshot too old. Bottom line - all sessions modifying table(s) used by your select must use rollback segments large enough so they are not overwritten before corresponding rows are needed by your select.
    SY.

  • SYSTEM Rollback Segment

    I had 7 system rolback segment in my database. I know about the one but i don't know how the other 6 are created.
    Can I take the other 6 system rollback segment offline and drop?
    Did they hurst the database ?

    <<I have multiple system Rollback segment in my database. I want to keep one system rollback segment.>>
    why do you want to offline remainning rollback segment.
    if u offline rollback segments then it will effect the performance.
    i think you should read first rollback segment concept guide.
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96521/undo.htm#9114
    Thanks and Regards
    Kuljeet pal singh

  • Why Oracle10g uses System Rollback Segment....????

    Hi ,
    Just a wonder....!!!!
    Why Oracle10g uses System Rollback Segment....and not System undo tablespace... since rollback segment as a method to rollback transactions has been depreciated.....?????
    Thanks.....
    Sim

    System Rollback Segment is reserved for Oracle internal operation.
    I believe it is used only by SYS and programs invoked using SYS authorization manipulating dictionary tables. In which case the complexity has been understood and managed over several generations of Oracle.
    I suspect the system (manual) roillback segment will be very useful when creating a new database, which includes creating whole bunches of tables and views (updating whole bunches of internal tables), at which time no undo segment (or background process for automating that management?) exists.
    Please point to the document or link that says rollback segments are deprecated.
    Even now, manual rollback segments may be of benefit to specific programs and environments that run batch jobs managed by DBA whoy has studied them for a long time under specific circumstances.
    But, just like the various SGA pools should be evaluated and potentially resized when workload changes, the rollback segment configuration needs to be evaluated and potentially resized when workload changes. Few DBAs have the knowledge or skill or time to do so - the automatic adjustments may be the best generic compromise.

  • ORA-01581: attempt to use rollback segment...

    We've started getting "ORA-01581: attempt to use rollback segment (31) new extent (3) which is being allocated" messages in our production database over the last couple of days. Of course, each time we get these the rollback segment number is different, and we are getting these randomly from different applications that connect to the same database. We are using automatic undo management, so the rollback segments are not really under our control. The action in the Oracle docs for this error message doesn't give any specific actions that we should take, but we continue to get these.
    We started to get these about the same time as we ran out of available sessions on the database (sessions = 1500 and we had 1500 open sessions). Could these be related? Could there be some open session that may be causing the rollback segment issue? Would a restart of the database fix this? Of course the max sessions issue was cleaned up two days ago but the rollback segment issue is a lingering problem.
    Any help would be appreciated. We couldn't find anything for this online and Oracle hasn't responded to our service request yet.
    Thanks,
    Bobby

    As I understand it, you can not explicitly set the size for the undo segments in automatic undo management mode. From the Concepts guide:
    "In automatic undo management mode, the system controls exclusively the assignment of transactions to undo segments, and controls space allocation for undo segments."
    It looks like we are also using the default storage options that are set when the UNDO tablespace was created. Here is the DDL used to create this tablespace:
    CREATE SMALLFILE UNDO TABLESPACE "UNDOTBS" DATAFILE '/alpha/oradata/prod01/undotbs01.dbf' SIZE 750M REUSE AUTOEXTEND ON NEXT 25600K MAXSIZE 2000M , '/alpha/oradata/prod01/undotbs03.dbf' SIZE 2000M REUSE AUTOEXTEND ON NEXT 51200K MAXSIZE 2000M , '/alpha/oradata/prod01/undotbs04.dbf' SIZE 2000M REUSE AUTOEXTEND ON NEXT 104K MAXSIZE 2000M , '/alpha/oradata/prod01/undotbs02.dbf' SIZE 2000M REUSE AUTOEXTEND ON NEXT 25600K MAXSIZE 2000M

  • USING DEFAULT LOCAL ROLLBACK SEGMENT

    Hi,
    DB Version is 10.2.0.4
    Recently Noticed a MV refresh taking various time to complete. The MV refresh starts at 9pm and completes some time at 1am or 12am are sometimes very fast at 10pm. The number of records are almost same. There are no locks in the db during that time.. Opening the MV script i could see
    REFRESH COMPLETE
         WITH ROWID
    USING DEFAULT LOCAL ROLLBACK SEGMENT
    DISABLE QUERY REWRITE ASUsing default local rollback segment - is that allocation of rollback segment causes this
    Referred the manul
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_6002.htm - where it says this clause is not valid if the DB is in automatic undo mode.
    thanks,
    baskar.l

    Rollback segment is a concept from Oracle 8i where it last showed up. This clause is preserved only for upward compatibility, but it is obsolete.
    On the other hand, why do you worry about rebuilding the complete MV? either way you perform a full refresh, not a fast refresh.
    If you are concerned with the time it takes to be full-refreshed find out if it is possible to have it in fast-refresh mode, tune the underlying query and make sure there are no other concurrent processes negatively affecting the I/O throughput.
    ~ Madrid
    http://hrivera99.blogspot.com

  • CMSXDB sample: install.sql - error out, cannot use rollback segment

    I use the setup instruction and had errors when running install.sql at the following part:
    connect cmsadmin/cmsadmin@&tnsname
    SET serveroutput ON
    PROMPT Creating Table 'OTNCMS_PERSONALIZATION'
    CREATE TABLE OTNCMS_PERSONALIZATION (
    USERNAME VARCHAR2(20) NOT NULL,
    RESOURCELOC SYS.XDBURITYPE NOT NULL,
    VIEWTYPE VARCHAR2(40) NOT NULL,
    XSLLOC SYS.XDBURITYPE NOT NULL
    Resulted in error-
    ERROR at line 1:
    ORA-01552: cannot use system rollback segment for non-system tablespace 'USERS'
    Anyone knows why?

    Hi,
    What is the version of Database that is being used ?.
    I guess there must be some issue with the database being used, the archive mode or the UNDO segments. As a workaround, you can remove the following command from install.sql and run the sql script again.
    alter user cmsadmin default tablespace users;Regards
    Elango.

  • Why is the word count different when I use word count from the tools menu to the number at the bottom of my mac word document

    Why is the word count different when I use word count from the tools menu to the number at the bottom of my mac word document

    This forum is for Apple's defunct office suite 'AppleWorks' - since the word count is not in the places you mention I assume you are talking about Microsoft Word? Though it's just possible someone in this forum might also use Word and know the answer, you would stand a higher chance of getting an answer in Microsoft's own forums. You could also try asking in the forum applicable to your operating system - Lion, Mavericks or whatever - on the reasonably chance of finding someone familiar with Word.

  • Is "SET TRANSACTION USE ROLLBACK SEGMENT" only a hint

    I have two users, one makes some inserts in a table.
    The other makes a select which visits many rows.
    I have a big rollback-segment.
    To ensure, both users use this rollback-segment I created a logon-trigger:
    CREATE OR REPLACE TRIGGER a_logon AFTER LOGON
    ON DATABASE
    WHEN ( USER IN ( 'SCOTT', 'BOB' ) )
    BEGIN
    SET TRANSACTION USE ROLLBACK SEGMENT rbs_big;
    END;
    But I still get "snapshot to old" messages from the select, which contains the name off an other rollback-segment in the message.
    The trigger really fires, i tested it by adding an insert-statement to a log-table.
    What`s wrong ?

    The set transaction use rollback segment lasts only until you commit or rollback first time and all other transactions in that session will not be forced to that rbs anymore. Other possible solution could be that other users are accessing same tables / updating them so those sessions can't keep the read consistent image available anymore for your sessions.

Maybe you are looking for

  • Error while installing an application into different work spaces in APEX

    Hi All, I am getting an below error while installing the application in the same workspace.APEX Version i am using is 4.0.2 ORA-20001: GET_BLOCK Error. ORA-20001: GET_STMT error. ORA-20001: Execution of the statement was unsuccessful. ORA-06550: line

  • Remove numbers after filename and add custom sequence?

    Hi, I have to rename quite much of rendered frames which names are like aoPass_000001.png...aoPass_099999.png. I have to replace those numbers to start from 0111111 for example witch I'll input manually when I run rename process. Right now I do it us

  • Mapping Input

    I have a mapping input parameter connected to a lookup table and then to a premapping process. Somehow OWB is not generating the lookup in the code. Is this a bug? This is what owb generated, WH_DATE_PERIOD is the lookup table. BEGIN WH_ENABLE_PART_I

  • ERROR: Bean cannot be loaded

    Can anyone tell me if the jsp and the javabean have to be in the same directory? I am calling a javabean from within my jsp and the bean cannot be loaded. Ta J

  • What would you use to record a videogame you were playing?

    i don't think best buy sells dazzle but i still want to record video games from my tv