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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Question about Rollback Segments

Re: Question about Rollback Segments

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Mon, 14 Sep 1998 16:10:33 GMT
Message-ID: <36013f93.13893718@192.86.155.100>


A copy of this was sent to stuco_at_mailcity.com (if that email address didn't require changing) On Mon, 14 Sep 1998 15:38:05 GMT, you wrote:

>I do large loads using Pro*C programs with Embedded SQL and I COMMIT after
>every 500,000 rows.
>
>The program sets the transaction to use a large rollback segment, then INSERTs
>data using bind variables.
>
>After the first COMMIT, will my program still use the rollback segment I told
>it to use, or will it randomly select another?? Remember, there are multiple
>commits within the same transaction.
>

the set transaction works at the transaction level. After a commit or rollback -- its undone. From the sql language reference manual:

SET TRANSACTION USE ROLLBACK SEGMENT
assigns the current transaction to the specified rollback segment. This option also establishes the transaction as a read–write transaction. You cannot use the READ ONLY option and the USE ROLLBACK SEGMENT clause in a single SET TRANSACTION statement or in different statements in the same transaction. Read–only transactions do not generate rollback information and therefore are not assigned rollback segments.

Usage Notes
The operations performed by a SET TRANSACTION statement affect only your current transaction, not other users or other transactions. Your transaction ends whenever you issue a COMMIT or ROLLBACK statement. Note also that Oracle7 implicitly commits the current transaction before and after executing a Data Definition Language statement.


so after you commit, you need to issue the set transaction use rollback segment again

>Thanking all of you for your valuable assistance.
>
>Stuart L. Cowen
>Paladin Consulting - Dallas
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Mon Sep 14 1998 - 11:10:33 CDT

Original text of this message

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