Problem with Temporary Tablespace in 8i

Hello friends,
I have the 8.1.7.4 version, with a 18GB Temporary Tablespace.
An external process (from Datawarehouse tool) is making a query over a 10.000.000 records.
It appeared the error:
SQL error 1652 occurred when accessing table XXX
It's supposed it occurs due to temporary tablespace is full
DWH tool makes different "big" queries.. but.. are the enough to grow up to 18GB???
Any idea?
[It's not possible to change sort_area_size or any other parameter in init.ora]
Apart form this: Which would be the best way to clean this temporary tablespace?
Thanks

Jose, I think you are right and the problem is that Oracle was unable to obtain additional temp tablespace extents for the query since you mention the problem occurred on a query.
The question is was the lack of free temp due to the combination of tasks running at the time or is the plan for the query in question the issue?
If you resubmit the query does the 01652 error re-occur. If it does then I suggest grabbing a copy of the contents of v$sort_usage and resubmitting the query. Monitor the sort usage every 30 seconds, minute, or several minutes depending on how long the query runs before returning the error. This will give you an idea of how much temp space the query wants and maybe why (see following).
Also get the explain plan and see where temp is being used. One query may use multiple allocations of temp space at a time such as one chunk to support hash joins, one to support aggregation, and one to support order by so the total sort space necessary may be a lot more than you would think just based on the result set size.
In the case where the query in question is using too much temp you have to ask if the plan is the issue or if you really need more temp. When the plan is not efficient then converting to using nested loops over hash joins might be one way to eliminate excess temp space usage.
HTH -- Mark D Powell --

Similar Messages

  • How can we change the default folder location (avoiding problems with Temporary Internet Files)

    (Environment in question: Windows 7 secure desktop (running as user not admin), Office 2010)
    Hello,
      As has been touched on in various forums (such as here: http://forums.adobe.com/thread/797451), when one opens a PDF attachment in Outlook, Acrobat and Reader store the file in the "Temporary Internet Files" folder (f/k/a OLK folder in previous versions of Outlook.  There are two major problems with this:
      First, as Microsoft has documented in http://support.microsoft.com/kb/817878, attachments end up here staying here under certain conditions (go checks your now, you'll find some!), which ends up being a file attachment no man's land, and that can present security risks (e.g. if data we thought was deleted still lives in that folder).
      Secondly, the first time you open an attachment in Acrobat and do a Save As, Acrobat is defaulting to the Temporary Internet Files location.  This folder (as noted in the thread linked above) is ridiculously hard to get to for the average user, so they can end up storing a file and then losing it.
      We've found that if we open Acrobat once, do a save as, and change to the users Documents folder, the change sticks.  But how can we have Acrobat default to Documents instead of that temporary location? 
      Any help is greatly appreciated.

    Have you check to see if Acrobat sets a registry entry or file preference for the first Save As?  That's where I would start looking.  Process Monitor is a good tool for this.

  • Problem with temporary table refresh

    Hi,
    I running a process before validation on a page to populate a temporary table when I click a button.
    On the following page I've built a shuttle on the temporary table. Not the most elegant solution, but the shuttle LOV box wouldn't process the oracle text commands in the SQL.
    I'm not getting any error, but I have an unusual problem
    It takes two passes for the data to be replaced. i.e I enter 'ABCD' in the filter and it returns data with 'ABCD'
    If I return to the page and change the filter to 'EFGH' I still get 'ABCD'. I return to the page and click the button again and I get 'EFGH' results
    I've checked the data in the temporay table and that is updating in line with the problem.
    I've looked at the debug and that seems fine (i.e I can see the changed filter value), I've tried moving the truncate to a different process, that didn't help.
    I've run it in SQL developer and it seems to work fine.
    I've included the code below, but I can't see a problem with it.
    Can anybody help?
    begin
    EXECUTE IMMEDIATE('TRUNCATE TABLE temp_cat');
    commit;
    if length(:P26_ADD_FILTER) > 0 then
    insert into temp_cat (core_cat_id, core_cat_code, core_cat_desc)
    select core_cat_id,core_cat_code,core_cat_desc from core_cat where CONTAINS (core_cat_desc, '
    <query>
    <textquery lang="ENGLISH" grammar="CONTEXT">&P26_ADD_FILTER.
    <progression>
    <seq><rewrite>transform((TOKENS, "{", "}", " "))</rewrite></seq>
    <seq><rewrite>transform((TOKENS, "{", "}", " ; "))</rewrite></seq>
    <seq><rewrite>transform((TOKENS, "{", "}", "AND"))</rewrite></seq>
    <seq><rewrite>transform((TOKENS, "{", "}", "ACCUM"))</rewrite></seq>
    </progression>
    </textquery>
    <score datatype="INTEGER" algorithm="COUNT"/>
    </query>')>0 and core_cat_id not in (select pipe_project_cat.core_cat_id from pipe_project_cat where txtpamref = :p26_pamref);
    else
    insert into temp_cat (core_cat_id, core_cat_code, core_cat_desc)
    select core_cat_id,core_cat_code,core_cat_desc from core_cat where
    core_cat_id not in (select pipe_project_cat.core_cat_id from pipe_project_cat where txtpamref = :p26_pamref);
    end if;
    end;

    Hi,
    Apex does not work well with temporary tables as you cannot guarantee which session from the pool will be used to serve each page.
    In your case, it looks like the second page is using temporary data from the wrong session.
    Have you considered using Apex Collections instead?
    Luis

  • Problem on temporary tablespace

    Hi all,
    I created the temporary tablespace with following command;
    create temporary tablespace rbitemp
    tempfile 'E:\ORACLE\ORADATA\RBI\RBItemp.tmp' size 100m
    autoextend on next 1m maxsize 2000m;
    while running the query i received the error
    ORA-01652: unable to extend temp segment by 256 in tablespace RBITEMP
    Then I add tempfile , now still I receiving the same error.
    Thanks in advance.

    Hi,
    This tablespace is only for rbi user.
    query is :
    select distinct trim(wrk.bd_alcd) as ALCD, wrk.bd_typecd as TypeCD, wrk.bd_forcd as FORCD, wrk.bd_curcd as CURCD,
    wrk.bd_councd as COUNCD, wrk.bd_sectcd as SECCD,
    wrk.bd_matcd as MATCD, wrk.bd_c_u_cd as C_U_CD, wrk.bd_s_u_cd as S_U_CD,
    0 as Org_FCBal,0 as ORG_Bal,case when wrk.bd_type='O' then wrk.bd_fc_bal else 0 end as Main_FCBal,
    case when wrk.bd_type='O' then (wrk.bd_fc_bal * nvl(exchg.cer_exchangerate, 1)) else 0 end as main_Bal,
    wrk.bd_rs_int,wrk.bd_rs_bal,wrk.bd_fc_int,wrk.bd_fc_bal,
    ' ' as TrackChangs
    from ibs_work_bankdata wrk inner join ibs_org_bankdata org ON org.bd_yrqtr = wrk.bd_yrqtr and org.bd_bkcode=wrk.bd_bkcode and org.bd_forcd = wrk.bd_forcd
    and wrk.BD_YRQTR=20044 and wrk.BD_BKCODE ='000'
    and wrk.BD_ALCD = '51' and wrk.BD_FORCD ='IN' and wrk.BD_TYPECD = '11'
    left join ibs_currencymaster curmst on curmst.cur_code = wrk.bd_curcd
    left join ibs_currencyexchangerate exchg on exchg.cer_currencyid = curmst.cur_id
    and exchg.cer_yearqtr = 20051 and exchg.CER_ACTIVE=1 union select distinct trim(wrk.bd_alcd) as ALCD, wrk.bd_typecd as TypeCD, wrk.bd_forcd as FORCD, wrk.bd_curcd as CURCD,
    wrk.bd_councd as COUNCD, wrk.bd_sectcd as SECCD,
    wrk.bd_matcd as MATCD, ' ' as C_U_CD, ' ' as S_U_CD,
    0 as Org_FCBal,0 as ORG_Bal,case when wrk.bd_type='O' then wrk.bd_fc_bal else 0 end as Main_FCBal,
    case when wrk.bd_type='O' then (wrk.bd_fc_bal * nvl(exchg.cer_exchangerate, 1)) else 0 end as main_Bal,
    wrk.bd_rs_int,wrk.bd_rs_bal,wrk.bd_fc_int,wrk.bd_fc_bal,
    ' ' as TrackChangs
    from ibs_work_bankdata wrk inner join ibs_org_bankdata org ON org.bd_yrqtr = wrk.bd_yrqtr and org.bd_bkcode=wrk.bd_bkcode and org.bd_forcd = wrk.bd_forcd
    and wrk.BD_YRQTR=20044 and wrk.BD_BKCODE ='000'
    and wrk.BD_ALCD = '51' and wrk.BD_FORCD ='IN' and wrk.BD_TYPECD = '11' and wrk.bd_rs_bal>0
    left join ibs_currencymaster curmst on curmst.cur_code = wrk.bd_curcd
    left join ibs_currencyexchangerate exchg on exchg.cer_currencyid = curmst.cur_id
    and exchg.cer_yearqtr = 20051 and exchg.CER_ACTIVE=1 order by main_FCBal
    explain plan is:
    ****************SELECT STATEMENT, GOAL = CHOOSE               Cost=51     Cardinality=2     Bytes=314
    SORT UNIQUE               Cost=52     Cardinality=2     Bytes=314
    UNION-ALL                         
    TABLE ACCESS BY INDEX ROWID     Object owner=RBI     Object name=IBS_ORG_BANKDATA     Cost=2     Cardinality=204     Bytes=2856
    NESTED LOOPS               Cost=26     Cardinality=1     Bytes=157
    NESTED LOOPS OUTER               Cost=24     Cardinality=1     Bytes=143
    NESTED LOOPS OUTER               Cost=23     Cardinality=1     Bytes=93
    TABLE ACCESS BY INDEX ROWID     Object owner=RBI     Object name=IBS_WORK_BANKDATA     Cost=22     Cardinality=1     Bytes=52
    INDEX SKIP SCAN     Object owner=RBI     Object name=IBS_WORK_BANKDATA_IDX     Cost=7     Cardinality=1     
    TABLE ACCESS FULL     Object owner=RBI     Object name=IBS_CURRENCYMASTER     Cost=1     Cardinality=178     Bytes=7298
    TABLE ACCESS FULL     Object owner=RBI     Object name=IBS_CURRENCYEXCHANGERATE     Cost=1     Cardinality=19     Bytes=950
    INDEX RANGE SCAN     Object owner=RBI     Object name=IBS_ORG_BANKDATA_IDX     Cost=1     Cardinality=204     
    TABLE ACCESS BY INDEX ROWID     Object owner=RBI     Object name=IBS_ORG_BANKDATA     Cost=2     Cardinality=204     Bytes=2856
    NESTED LOOPS               Cost=26     Cardinality=1     Bytes=157
    NESTED LOOPS OUTER               Cost=24     Cardinality=1     Bytes=143
    NESTED LOOPS OUTER               Cost=23     Cardinality=1     Bytes=93
    TABLE ACCESS BY INDEX ROWID     Object owner=RBI     Object name=IBS_WORK_BANKDATA     Cost=22     Cardinality=1     Bytes=52
    INDEX SKIP SCAN     Object owner=RBI     Object name=IBS_WORK_BANKDATA_IDX     Cost=7     Cardinality=1     
    TABLE ACCESS FULL     Object owner=RBI     Object name=IBS_CURRENCYMASTER     Cost=1     Cardinality=178     Bytes=7298
    TABLE ACCESS FULL     Object owner=RBI     Object name=IBS_CURRENCYEXCHANGERATE     Cost=1     Cardinality=19     Bytes=950
    INDEX RANGE SCAN     Object owner=RBI     Object name=IBS_ORG_BANKDATA_IDX     Cost=1     Cardinality=204     
    please help.

  • 9i on Linux. Problems with Temp tablespace cleanup

    I am currently running Oracle 9i Enterprise on SUSE Linux 7.2.
    I am executing queries against the new XMLType datatype and every query adds to the Temp tablespace, which doesn't get cleaned up. Eventually, the tablespace will run out of space and Oracle will issue and error:
    ORA-01652: unable to extend temp segment by 128 in tablespace <name>
    The only way to clean up the Temp tablespace seems to be by restarting the server.
    Is that happening on other platforms as well? I would appreciate any help.

    Hi
    You can connect to the database as DBA (Sys or System) and make a bigger temporal tablespace. Or create a new bigger temporary tablespace and assign it to the user.
    A10!
    PS: Temporary tablespace is used when no memory available for the session, for example when a big ORDER BY is done. Try to increase the memory assigned, just look at initXXX.ora (sort_size)

  • Character set problem with transportable tablespace

    Hi,
    I'm trying to import a transportable tablespace with data pump into a database with a different character set compared to the source database. I know this is by default not possible. But there's no violating data in the tablespace that could make it a problem when transfering the TS. So I issued 'ALTER SYSTEM SET "_tts_allow_nchar_mismatch"=true;' on the target to force the import. However; I still get the eror:
    ORA-29345: can not plug a tablespace into a database using a different character set
    How can I fix this?

    Hi,
    What're the character sets of the source and target database?
    A general restriction of transportable tablespace is that the source and target databases must use the same database character set.
    Regards
    Nat

  • 11.2.2.4.0 - Problem with temporary space in simple query

    ttVersion
    TimesTen Release 11.2.2.4.0 (64 bit Linux/x86_64) (timesten:53396) 2012-09-24T08:28:05Z
    Instance admin: root
    Instance home directory: /opt/TimesTen/timesten
    World accessible
    Daemon home directory: /var/TimesTen/timesten
    I get "TT0802: Database temporary space exhausted" error in simple query with small data amount; Timesten try to allocate *40000312* bytes
    describe adm.peer
    Table ADM.PEER:
    Name Null Type
    PEER_ID NOT NULL TT_SMALLINT
    CLUSTER_ID NOT NULL TT_TINYINT
    DIALECT NOT NULL TT_INTEGER
    HOST NOT NULL TT_VARCHAR(256 BYTE)
    REALM NOT NULL TT_VARCHAR(256 BYTE)
    ADDRESS TT_VARCHAR(256 BYTE)
    PORT NOT NULL TT_INTEGER
    PROTOCOL NOT NULL TT_INTEGER
    AUTO_CONNECT NOT NULL TT_TINYINT
    ENABLED NOT NULL TT_TINYINT
    PRIORITY NOT NULL TT_TINYINT
    MANDATORY NOT NULL TT_TINYINT
    TSTAMP BINARY(8)
    1 rows selected
    describe adm.session
    Table ADM.SESSION:
    Name Null Type
    SESSION_ID NOT NULL TT_VARCHAR(64 BYTE) inline
    OBJ_ID NOT NULL TT_BIGINT
    PR_OBJ_ID NOT NULL TT_BIGINT
    SUBSCRIBER_ID NOT NULL TT_VARCHAR(32 BYTE) inline
    IP NOT NULL TT_VARCHAR(15 BYTE) inline
    IPV6_PREFIX TT_VARCHAR(39 BYTE) inline
    IPV6_PREFIX_LEN NOT NULL TT_TINYINT
    CREATE_TIME NOT NULL TT_TIMESTAMP
    UPDATE_TIME NOT NULL TT_TIMESTAMP
    RULES_SET_ID NOT NULL TT_BIGINT
    PEER_ID NOT NULL TT_SMALLINT
    MY_PEER_ID NOT NULL TT_SMALLINT
    PROFILE_HASHC NOT NULL TT_BIGINT
    FLAGS NOT NULL TT_INTEGER
    QOS_POLICY_NAME NOT NULL TT_VARCHAR(32 BYTE) inline
    BSID NOT NULL TT_BIGINT
    CONGESTION_FLAG NOT NULL TT_TINYINT
    SERVICE_CATEGORY_ID TT_VARCHAR(32 BYTE) inline
    EVENT_CAUSE NOT NULL TT_TINYINT
    EVENT_TIME TT_TIMESTAMP
    TSTAMP BINARY(8)
    1 rows selected
    select * from adm.peer;
    PEER_ID CLUSTER_ID DIALECT HOST REALM ADDRESS PORT PROTOCOL AUTO_CONNECT ENABLED PRIORITY MANDATORY TSTAMP
    21 2 0 ddf1.server.com diameter.realm ddf1.server.com 3868 6 1 1 0 1 (null)
    22 2 0 ddf2.server.com diameter.realm ddf2.server.com 3868 6 1 1 1 1 (null)
    101 233 0 peer_101 testik.com peer_101.testik.com 3886 0 0 1 101 0 (null)
    102 233 0 peer_102 testik.com peer_102.testik.com 3886 0 0 1 102 0 (null)
    1 1 0 vr-t500.testik.com diameter.realm vr-t500.testik.com 3868 6 1 1 0 1 (null)
    5 rows selected
    select * from adm.session;
    SESSION_ID OBJ_ID PR_OBJ_ID SUBSCRIBER_ID IP IPV6_PREFIX IPV6_PREFIX_LEN CREATE_TIME UPDATE_TIME RULES_SET_ID PEER_ID MY_PEER_ID PROFILE_HASHC FLAGS QOS_POLICY_NAME BSID CONGESTION_FLAG SERVICE_CATEGORY_ID EVENT_CAUSE EVENT_TIME TSTAMP
    TEST_SESSION 13300000000020027 0 TEST_SUBSCRIBER 94.25.209.27 0 2012-10-18 12:56:07.155381000 2012-10-18 12:56:07.155381000 1 101 1 0 0 0 0 DEFAULT 0 (null) (null)
    TEST_SESSION2 13300000000020028 13300000000020027 TEST_SUBSCRIBER 94.25.209.27 0 2012-10-18 12:56:07.155687000 2012-10-18 12:56:07.155687000 1 102 1 0 4 0 0 DEFAULT 0 (null) (null)
    2 rows selected
    SELECT p.address, count(*) as session_count from session s, peer p where p.peer_id = s.peer_id group by p.address failed,
    TT0802: Database temporary space exhausted
    dssize
    PERM_ALLOCATED_SIZE:     307200.0
    PERM_IN_USE_SIZE:     61763.0
    PERM_IN_USE_HIGH_WATER:     69393.0
    TEMP_ALLOCATED_SIZE:     37888.0
    TEMP_IN_USE_SIZE:     13494.0
    TEMP_IN_USE_HIGH_WATER:     21307.0
    This is additional error info when this code exuted inside C code:
    [TimesTen][TimesTen 11.2.2.4.0 ODBC Driver][TimesTen]TT0802: Database temporary space exhausted -- file "blk.c", lineno 3477, procedure "sbBlkAlloc"
    ODBC Error/Warning = S1000, Additional Error/Warning = 802
    [TimesTen][TimesTen 11.2.2.4.0 ODBC Driver][TimesTen]TT6221: Temporary data partition free space insufficient to allocate *40000312* bytes of memory -- file "blk.c", lineno 3477, procedure "sbBlkAlloc"
    ODBC Error/Warning = S1000, Additional Error/Warning = 6221
    Edited by: Vladimir Romanov on 18.10.2012 13:13
    Edited by: Vladimir Romanov on 18.10.2012 13:51

    This may well be
    Bug 14634954 - SELECT WITH GROUP BY REQUESTS LARGE TEMP MEMORY GETS TT0802 / TT6221
    The bug is fixed in 11.2.2.4.1 which is hopefully due before the end of October. Can you run your test on 11.2.1 as well? The problem should not reproduce there as it is specific to 11.2.2

  • Problem with Temporary Table (Urgent)

    Hi all,
    Yesterday also i was facing da problem of gettin records from a global temporary table .. Today also i made a procedure in which i have to create a temporary table according to da select query ..and when i m printing da count(*) from tht table .. result is 0 tht means records r not inserting ..
    But if i m creatin it as a normal Create Table i m gettin da result..
    I want the table shud b created n records fetch by the query shud b inserted.. I have checked query is fetchin records..
    Sorri but still da same proble .. pls help me out
    PROCEDURE prn_trnASRGetStudentCertInfo(strIntakeSession          IN sisStudent.IntakeSession          %TYPE,      
                             strProgramCode          IN sisStudent.ProgramCode          %TYPE)
         AS
         intCount Number(3);
         SQLSTR     varchar2(100);     
         BEGIN
              EXECUTE IMMEDIATE 'CREATE GLOBAL TEMPORARY TABLE tmpStudentCert
                        AS
                        SELECT     sisEnrolment.EnrolmentID     As EnrolmentID,     
                                  sisEnrolment.StudentID          As StudentID,
                                  sisEnrolment.ProgramCode     As PrgCode,
                                  sisCourseEnrolled.CourseCode     As CourseCode,
                                  sisCourseEnrolled.Status     As Status,
                                  exmCCResult.Status           As exmStatus     
                        FROM          sisStudent
                        INNER JOIN sisEnrolment
                        ON
                             sisStudent.StudentID = sisEnrolment.StudentID
                        INNER JOIN sisCourseEnrolled
                        ON
                             sisEnrolment.EnrolmentID = sisCourseEnrolled.EnrolmentID
                        INNER JOIN exmCCResult
                        ON
                             sisCourseEnrolled.CourseCode =      exmCCResult.CourseCode
                        AND
                             sisCourseEnrolled.ProgramCode = exmCCResult.ProgramCode     
                        WHERE
                             UPPER(TRIM(sisStudent.IntakeSession)) = UPPER(TRIM('''||strIntakeSession||'''))
                        AND
                             UPPER(TRIM(sisStudent.ProgramCode)) = UPPER(TRIM('''||strProgramCode||'''))
                        AND
                             UPPER(TRIM(sisCourseEnrolled.Status)) <> TRIM(''D'')
                        AND
                             UPPER(TRIM(exmCCResult.Status)) = TRIM(''P'')';
              COMMIT;     
              SQLSTR := 'SELECT COUNT(*) FROM TMPSTUDENTCERT';
              EXECUTE IMMEDIATE SQLSTR INTO INTCOUNT;
              dbms_OUTPUT.PUT_LINE(INTCOUNT);
         END prn_trnASRGetStudentCertInfo;

    Hi there,
    You have had quite a few replies from the previous post and you should have learnt from that.
    Creating a procedure to do what you are trying to do is logically not sound.
    Firstly, a Global temporary table IS a database object which continous to exist like a normal table except that its data is not permanent. Therefore, there is no point in creating it dynamically in a procedure.
    Secondly, as I pointed out earlier, the data is temporary and it is gone once you issue a commit. A DDL like 'Create Table' will implicitly issue a commit after it has created the table - therefore all the data inserted as part of the Create Table statement will never be there.
    Hence, the subsequent SELECT COUNT(*) from the table will always return 0.
    Regards,
    John

  • Problem with temporary queues

    Hi,
              I've setup a template for temporary queues in the weblogic console (8.1SP4). However, I'm getting an exception when trying to destroy the queue after use. This doesn't happen with other JMS providers, so is there something special to Weblogic about temp queues? Is there a specific option that needs to be set in the template?
              Queue: MyJMSServer.TemporaryQueue1390
              weblogic.jms.common.JMSException: Destination is in use
              at
              weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
              at
              weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:137)
              at
              weblogic.jms.dispatcher.DispatcherImpl_814_WLStub.dispatchSyncFuture(Unknown
              Source)
              at
              weblogic.jms.dispatcher.DispatcherWrapperState.dispatchSync(DispatcherWrapperState.java:3
              45)
              at
              weblogic.jms.client.JMSConnection.destroyTemporaryDestination(JMSConnection.java:1089)
              at
              weblogic.jms.common.DestinationImpl.delete(DestinationImpl.java:455)
              at
              com.trs.cv.fmk.fcms.common.impl.TimeoutQueueRequestor.request(TimeoutQueueRequestor.java:
              203)
              at
              com.trs.cv.fmk.fcms.cas.client.impl.CasCnsIntegration.request(CasCnsIntegration.java:203)
              Thanks,
              Nasrin

    If there are still application receivers on the temporary destination, the call will fail. (As specified in the JMS javadoc.) Perhaps this is the reason for the exception? In which case the application needs to close its receivers first.

  • Problem with UNDO tablespace

    Hi guys.
    Our database has 50GB of undo tablespace. I decided to create a second undo tablespace and switch to the new one. Since doing that yesterday, the size of the old undo is 49GB (was thinking that the values will drop to zero) and the new tablespace keeps increasing in size! Its size now is about 20GB. I do have the following question.
    a) If I restart the database, it the value of the old undo going to fall to zero?
    b) undo_retention=86400. Setting this value to a lesser value say 800seconds, it is going to act the performance of the database? Is it going to release the space on the old undo?
    Thanks and any help is appreciated.
    David

    The undo tablespace will not automatically shrink size, since you have a new undo tablespace in place. You can drop the old one if you don't plan to use it.
    Set lower undo_retention will certainly help to contain the undo space usage. However you should query v$undostat and v$rollstat to estimate the amount of undo space required for the current workload then size the undo tablespace accordingly. Turn off the auto extend on undo tablespace.

  • Problem with temporary table in stored procedure

    Hi,
    I have to execute a stored procedure in java , where the stored procedure has refcursor as out parameter and within the procedure the refcursor out parameter is populated from a temporary table
    when iam trying to get the resultset in my program iam getting the oracle error: ora-08103 object is no longer in use.
    I think this is becos the temporary table object is not available to my program
    can any one please help me

    I don't understand this part.
    Your procedure has "argSchemaName" as input parameter. Why do you have hardcoded owner name here in the cursor?
    >>
    CURSOR csrEligTables IS
    SELECT
    object_name
    FROM
    all_objects
    WHERE
    Owner = 'HI0XXX001'
    AND
    >>
    The anonymous block that you are running also has same owner name.

  • Problems with resizing tablespace.

    Hello
    When I installed Oracle Application Express I use SYSAUX as default tablespace.
    During unsuccessful transaction I increased this tablespace up to 5,5 Gb. After dropping all unneeded data I have 700 Mb of used space.
    When I tried to alter database datafile ... resize 1 Gb, I received an error ORA-03297: file contains used data beyond requested RESIZE value .
    Is there some way to defragment tablespace
    Best Regards, Kostya Proskudin
    P.S. I use 10g

    Never use SYSAUX or SYSTEM tablespace as the default tablespace. Query dba_extents to find out which segments are located towards the end of the file, then move these segments to another tablespace and then you'll be able to shrink the datafile, unless of course, a sys or system extent is occupying the space.

  • Clear the temporary tablespace

    Dear All,
    I've created a database in 10G (10.2.0). But currently running with a space problem in temporary tablespace. My database in 365X24 hrs. in such situation how to clear the temporary tablespace by keeping the database open for future operation.

    Granting privileges to a role is not necessary either ETC however everybody grants privs. to a role and roles are granted to users. When you do not do that way, you will get confused.
    What i ment with necessary is this. I tried to describe it but you don't want to understand i guess.
    I am not feel offended but Paul M. is an Oracle ACE member and he can reply to me. He asked me the question and i answered.
    As you can see it from above, i posted that it's not necessary. What i want to say is an useful fact.

  • Problem with full database backup.

    This is what I got after execute backup full database statement
    "RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/03/2009 14:15:15
    ORA-19502: write error on file "/u01/app/oracle/backup/ORCL/ora_df680537660_s2_s1", blockno 25985 (blocksize=8192)
    ORA-27072: File I/O error
    Linux Error: 2: No such file or directory
    Additional information: 4
    Additional information: 25985
    Additional information: 483328"
    I have quite the same problem with create tablespace, I can't create tablespace 512m, but I can create the same tablespace only 100m.
    I think it must be somethink with storage???

    Starting backup at 03-MAR-09
    using channel ORA_DISK_1
    input datafile fno=00015 name=/u01/app/oracle/oradata/o2_mf_system_48fprop3_.dbf
    input datafile fno=00003 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_sysaux_48fpropg_.dbf
    input datafile fno=00014 name=/u01/app/oracle/oradata/o2_mf_sysaux_48fpropg_.dbf
    input datafile fno=00005 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_example_48fpw04c_.dbf
    input datafile fno=00017 name=/u01/app/oracle/oradata/ORCL/datafile/rcvcat01.dbf
    input datafile fno=00002 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_undotbs1_48fprovo_.dbf
    input datafile fno=00016 name=/u01/app/oracle/oradata/inventory03.dbf
    input datafile fno=00011 name=/u01/app/oracle/oradata/ORCL/datafile/inventory01.dbf
    input datafile fno=00012 name=/u01/app/oracle/oradata/ORCL/datafile/inventory02.dbf
    input datafile fno=00006 name=/u01/app/oracle/oradata/ORCL/datafile/ts01.dbf
    input datafile fno=00008 name=/u01/app/oracle/oradata/ORCL/datafile/ts02.dbf
    input datafile fno=00001 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_48fprop3_.dbf
    channel ORA_DISK_1: specifying datafile(s) in backupset
    channel ORA_DISK_1: starting full datafile backupset
    input datafile fno=00009 name=/u01/app/oracle/oradata/ORCL/datafile/undo01.dbf
    channel ORA_DISK_1: starting piece 1 at 03-MAR-09
    input datafile fno=00013 name=/u01/app/oracle/oradata/ORCL/datafile/val01.dbf
    input datafile fno=00007 name=/u01/app/oracle/oradata/ORCL/datafile/test_reorg0
    input datafile fno=00004 name=/u01/app/oracle/oradata/ORCL/datafile/o1_mf_users_48fprowb_.dbf
    input datafile fno=00010 name=/u01/app/oracle/oradata/ORCL/datafile/ts01b.dbf
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/03/2009 14:15:15
    ORA-19502: write error on file "/u01/app/oracle/backup/ORCL/ora_df680537660_s2_s1", blockno 25985 (blocksize=8192)
    ORA-27072: File I/O error
    Linux Error: 2: No such file or directory
    Additional information: 4
    Additional information: 483328
    Additional information: 25985
    Directory exist because I can backup single tablespace, into the same directory, I just can't backup whole database.
    Edited by: val75 on Mar 3, 2009 1:57 PM

  • Cleaning up temporary tablespace

    Hi,
    I am facing a problem where temporary tablespace of the production database has grown to 23GB.The instance cannot be bounced and there is very little space left for the rest of the database.I want to free up the excess space.I know I can do it by creating a new temp tablespace,assigning it as default and dropping the old one.But I want to know how I can resize the existing temp tablespace.when I try the following command:
    alter database datafile '/d02/oradata/<SID>/temp01.dbf' resize 1G;
    it gives the following error:
    file contains used data beyond requested RESIZE value.
    How can I get around the above problem.there is no session using TEMP tablespace.Plz suggest a solution as I really want to know how this can be done.

    First of all, You can't resize the temp tablespace datafiles size as once the temp tbs allocate extents, after the operation finishes, oracle won't deallocate them as it keep them for future requirements and usage.
    What you can do in your case, as you cant bounce the db, create another temp tablespace and assign it as default temp tbs and drop the old one.
    Also, dont keep its datafiles for auto extend and if you see any error message in alter log file like 'unable to extend temp tablespace' then increase the size. If you feel your queries may fail due to this, you can also use resumable option and investigate why does it requred 20+G for temp?
    SJH
    OCP DBA

Maybe you are looking for