Query abort  with ora-30036 after more than 20 hours and 180g of undo

Dear all,
A developper transmits me a query. It fails after more than 20 hours and an undotbs of 180g (i change undo-retention, size of undo tbs, without results). That query makes a lot of inserts. How can i rewrite it to be more performant (my database is on 10.2.0.3 and i can't change it).
here's the query :
set serveroutput on size unlimited
set pages 0
set trims on
set lines 1000
set feed off
set pagesize 50
set linesize 1000
set head off
set echo off
set verify off
set feedback off
WHENEVER SQLERROR EXIT SQL.SQLCODE
DECLARE
v_annee VARCHAR(4) := '2012';     
v_dkm_id NUMBER := '108';
v_entretien NUMBER;
v_nb_feuilles_cr NUMBER := 0;
v_nb_etats_cr NUMBER := 0;
v_action_id NUMBER;
v_rm_id NUMBER;
v_personne_id NUMBER;
CURSOR c_evaluation IS
     SELECT E.ID# AS E_ID, W.ID# AS WF_ID , E.NATURE_ECHELON AS ECHELON
     FROM T_EVALUATION E
     JOIN T_DKM_LOCALE L ON L.ID#=E.DKM_LOCALE_ID
     JOIN T_WORKFLOW W ON (W.CODE=E.CODE_WORKFLOW_INITIAL AND W.ANNEE=v_annee )
     WHERE L.DKM_NAT_ID=v_dkm_id;
r_evaluation c_evaluation%ROWTYPE;
BEGIN
SELECT ID#
INTO v_personne_id
FROM T_PERSONNE
WHERE ID_FONCTIONNEL = 'herve.collin';
dbms_output.put_line('===== MAJ evaluations / statut_harmo_shd =============');
dbms_output.put_line('===== Creation des feuilles ==========================');
SELECT ID# MOTIF_ID
INTO v_entretien
FROM T_REF_MOTIF_TENUE_ENTRETIEN
WHERE CODE='PLA';
OPEN c_evaluation;
LOOP
     FETCH c_evaluation INTO r_evaluation;
     EXIT WHEN c_evaluation%NOTFOUND;
IF r_evaluation.ECHELON = 'T'
THEN
SELECT ID#
INTO v_rm_id
FROM T_REF_REDUCMAJO
WHERE ANNEE = v_annee
AND CATEGORIE_GRADE = 'ET'
AND CODE = 'V1';
END IF;
IF r_evaluation.ECHELON = 'F' OR r_evaluation.ECHELON = 'V'
THEN
SELECT ID#
INTO v_rm_id
FROM T_REF_REDUCMAJO
WHERE ANNEE = v_annee
AND CATEGORIE_GRADE = 'FV'
AND CODE = 'R1';
END IF;
UPDATE T_EVALUATION
SET STATUT_HARMO_SHD = 'C' , REF_REDUCMAJO_PROP_SHD_ID = v_rm_id
WHERE DKM_LOCALE_ID IN ( SELECT ID# FROM T_DKM_LOCALE WHERE DKM_NAT_ID = v_dkm_id );
INSERT INTO T_FEUILLE(ID#, REF_MOTIF_TENUE_ENT_ID, EVALUATION_ID, WORKFLOW_ID)
VALUES (S_FEUILLE.NEXTVAL , v_entretien , r_evaluation.E_ID, r_evaluation.WF_ID);
v_nb_feuilles_cr := v_nb_feuilles_cr + 1;
END LOOP;
CLOSE c_evaluation;
dbms_output.put_line(' -> '||v_nb_feuilles_cr||' feuilles crees');
COMMIT;
END;
set serveroutput off
exit
What is the bester choice ? drop the indexes on the table before insert, start the insert without fetching the data in cursor ?
nb: sorry for my bad english
Best regards
Catherine Andre
@mail: [email protected]

user4443606 wrote:
Thanks for your reply !
I'll try to grow the undo tbs space but i stay convinced that the problem is in the query.You can be convinced & wrong at the same time.
row by row INSERT is slow by slow.
It can be done as single INSERT; but that won't change the amount of UNDO that is required.

Similar Messages

  • OEM Upgrade - ORA-30036: unable to extend segment by 8 in undo tablespace

    Oem upgrade Installer failed on repository in upgrading to grid Control 10.2.0.5
    757921: ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDOTBS'
    757922: ORA-06512: at line 117
    I added two datafiles to fix this error so I thought I had enough space now - installer failed when upgrading the repository with ORA-30036 unable to extend segment by 8 in undo tablespace 'UNDOTBS', When I hit retry it keeps failing on the same error. The upgrade is in STATUS -3. Could I run this as sysman and then go back to the installer screen and retry again.
    execute emd_maintenance.set_comp_status('_
    UPGRADE_', EMD_MAINTENANCE.G_STATUS_
    CONFIGURED_READY);
    If you have any tips going forward pleases let me know.,
    Joseph

    Has anyone encountered this error: doing re-installation on OEM upgrade. I can seem to find anything on metallink. There is no error code
    txnRemoveConfirmation .
    Joseph

  • It's so annoying!! I have created a new Apple ID but after I click verify it just goes back to the previous page!!! It''s really frustrating I have tried for more than 4H, and the problem is not about the apple ID. I can download apps with the apple ID, w

    It's so annoying!! I have created a new Apple ID but after I click verify it just goes back to the previous page!!! It''s really frustrating I have tried for more than 4H, and the problem is not about the apple ID. I can download apps with the apple ID, which means IMessage is the problem! I restarted my iPad, I logged in and out of the apple ID in the store, AND YET IT STILL WON'T WORK, PLEASE HELP!

    Hi Vmanfromusa!
    It sounds like you are having an issue with activating your iMessage app on your iPad. An article outlining some troubleshooting steps for this issue can be found here:
    iOS: Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/ts4268
    Thanks for using the Apple Support Communities. Have a good one!
    -Braden

  • Apply processes aborted with ORA-12805 error

    After regular load on a replication system for a couple days, apply processes aborted with
    ORA-12805: parallel query server died unexpectedly, and restarting of the apply processes
    works but the error come back a couple days later.
    I adjusted multiple apply parameters such as PARALLELISM, COMMIT_SERIALIZATION and DYNAMICSTMTS, but none of them can resolve the issue.
    there are CLOB columns in replicated tables.

    Read the following thread.
    ORA-12805: parallel query server died unexpectedly
    kapil

  • After more than a year of success, email will not sync

    After more than a year of successfull syncs with iTunes, my iPhone GS will not sync with my Outlook Calendar. I get the message, "Either there is no default mail client or the current mail client cannot fulfill the messaging requrest. Pleae run Microsoft Outlook and set it as the default mail client."
    The problem with complying with that message is that I DO NOT use Outlook as my default mail client on my PC. I DO use Outlook for my Calendar on the PC and have, in the past, been able to sync with the iPhone calendar.
    On the iPhone, I can receive my email from GMail and another provider without problem. On my PC, I use Forte Agent as my email program.
    I know of nothing that I have done to change settings an any program that would affect the ability to sync my calendar with outlook but NO NEW calendar entries are reaching my iPhone now. All other portions of the sync appear normal.
    Any help would be greatly appreciated.

    Subject correction. It should read: After more than a year of success, Outlook Calendar will not sync.
    It appears that there are a VERY large amount of problems with the calendar not performing sync correctly. Any answers...?

  • Method called more than once - and dies with EXC_BAD_ACCESS error

    Hi,
    In my app, I have 4 views with their respective viewControllers. In the appDelegate.m, I provide methods that allows to switch to any of these views. Following is code for switching to the editView:
    -(void) flipToEditView {
    [self populateTheList]; // populate an array
    EditViewController *anEditVC = [[EditViewController alloc] initWithNibName:@"EditView" bundle:nil];
    [self setEditVC:anEditVC];
    [viewController.view removeFromSuperview];
    [self.window addSubview:[editVC view]];
    [anEditVC release]; }
    The view is not switched - and moreover, this method is called more than once; and the app dies with EXCBADACCESS!
    2009-08-23 14:54:40.648 iNotate[2128:20b] Album (before): x= 0 y=20 width=320 height=460
    2009-08-23 14:54:40.653 iNotate[2128:20b] Album (after): x= 0 y= 0 width=320 height=480
    warning: Couldn't find minimal bounds for "_sigtramp" - backtraces may be unreliable
    (gdb) bt
    #0 -[iNotateAppDelegate flipToEditView] (self=0x523690, _cmd=0x9563) at /Users/sam/MY_FILES/iPhone Apps/app/Classes/iNotateAppDelegate.m:116
    #1 0x00008661 in -[FirstView editAction] (self=0x546a30, _cmd=0xac94) at /Users/sam/MY_FILES/iPhone Apps/app/FirstView.m:25
    #2 0x30a4eee6 in -[UIApplication sendAction:to:from:forEvent:] ()
    #3 0x30ab0d36 in -[UIControl sendAction:to:forEvent:] ()
    #4 0x30ab11fe in -[UIControl(Internal) _sendActionsForEvents:withEvent:] ()
    #5 0x30ab0544 in -[UIControl touchesEnded:withEvent:] ()
    #6 0x30a67917 in -[UIWindow sendEvent:] ()
    #7 0x30a56fff in -[UIApplication sendEvent:] ()
    #8 0x30a561e0 in _UIApplicationHandleEvent ()
    #9 0x31565dea in SendEvent ()
    #10 0x3156840c in PurpleEventTimerCallBack ()
    #11 0x94a713c5 in CFRunLoopRunSpecific ()
    #12 0x94a71aa8 in CFRunLoopRunInMode ()
    #13 0x31566600 in GSEventRunModal ()
    #14 0x315666c5 in GSEventRun ()
    #15 0x30a4eca0 in -[UIApplication _run] ()
    #16 0x30a5a09c in UIApplicationMain ()
    #17 0x000027e8 in main (argc=1, argv=0xbffff068) at /Users/sam/MY_FILES/iPhone Apps/app/main.m:14
    Current language: auto; currently objective-c
    (gdb) continue
    2009-08-23 14:54:55.885 iNotate[2128:20b] >>>>>>>>>>>>>>>>>> populateTheList
    (gdb) bt
    #0 -[iNotateAppDelegate flipToEditView] (self=0x523690, _cmd=0x9563) at /Users/sam/MY_FILES/iPhone Apps/app/Classes/iNotateAppDelegate.m:116
    #1 0x00008661 in -[FirstView editAction] (self=0x5457b0, _cmd=0xac94) at /Users/sam/MY_FILES/iPhone Apps/app/FirstView.m:25
    #2 0x30a4eee6 in -[UIApplication sendAction:to:from:forEvent:] ()
    #3 0x30ab0d36 in -[UIControl sendAction:to:forEvent:] ()
    #4 0x30ab11fe in -[UIControl(Internal) _sendActionsForEvents:withEvent:] ()
    #5 0x30ab0544 in -[UIControl touchesEnded:withEvent:] ()
    #6 0x30a67917 in -[UIWindow sendEvent:] ()
    #7 0x30a56fff in -[UIApplication sendEvent:] ()
    #8 0x30a561e0 in _UIApplicationHandleEvent ()
    #9 0x31565dea in SendEvent ()
    #10 0x3156840c in PurpleEventTimerCallBack ()
    #11 0x94a713c5 in CFRunLoopRunSpecific ()
    #12 0x94a71aa8 in CFRunLoopRunInMode ()
    #13 0x31566600 in GSEventRunModal ()
    #14 0x315666c5 in GSEventRun ()
    #15 0x30a4eca0 in -[UIApplication _run] ()
    #16 0x30a5a09c in UIApplicationMain ()
    #17 0x000027e8 in main (argc=1, argv=0xbffff068) at /Users/sam/MY_FILES/iPhone Apps/app/main.m:14
    (gdb) continue
    2009-08-23 14:55:22.493 iNotate[2128:20b] >>>>>>>>>>>>>>>>>> populateTheList
    Program received signal: “EXCBADACCESS”.
    (gdb) continue
    What's happening here?
    Sam!

    -(void) flipToEditView {
    [self populateTheList]; // populate an array
    EditViewController *anEditVC = [[EditViewController alloc] initWithNibName:@"EditView" bundle:nil];
    [self setEditVC:anEditVC];
    [viewController.view removeFromSuperview];
    [self.window addSubview:[editVC view]];
    [anEditVC release]; }
    }<---- is this } matched elsewhere?

  • Can windows 7 'open with' right click open more than 1 picture at a time?

    A few times I have been given a usb drive or SD card & asked to enhance a few pictures for someone.  I usually just select one picture & then right click open wirh & select PSE.  The problem with doing this is that I can only send one picture at a time to PSE.  Is it possible to get the open with command to have more than 1 picture open?  I'm using windows 7 pro.

    Hi,
    You could try using the "Send To" option but you first have to create a shortcut.
    Use the windows explorer to navigate to
    C:\Users\"Your User Name"\AppData\Roaming\Microsoft\Windows\SendTo
    In that folder create a new shortcut to the PSE editor.
    Then you use it by selecting the images you want to process, right click and select Send To - the editor should appear in the list.
    Hope that helps
    Brian

  • Create MVIEW fails with ORA-30036

    Hello,
    I get the ORA-30036 error when trying to create a MVIEW :
    ORA-30036: unable to extend segment by 4 in undo tablespace 'UNDOTBS1'
    I would like to understand why i get this error? does the creation of MVIEW uses the undo tablespace? which other info i can provide if it helps?
    CREATE MATERIALIZED VIEW MY_MVIEW
    AS
    SELECT col1,col2,col3,col4,col5,col6,col7
      FROM Table
    WHERE col1 = 'A'Thanks.

    ORA-30036: unable to extend segment by string in undo tablespace "string"
    Cause: the specified undo tablespace has no more space available.
    Action: Add more space to the undo tablespace before retrying the operation. An alternative is to wait until active transactions to commit.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14219/e29250.htm#sthref8249
    You or your DBA will need to increase the UNDO tablespace.
    Materialized view problem
    http://kr.forums.oracle.com/forums/thread.jspa?threadID=918336

  • After more than a year I am being asked to enter my serial number again and when i enter it it no longer works

    After more than a year I am being asked to enter my serial number again and when i enter it it no longer works

    Same here. Called support and waiting for someone for more than an hour now!!!
    Adobe, please fix!

  • Doubt regarding ORA-30036: unable to extend segment by 8 in undo tablespace

    I am using 11g Release 1 Database .
    I have to analyze the performance of two tables of different designs which serve the same purpose and come up with the design which is efficient .
    SQL> desc staging_dict
    Name                                      Null?    Type
    SNO                                                NUMBER
    CODE_FRAGMENTS                                     CLOB
    CODE_FRAGMENTS_U                                   CLOB
    CODE_FRAGMENTS_D                                   CLOB
    CODE_FRAGMENTS_DO                                  CLOB
    SQL> desc staging_dict1
    Name                                      Null?    Type
    SNO                                                NUMBER
    CODE_FRAGMENTS                                     CLOB
    CODE_FRAGMENTS_UD                                  CLOB
    CODE_TYPE                                          VARCHAR2(5 CHAR)Initially I tried inserting a few thousand records into both the tables . Then I did some conversion on one column and I populate the result on other column of the same table . So I update the table in bulk mode and I commit for every thousand records .
    I have a undo tablespace of 2G with undo_retention=900 , retention guratantee is not set for the undo tablespace .
    When I tried the conversion and update on the first table (STAGING_DICT) it took more time for around 2500 records compared to other table and when I increased the number of records to 10000 it threw an error
    ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDOTBS'
    But I didn't come across this error when I tried the conversion and update on the table for the same 2500 records (STAGING_DICT1) and it was also 10 times faster .
    My doubt is does the error ORA-30036 occur because it is saving the undo image of all the four clob columns though I am doing conversion on one column and updating the other column (using only two columns in the update and only one column is affected by update command) ?
    Also how is that having less CLOB rows prove more effective by adding one more VARCHAR column which differentiates the code_frament type in the STAGING_DICT1 table than having it as more CLOB columns as in STAGING_DICT table ?

    Don't you think the error OP reported is kind of weird?
    Because as you said, Oracle stores "undo" of lob in user tablespace not undo tablespace if the lob is stored out-of-line.
    1. If the size of lob was small, small size of undo would be stored into undo tablespace,
    and OP would'nt have undo tablespace shortage problem.
    (How does small lob flood undo tablespace?)
    2. If the size of lob was big, OP would have 01555 error on user tablespace not undo tablespace shortage error.
    So, i think there are 2 theories that can explain this abnormality.
    1. OP hit the bug of massive undo generation.
    2. OP is using securefile which is 11g new feature.
    Oracle documents says that undo for securefile lob is stored in "undo" tablespace, not user tablespace.
    But unfortunately, i'm not sture about this coz i didn't try it myself

  • ORA-30036: unable to extend segment by 8 in undo tablespace 'APPS_UNDOTS1'

    Hi,
    A user who is trying to run a report on an EBS system, gets the following error from the application end:
    java.sql.SQLException: ORA-30036: unable to extend segment by 8 in undo tablespace 'APPS_UNDOTS1'
    I would have expected to see this ORA error in the Oracle database alert log as well, however this is not the case.
    I increased the size of the APPS_UNDOTS1 tablespace from 1700mb with autoextend to max 3000mb, however it seems that the tablespace is not extending beyond it's original size of 1700mb. In TOAD, I see that the tablespace has not grown even after the user ran the report again. Any idea why? Is there perhaps something that needs to be adjusted on the application side as well?
    Thanks.

    Hi,
    The tablespace is not extending and this error is not written to the alert log, but I found a trace file with the following information....
    ORA-30036 happens when trying to extend undo segment SYSSMU91258636580$ (usn=9) by 8 blocks
    Reason: Fail to Steal
    Current undo tablespace APPS_UNDOTS1 (tsn=1)
    undo tablespace current size 218240 blks, maxsize 218240 blks, fixed sized
    Undo Retention (reactive): 936, Parameter Undo Retention: 900, Tuned Undo Retention: 936, High threshold Undo Retention: -2
    Retention Guarantee FALSE
    Does anyone know how to solve this "Fail to Steal" problem?
    Btw, the query SELECT DISTINCT STATUS, SUM(BYTES), COUNT(*) FROM DBA_UNDO_EXTENTS GROUP BY STATUS; returns about 55 expired extents, therefore there are still available extents to "steal" from. So why does this fail?

  • Is there a way to buy a plan with just Premier, After Effects, Photoshop, Illustrator and Audition?

    Is there a way to buy a plan with just Premier, After Effects, Photoshop, Illustrator and Audition? I saw all the other plans but I'm just a private cartoon animator and don't really need the other software. Plus I don't really do that much money out of this and paying for the complete Create Cloud seems like a waste of money. So basically what I'm looking for is a better monthly price where i can just pay for does 5 adobe software i so despretly need

    DAIM  because that's a bit expensive for me. 60euros each month I thought maybe there's a way I can spend less and use this software. I live in a Malta, it's a small country of only four hundred thousand residents and I just use this to animate a few cartoons and I don't really make that much money out of them. I'd end up spending more on the software than I actually make.

  • My iPod classic 160gb don't copy more than 5gb , and when i try to add more ,it's delete every thing and told me to restore again !!

    hi
    my classic ipod 160 gb can't write more than 5gb , and after that it's go slowly and transfer the songs to much slow ,
    when i reject it, it delete every thing i put inside , and told me to restore the device !!
    and the loop start again ! 

    Hi!
    Make sure that you follow the steps you can find in this article: [[Where can I find my Firefox Sync Key?]]
    Your sync key should have the following format: x-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
    Avoid spaces or any additional character. Finally, make sure that in your work computer you are using the same username and passwords as the one at home, just to make sure that the Sync key corresponds to this account.

  • ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDOTBS1'

    Hi experts,
    I'm getting this error
    "ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDOTBS1'"
    will you please tell me the reason and suggest me, what to do.
    OS - SunOS 5.10
    oracle - 10.2.0.3.0

    Hallo.
    I have this problem 30036 after this request (ver. 10.2):
    DELETE FROM AUDITDBA.SEOSDATA where COMPUTERNAME ='xxxxx' AND TIMSTAMP >= '18-03-2011'    (! number of rows is less as 2 000 000)
    I tried do this:
    ALTER SYSTEM SET UNDO_RETENTION = 5;
    But after next action "DELETE" again problem 30036..
    Here is a "space status" from the system:
    TABLESPACE_NAME VOLNE_MIESTO
    CA_AUDIT 3714,1875 MB
    SYSAUX 42,1875 MB
    SYSTEM 5,25 MB
    UNDO_TEMP 7998,0625 MB
    USERS 999,125 MB
    It's clear for me that datafile UNDOTBS is small but I have same questions:
    1. What You recommend - use autoextend on for the UNDOTBS datafile or extend it manualy?
    2. What size You recommend for the UNDOTBS when I have DB size cca 350 GB, into DB incomming cca 50 events (rows) per second and I need remove from this DB aproximetly 1/2 numbers of rows (old data)
    3. Recommend me best way how I can remove old data from DB without problems as "30036"...
    Thank You in advance
    Peter

  • I would like to know if you go into free downloads why cannt you dowloads more than 10 and then you have to pay for them

    I would like to know if the download that are free why cann't you download more than 10 and then you have to pay for them

    If it's free, then it's free no matter how many you download. iTunes might take some time if you download more than three. I have more than 400 apps and a 50 of them are free and I don't have problem.
    Are you sure it was free?

Maybe you are looking for