Replacing explicit Rollback Segments by UNDO segement

Hi,
My DBA wants to turn off the explicit rollback segments currently being used and replace them by UNDO segment. I have explicit mention of these rollback segments in my C++ and Pro*C codes. What changes am I supposed to make in order to implement the UNDO segements. Do I need to remove the function or only commenting the rollback segment reference line will suffice. Please see the sample code below:
void DeleteDBI::SetTransaction()
struct sqlca sqlca;
EXEC SQL BEGIN DECLARE SECTION;
// Thread context:
sql_context ctx = dbConnection->GetContext();
EXEC SQL END DECLARE SECTION;
EXEC SQL CONTEXT USE :ctx;
EXEC SQL SET TRANSACTION USE ROLLBACK SEGMENT RBS_LARGE_02;
EXEC SQL WHENEVER SQLERROR DO SqlError(sqlca, "DeleteDBI::SetTransaction");
}

It looks like you can comment the entire procedure.
However it is not a good practice to control the Rollback segment from code.
Check with ur DBA for better options in the future.

Similar Messages

  • Tablespace, Rollback segments and Undo tablespace

    hi,
    we are frequently getting an error on tablespaces, rollback segments and undo tabelspaces during the ETL load. This was really distrubing us to go further, is there any best practice how to avoid the tablespace errors or any precautions to be taken, we are very new to this ETL loads, pls advice
    Kishan

    Hello Kishan
    Yes. Make tablespaces bigger. However, the proper way to do it is optimizing your queries. If you don't have experience with Oracle DB, consult your DBA.
    Hope this helps
    Mate

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

  • Difference Between Rollback Segments and UNDO Tablespace

    Hi guys,
    Can you tell difference between Rollabck segments and UNDO Tablespaces.
    I think that rollback Segemnts and UNDO tablespaces are similar both are used for storing before imags of data, which is going to be modified.
    but my question still both the rollback abck segments and UNDO tablespaces exists.
    why and what is the reason of both existing and at what time, we can use..them at which scenarios's
    Regards,
    Pavan Kumar N

    Undo segments in undo tablespaces, introduced in 9i, are the successor of rollback segments.
    They are automatically managed by Oracle.
    Rollback segments exist for reasons of backwards compatibility.
    That said, you should switch to undo segments and stop using rollback segments.
    Other than that: could you please avoid rehearsing the complete documentation in this forum?
    Sybrand Bakker
    Senior Oracle DBA

  • Undo segment & Rollback segment

    Hi,
    What is the difference between Undo segment & Rollback segment?Is it a standard practice of creating roll back segments for each tablespace?
    Regards,
    Cherry

    What is the difference between Undo segment & Rollback segment?
    Undo Mode
    Undo mode provides a more flexible way to migrate from manual undo management to automatic undo management. A database system can run in either manual undo management mode or automatic undo management mode. In manual undo management mode, undo space is managed through rollback segments. In automatic undo management mode, undo space is managed in undo tablespaces. To use automatic undo management mode, the database administrator needs only to create an undo tablespace for each instance and set the UNDO_MANAGEMENT initialization parameter to AUTO. You are strongly encouraged to run in automatic undo management mode.
    Is it a standard practice of creating roll back segments for each tablespace?See above and http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14220/logical.htm#sthref449

  • When to backup the rollback segments?

    Does anyone know when do I need to backup the rollback segments and what for? How are they used during restore/recovery?
    I'm using RMAN in Oracle 9.2. We have databases with both manual and automatic undo management. Does the undo management type make any difference?
    Thanks,
    Niki

    Does anyone know when do I need to backup the rollback segments and what for? How are they used during restore/recovery?
    Your question is a little large to answer but I am going to summary the most important.
    The database works with transactions in commit and in not commit mode. While a transaction has not commit , this transaction has not finished. While the transaction has not finished the rollback segments or undo segments are used to store the image of blocks with changes and without changes. That is the method that Oracle uses to ensure that a block is not going to be modified definitevely until the transaction gets commit.
    When you have a point of failure you are going to have transactions with commit and transactions with no commit and that tablespace ( RBS or UNDO ) is needed to carry to the database to a consistent point carrying to disk all transactions with commit and the rest have to suffer a rollback operation. That means that those operations without commit are not going to be complete transactions for the database.
    When you want to recover a database all tablespaces are need excepting the temp tablespace because that tablespace is only needed to carry out sorts and operation likeness.
    Does the undo management type make any difference?
    if you use rollback segments you have to administer them and the management instead if you work with undo tablespace. If you work with undo tablespace it by itself manage its segments you do not have to worry about.
    I think that I have answered your questions if you have any doubt or something like that feel free to follow asking.
    Good Luck!
    Joel P�rez

  • Alter rollback segment command giving error.

    Hi all ,
    i am novice to Oracle 9i i am altering rollback segment but getting following error messages.
    ORA-30021: Operation not allowed on Undo Tablespace
    ORA-25150:Altering of extent parameters not permitted
    (in this i am trying to alter maxextents parameter of rollback segment )

    Apparently you are using undo segments, as opposed to rollback segments.
    You should use undo segments, and they are located in a separate undo tablespace (see the first error message)
    Oracle manages the undo tablespace. You can't do anything about it.
    However, Oracle is still using 'rollback segment' and 'undo segment' interchangeably.
    Likely, your rollback segment is an undo segment, and you can not change it, nor do you need to.
    Sybrand Bakker
    Senior Oracle DBA

  • Increase the RollBack Segment

    Guys,
    Hope you all doing well.
    My question is about the undotable space.
    I am using oralce 9ir2 on Windows Plateform. The tablespace was auto created at database creation. The tablespace is in Auto undo Management mode. The Undotablespace has 10 Rollback segments. I want to increase the Rollback segments in the tablespace. How could i increase the rollback segments??
    Please help.
    Thanks
    Y.Vo.

    when I asked how to get the rollback segment count, I actually asked how would you get the rollback segments in undo tablespace. Because you dont have rollback segments in undo tablespace. You can either have rollback segments or undo tablespace. If you start your database in UNDO mode then you will have undo tablespace or in ROLLBACK mode you will have roll back segments. Both cannot be in the same place.
    what version u are using? . In 10g you dont have rollback segment if you set UNDO_MANAGEMENT to auto. You will have only undotablespace.
    1) In undotablespace the extents will automatically grow according to the sum of the data files for that tablespace.
    2) If it reaches a maximum and if you have auto_extent in any one of the file then you dont have to manually increase the size i.e you dont have to manually increase the segments.
    3) Also if you dont have the auto_extent in any file then the space will be reused. i.e you start to loose the old undo data.
    4) The maximum data it can hold depends on UNDO_RETENTION period and the space available in the undo tablespace.
    Hope this helps.

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

  • Transaction table in rollback segments

    hi guys,
    I have read the following, but am still having a little difficulty conceptualising. Would someone be kind enough to give me a very brief example?
    thanks
    For each rollback segment, Oracle maintains a transaction table--a list of all transactions that use the associated rollback segment and the rollback entries for each change performed by these transactions.

    First of all, the statement is talking about old manual undo management using rollback segment.
    If you check the preceding two paragraph of the statement then it's easier to understand,
    It basically says, Rollback segment hold rollback entries of transaction. To make it easier to track transactions and undo entries, Oracle maintain a table to save such info.
    Rollback segment , transaction and undo entries are one to many relationships.
    Rollback Segment --< Transactions --< Undo Entries
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96524/b_deprec.htm
    Contents of a Rollback Segment
    Information in a rollback segment consists of several rollback entries. Among other information, a rollback entry includes block information (the file number and block ID corresponding to the data that was changed) and the data as it existed before an operation in a transaction. Oracle links rollback entries for the same transaction, so the entries can be found easily if necessary for transaction rollback.
    Neither database users nor administrators can access or read rollback segments. Only Oracle can write to or read them. (They are owned by the user SYS, no matter which user creates them.)
    How Rollback Entries Are Logged
    Rollback entries change data blocks in the rollback segment, and Oracle records all changes to data blocks, including rollback entries, in the redo log. This second recording of the rollback information is very important for active transactions (not yet committed or rolled back) at the time of a system crash. If a system crash occurs, then Oracle automatically restores the rollback segment information, including the rollback entries for active transactions, as part of instance or media recovery. When recovery is complete, Oracle performs the actual rollbacks of transactions that had been neither committed nor rolled back at the time of the system crash.
    When Rollback Information Is Required
    For each rollback segment, Oracle maintains a transaction table--a list of all transactions that use the associated rollback segment and the rollback entries for each change performed by these transactions. Oracle uses the rollback entries in a rollback segment to perform a transaction rollback and to create read-consistent results for queries.

  • Oracle9i How to convert from undo tables to rollback segments

    Hi,
    Anyone try before converting from UNDO management to using rollback segment....What are the procedures for the conversion...
    Thank You...

    Hi,
    Follow these steps to convert from Auto UNDO to Rollback Segs....
    1. With the database opened, create a rollback tablespace and then create some rollback segments and bring them online like this
    CREATE ROLLBACK SEGMENT RBS1 TABLESPACE RBS;
    ALTER ROLLBACK SEGMENT RBS1 ONLINE;
    2. Then edit the PFILE and modify these parameters
    Add: ROLLBACK_SEGMENTS=(RBS1,RBS2,RBS3....)
    Comment: UNDO_MANAGEMENT=AUTO and UNDO_TABLESPACE=UNDOTBS or whatever name you have for your UNDO tablespace.
    3. Shutdown the database gracefully(normal).
    4. Startup pfile=<Pfile path>
    5. Sync these new parameter changes to the SPFILE by recreating the SPFILE.
    6. Take a full level 0 backup of your database as the structure has changed.
    The next time you start the database, it will use the SPFILE which is same as the PFILE.
    Regards.

  • Cannot drop old undo tablespace. Cause: active rollback segment

    dear all.
    db: oracle 10.2.0.1
    os: rhel as version 5 64 bits.
    This is a testing database. And my database is online and open. But i can free the external usb disk that contains my ols undotbs.
    I want to drop old undo tablespace but this is not possible.
    1.- In order to open my database i had my datafile( '/mnt/hdext/back_plelds/undotbs02.dbf') offline drop, and then i can to open my database.
    2.- When i try to delete my old undo tablespace im getting this error:
    SQL> drop tablespace undotbs1 including contents and datafiles;
    drop tablespace undotbs1 including contents and datafiles
    ERROR at line 1:
    ORA-01548: active rollback segment '_SYSSMU1$' found, terminate dropping
    tablespace
    3.- My default undo_tablespace is another that i was created before step 1.
    SQL> sho parameter undo_ta
    NAME TYPE VALUE
    undo_tablespace string UNDOTMP
    SQL>
    Well i search in metalink ORA-01548 code error and in 18947.1 doc whows me that the solution is:
    Action: Shut down instances that use the active rollback segments in the
    tablespace and then drop the tablespace.
    4.- I try to shutdown but im getting:
    SQL> shutdown immediate;
    ORA-00376: file 10 cannot be read at this time
    ORA-01110: data file 10: '/mnt/hdext/back_plelds/undotbs02.dbf'
    SQL>
    This /mnt/hdext is an external USB disk and i have all permissions. I exported tables without any problem and i can read all files.
    i search un metalink again ora codes (ORA-00376 ORA-01110) and the doc id: 427801.1 shows in the solution:
    Drop the old undo tablespace instead of making it offline.
    but when i try to drop the tablespace it shows the error describe in the step 2.
    Facts:
    - my tablespace UNDOTBS1 is ONLINE. I put in offline and this is not the solution.
    - This is the status of my rollback segments:
    SQL> select segment_name, status from dba_rollback_segs where
    2 tablespace_name='UNDOTBS1';
    SEGMENT_NAME STATUS
    _SYSSMU1$                      NEEDS RECOVERY
    _SYSSMU2$                      NEEDS RECOVERY
    _SYSSMU3$                      NEEDS RECOVERY
    _SYSSMU4$                      NEEDS RECOVERY
    _SYSSMU5$                      NEEDS RECOVERY
    _SYSSMU6$                      NEEDS RECOVERY
    _SYSSMU7$                      NEEDS RECOVERY
    _SYSSMU8$                      NEEDS RECOVERY
    _SYSSMU9$                      NEEDS RECOVERY
    _SYSSMU10$                     NEEDS RECOVERY
    _SYSSMU11$                     OFFLINE
    SEGMENT_NAME STATUS
    _SYSSMU12$                     OFFLINE
    12 rows selected.
    SQL>
    - I have the note (Unable to drop und tablespace In this article describe the problem but this is not the same. The difference is that i cannot drop the rollback segment that describe in step 2.
    SQL> drop rollback segment "_SYSSMU1$";
    drop rollback segment "_SYSSMU1$"
    ERROR at line 1:
    ORA-30025: DROP segment '_SYSSMU1$' (in undo tablespace) not allowed
    in metalink the doc id: 173696.1 shows the solution:
    Action:     Check the undo segment name and reissue statement if necessary.
    i cannot drop the rollback_segment
    What can i do ???
    thanks a lot.

    in step 4 did you try with shutdown abort?
    If its still does not work then create another new table space with new file and then swtich to that tablespace http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/undo.htm#sthref1504Khurram

  • Illegal rollback Segment operation in Automatic Undo mode

    Hi,
    I use oracle database 9.2.0.1 and I try to install SCM repository but when I run ckcreate I saw an error message in
    the log file that Illegal rollback Segment operation in Automatic Undo mode because oracle 9.2 use automatic undo mode .So how can i install the repository.
    Ghassan Hallaq

    ORA-30019: Illegal rollback Segment operation in Automatic Undo mode
    You have hit bug '2108361'. I think you could safely ignore it in your case.

  • Rollback segments & UNDO (8i to 10g migration)

    Hello all,
    I need to migrate a database from 8.1.0.7 (server a) to 10.1.0.2 (server b) on HPUX and I am going through pre-tasks for IMP.
    On 8i:
    Tablespace name: RBS
    4 Rollback segments on RBS tablespace
    1 System Rollback segment, on SYSTEM tablespace
    On 10g:
    Pre-created UNDO01 tablespace
    4 Undo on UNDO01 tablespace
    1 Undo on SYSTEM tablespace
    My question is, can i run IMP full=y as is?
    Or should I pre-create the Rollback Tablespace & rollback segments on 10g also?
    If this is the case, what should my init.ora parameter show?
    #rollback segments
    rollback_segments = (acbr01,acdbr02,acdbr03,acdbr04)
    #undo
    undo_segments
    undo_management = auto
    undo_tablespace = undo01
    Thanks!

    Hi..
    You can use IMP full=y, there is no need to create rollback segments in 10g. In init file mention you need to mention
    #undo
    undo_segments
    undo_management = auto
    undo_tablespace = undo01
    The import utility will use UNDO tablespace, so keep monitoring it.
    Anand

  • Persistent Rollback Segment Header Lockouts (8.1.6)

    We are encountering the following situation on a 3-tier production system:
    Users occasionally inadvertently disconnected from client tier while a long-standing transaction (individual inserts controlled manually) has not yet been committed. (client cannot rejoin the severred session, by the way).
    At the point of disconnection, users often appear to be holding a rollback segment header enqueue.
    Subsequently, other users are getting locked out by this enqueue as they go for a transaction.
    We have 400 active users, and 80 rollback segments (ie. 5 potential transactions per segment). Each RBS is split into an minimum of 16 extents.
    My question:
    I have been led to believe by Oracle documentation that rollback seg. header locks are only held v. briefly. If this were so, the chances of this situation occurring would be slim. However, we observe this situation occurring daily.
    Yes I can up the number of RBS, but is there some other action I could be taking ? - indeed upping the RBS count may have no appreciable impact on this situation at all !

    Hi,
    Generally "Snapshot too old " error occurs when your rollback segment has not enough space for keeping your undo information. If you still facing that problem even after assigning a big tablespace, means your transaction is taking so much space. You can try to assign some more space in tablespace where you ahve created rollback segment. Have you assigned the tablespace using the same syntax
    SET TRANSACTION USE ROLLBACK SEGMENT large_rs1;
    For getting more information on this pls go through the following link
    http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96521/undo.htm#9114
    Please let me know if you have any other issue.
    Thanks

Maybe you are looking for

  • ITunes Library in an external hard drive

    I am a new user to mac's and i am converting from a dell. I had all my music on a external hard drive and i was able to add all of my music from the external hard drive into iTunes but from here it does not let me edit the information for each indivi

  • Crawling adobe acrobat 3.0 version files are giving warning

    Hi Everyone, Can somebody help me with the issue am facing sharepoint 2010 FAST search environment(FS4SP)... descriptions are below We are crawling a document repository which has many pdf files. Recently i observed that for some of the pdf files "cr

  • Anomymous Commenting

    I recently started an all PDF Blog http://www.math.uakron.edu/~dpstory/pdfblog.html A copy of each "PDF Blog" is uploaded for shared review to Acrobat.com. My concern is about privacy. This is a "public" review, perhaps not envisioned. Anyone who com

  • New 17 Inch 2.33GHz Intel Core 2 Duo Eperience

    I am all cashed up ready to purchase the new recently released and shipped, 17 inch 2.33 GHz Intel Core 2 Duo MacBook Pro. There appears to be few postings to date on others experience with the new 17 inch MacBook Pro. Perhaps there are still too few

  • Blinking Red Sys and Magenta GPS

    My NE has been working fine for over a year and a half. The other night the SYS light starting blinking Red and the GPS light is Magenta. I have rebooted and the ports are open. Does anyone have a fix? They want $100 to replace it which I won't pay.