Permanent tablesspace as temporary table space

Hi friends
I am having a database(8i) which uses normal(permanent) tablesspace as temporary tablespace(TEMPORARY_TABLESPACE). Is it compulsory that we have to create temporary ( I mean 'create temporary tablespace') tablespace for tempoarary tablespace . Is there any performance issue if i am using perment tablespace as temp tablespace.

As mentioned previously, a tablespace of type temporary should be defined for temporary tablespace (for each and every user.)
The purpose of the tablespace is for sorting WHEN THE SORT DOES NOT FIT IN MEMORY (sort_area_size) - and after the sort, the space is released.
It is entirely possible that all activity requiring sorting fits into memory for your system, so you would not see a performance hit. (btw - an index build is usually a sort.) I would recommend checking to see which objects may be in that tablespace.
Either way, I would create a new temporary tablespace of type temporary (new_temp).
Then I would 'alter user ' username temporary tablespace new_temp for each and every user in DBA_USERS.
As for the brevity of responses, I certainly can't blame Hans. After a fair amount of lurking on these boards, I get somewhat discouraged myself. Posts like 'Please Help me do my homework' , 'where can I download Oracle', and my absolute favorite 'What is one the Oracle Certification Test' actually make me chuckle, and mutter RTFM to my display.
What does seem to make me wonder, is how many of these people are 'learners' and how many actually hold a DBA title?

Similar Messages

  • Temporary table space usage

    Hi could someone help me ...
    for the following query...
    SELECT returnflag
    , linestatus
    , sum(quantity) as sum_qty
    , sum(extendedprice) as sum_base_price
    , sum(extendedprice * (1 - iscount)) as sum_disc_price
    , sum(extendedprice * (1 - iscount) * (1 + l_tax)) as sum_charge
    , avg(quantity) as avg_qty, avg(extendedprice) as avg_price
    , avg(iscount) as avg_disc, count(*) as count_order
    FROM lineitem
    WHERE shipdate <= date '1998-12-01'
    GROUP BY returnflag, linestatus
    ORDER BY returnflag, linestatus;
    Explain Plan :
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 5 | 135 | 299K (2)| 01:00:00 |
    | 1 | SORT GROUP BY | | 5 | 135 | 299K (2)| 01:00:00 |
    |* 2 | TABLE ACCESS FULL| LINEITEM | 57M| 1493M| 297K (1)| 00:59:35 |
    Predicate Information (identified by operation id):
    2 - filter("L_SHIPDATE"<=TO_DATE(' 1998-09-02 00:00:00',
    'syyyy-mm-dd hh24:mi:ss'))
    would any parts of this query be carried out on the temporary table space (sums and averages? / sort group by?) ... or what impact would the temp table space have when running this query?
    any help would be appriciated

    im using 11g r2,
    what about usage of temporary table space (approximatly) with the following ..
    ============================================
    create view revenue (supplier_no, total_revenue) as
    select
    suppkey, sum(extendedprice * (1 - iscount))
    from
    lineitem
    where
    shipdate >= date '1994-12-01'
    group by
    suppkey;
    select suppkey, name, address, phone, total_revenue
    from supplier, revenue
    where suppkey = supplier_no and total_revenue = (select max(total_revenue)from revenue)
    order by suppkey;
    ==========================================================
    View created.
    Execution Plan
    Plan hash value: 2790460729
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)|
    Time |
    | 0 | SELECT STATEMENT | | 50000 | 5126K| | 381K (1)|
    01:16:23 |
    | 1 | MERGE JOIN | | 50000 | 5126K| | 381K (1)|
    01:16:23 |
    | 2 | SORT JOIN | | 100K| 3027K| | 380K (1)|
    01:16:09 |
    |* 3 | VIEW | REVENUE | 100K| 3027K| | 380K (1)|
    01:16:09 |
    | 4 | WINDOW BUFFER | | 100K| 2148K| | 380K (1)|
    01:16:09 |
    | 5 | HASH GROUP BY | | 100K| 2148K| 1207M| 380K (1)|
    01:16:09 |
    |* 6 | TABLE ACCESS FULL| LINEITEM | 34M| 733M| | 297K (1)|
    00:59:35 |
    |* 7 | SORT JOIN | | 50000 | 3613K| 8712K| 1182 (1)|
    00:00:15 |
    | 8 | TABLE ACCESS FULL | SUPPLIER | 50000 | 3613K| | 308 (1)|
    00:00:04 |
    Predicate Information (identified by operation id):
    3 - filter("TOTAL_REVENUE"="ITEM_1")
    6 - filter("L_SHIPDATE">=TO_DATE(' 1994-12-01 00:00:00', 'syyyy-mm-dd
    hh24:mi:ss'))
    7 - access("S_SUPPKEY"="SUPPLIER_NO")
    filter("S_SUPPKEY"="SUPPLIER_NO")
    Statistics
    =========================================================
    presumably temp table space will be used for sort and merge joins? .. but how does temp table space work with the view?

  • Global Temporary Table Space

    Hi
    Can any one give me some information about GLOBAL TEMPORARY TABLE.
    Thnx & Regards
    Sunil

    http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96590/adg03sch.htm#7794

  • Clob temporary table space is not released

    In our java web application, it uses datasource to call oralce stored procedure and get back data in Clob data type. The oracle version is 8.1.7.4. After the database call, the database connection is closed. But I found that the tablespace for Clob data is not released. Right now it becomes a critical issue of our production database. Anybody has any clue? Really appreciate.

    Team,
    We have a table of size 550gigs in size and we truncated the table , truncated sucessfully but space is not released in os level, what action we can take to release the space and this table has only one row and contains the binary data.
    Thanks
    PGR
    Hello,
    Yes space wont be released immediately .If large extents are in picture which I assume is your case it goes into deferred drop a background process which will execute after some time( time may vary).See below link for details.
    As per BOL if extents are more than 128 it goes in deferred drop.
    http://msdn.microsoft.com/en-us/library/ms177495.aspx
    You should wait for some time .keep checking the free space
    Below discussion will surely help you in understanding.See Jonathan's reply
    http://social.msdn.microsoft.com/Forums/en-US/4aa2537e-246b-4bfe-818d-3482531d9149/sql-server-2005-massive-400gb-table-dropped-space-not-released
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • When to use PGA_AGGREGATE_TARGET and when to use temporary table space?

    Hi, all.
    I am a little confused with regard to when to use pga work area, and
    when to use temporary tablespace?
    Is there any one who could give me an advice or a document?
    Thanks in advance.
    Best Regards.
    Message was edited by:
    user507290

    You are more than a little confused... What has one to do with the other, do you think?
    All Oracle documentation is at http://tahiti.oracle.com - I suggest you start with the Concepts manual of your version

  • Temporary table space?

    Hi,
    I created view called swartview. and when i execute
    select * from swartview i get this error
    ORA-01652: unable to extend temp segment by 128 in tablespace PSAPTEMP
    wat does 128 denote?? 128 mb or kb..
    Is it OK to add a datafile for teh tablespace PSAPTEMP?
    If its a temporary tablespace wat is te syntax to add a tempfile??
    alter tablespace psaptemp add tempfile..??
    Kindly help..

    Its a generic error message which comes when temp tbs becomes full and can't extend further. You may try your option after some time by which temp become free from other statements or add a datafile or increase the size of existing datafle of temp tbs.
    Following command would be used to add a datafile to temp tbs.
    ALTER TABLESPACE PSAPTEMP
    ADD TEMPFILE 'TEMP02.ora' SIZE 50M;
    Jaffar
    Message was edited by:
    The Human Fly

  • Temp Tables space problem with ORA-01114 and  ORA-27072:

    RDBMS :Oracle:9.2.0
    OS: Linux AS3
    Storage: SAND arrray (RAID 5)
    Problem on exeuting dml statement
    SQL> select * from myview ;
    select * from myview
    ERROR at line 1:
    ORA-01114: IO error writing block to file 201 (block # 3977)
    ORA-27072: skgfdisp: I/O error
    Linux Error: 28: No space left on device
    Additional information: 3976
    ORA-01114: IO error writing block to file 201 (block # 3977)
    ORA-27072: skgfdisp: I/O error
    Linux Error: 28: No space left on device
    Additional information: 3976
    With Regards
    Joy

    Hello joy,
    So, still looking for solution. I suggest you a sloution and it works well only if as you mentioned (in your previous post) that file causing error is temp file. So, get rid of this better you create new temporary table space and drop old one and then delete the old files manually.
    But this will work only for Temp Tablespace not for normal tablespaces and datafiles. Prepare new temporary tablespace at different location from the previous one, try to make it on different disk beacuse it may be due to corruption of physical medium too.
    Try this. If it works... you are through... otherwise i have no other options...
    Please update.....

  • Insert slow into Global Temporary Table...

    I am working with a stored procedure that does a select into a global temporary table and it is really slow. I have read up on the append hint and know that it is not a solution since GTT's are in the temporary table space which are thus always appended and never have logs.
    Is there something else that I need to know about performance for GTT? I find it hard to believe that Oracle would find it acceptable to take 50 seconds to insert 3300 rows.

    My apologies in advance as my skill level with Oracle is not as high as I would like for this type of analysis and remediation.
    I had thought of it being the select as well but if I run it by itself it takes about 1 second. The interesting part is when I explain plan on it with the Insert, the SQL plan changes.
    Here is the Non-insert explain plan:
    <code class="jive-code jive-java">
    Plan hash value: 3474166068
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 51 | 8 (38)| 00:00:01 |
    | 1 | HASH GROUP BY | | 1 | 51 | 8 (38)| 00:00:01 |
    | 2 | VIEW | VM_NWVW_1 | 1 | 51 | 7 (29)| 00:00:01 |
    | 3 | HASH UNIQUE | | 1 | 115 | 7 (29)| 00:00:01 |
    | 4 | NESTED LOOPS | | | | | |
    | 5 | NESTED LOOPS | | 1 | 115 | 6 (17)| 00:00:01 |
    | 6 | NESTED LOOPS | | 1 | 82 | 5 (20)| 00:00:01 |
    | 7 | SORT UNIQUE | | 1 | 23 | 2 (0)| 00:00:01 |
    | 8 | TABLE ACCESS BY INDEX ROWID| PEAKSPEAKDAYSEG$METERMASTER | 1 | 23 | 2 (0)| 00:00:01 |
    |* 9 | INDEX RANGE SCAN | IDX_PDSEG$MTR_SEGID | 1 | | 1 (0)| 00:00:01 |
    |* 10 | TABLE ACCESS BY INDEX ROWID | FC_FFMTR_DAILY | 1 | 59 | 2 (0)| 00:00:01 |
    |* 11 | INDEX RANGE SCAN | FC_FFMTRDLY_IDX10 | 2461 | | 2 (0)| 00:00:01 |
    |* 12 | INDEX UNIQUE SCAN | FC_METER_PK | 1 | | 0 (0)| 00:00:01 |
    | 13 | TABLE ACCESS BY INDEX ROWID | FC_METER | 1 | 33 | 1 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    9 - access("SM"."SEGID"=584)
    10 - filter(TO_DATE(TO_CHAR("V"."MEASUREMENT_DAY"),'YYYYMMDD')>=TO_DATE(' 2002-01-01 00:00:00',
    'syyyy-mm-dd hh24:mi:ss') AND TO_DATE(TO_CHAR("V"."MEASUREMENT_DAY"),'YYYYMMDD')<TO_DATE(' 2003-01-01
    00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND ("V"."ADJUSTED_TOTAL_VOLUME"<>0.0 OR
    ROUND("V"."ADJUSTED_TOTAL_ENERGY",3)<>0.0))
    11 - access("V"."METER_NUMBER"="SM"."METER_ID")
    12 - access("M"."METER_NUMBER"="V"."METER_NUMBER")
    </code>
    Here is the Insert explain plan:
    <code class="jive-code jive-java">
    Plan hash value: 4282493455
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
    | 0 | INSERT STATEMENT | | 39 | 2886 | | 7810 (1)| 00:01:34 |
    | 1 | LOAD TABLE CONVENTIONAL | PEAKDAY_TEMP_CONSECUTIVEVALUES | | | | | |
    | 2 | HASH GROUP BY | | 39 | 2886 | | 7810 (1)| 00:01:34 |
    |* 3 | HASH JOIN RIGHT SEMI | | 39 | 2886 | | 7809 (1)| 00:01:34 |
    | 4 | VIEW | VW_NSO_1 | 1 | 10 | | 2 (0)| 00:00:01 |
    | 5 | NESTED LOOPS | | 1 | 27 | | 2 (0)| 00:00:01 |
    |* 6 | INDEX UNIQUE SCAN | PK_PEAKSPEAKDAYSEG | 1 | 4 | | 0 (0)| 00:00:01 |
    | 7 | TABLE ACCESS BY INDEX ROWID | PEAKSPEAKDAYSEG$METERMASTER | 1 | 23 | | 2 (0)| 00:00:01 |
    |* 8 | INDEX RANGE SCAN | IDX_PDSEG$MTR_SEGID | 1 | | | 1 (0)| 00:00:01 |
    | 9 | VIEW | PEAKS_RP_PEAKDAYMETER | 3894 | 243K| | 7807 (1)| 00:01:34 |
    | 10 | SORT UNIQUE | | 3894 | 349K| 448K| 7807 (1)| 00:01:34 |
    | 11 | NESTED LOOPS | | | | | | |
    | 12 | NESTED LOOPS | | 3894 | 349K| | 7722 (1)| 00:01:33 |
    | 13 | TABLE ACCESS FULL | FC_METER | 637 | 21021 | | 18 (0)| 00:00:01 |
    |* 14 | INDEX RANGE SCAN | FC_FFMTRDLY_IDX11 | 6 | | | 10 (0)| 00:00:01 |
    |* 15 | TABLE ACCESS BY INDEX ROWID| FC_FFMTR_DAILY | 6 | 354 | | 12 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    3 - access("METER_ID"="METER_ID")
    6 - access("GS"."SEGID"=584)
    8 - access("SM"."SEGID"=584)
    14 - access("M"."METER_NUMBER"="V"."METER_NUMBER")
    filter(TO_DATE(TO_CHAR("V"."MEASUREMENT_DAY"),'YYYYMMDD')>=TO_DATE(' 2002-01-01 00:00:00', 'syyyy-mm-dd
    hh24:mi:ss') AND TO_DATE(TO_CHAR("V"."MEASUREMENT_DAY"),'YYYYMMDD')<TO_DATE(' 2003-01-01 00:00:00', 'syyyy-mm-dd
    hh24:mi:ss'))
    15 - filter("V"."ADJUSTED_TOTAL_VOLUME"<>0.0 OR ROUND("V"."ADJUSTED_TOTAL_ENERGY",3)<>0.0)
    </code>
    As you can see there is a real spike in the cost and yet the only thing that was done was the addition of the Insert to GTT. From what I can ascertain the solution may be in an alternate SQL or finding some way to push Oracle into running the query as it would have for the first execution (non-insert).
    I tried creating a simple view out of the SELECT statement to see if that would precompile it but in the end it ran exactly the same way.
    The next thing that I am going to try is removing the PEAKS_RP_PEAKDAYMETER view by going more direct.
    I have not done the trace file analysis yet. Should I still do that?

  • Table space not getting cleaned after using free method (permanent delete)

    Hi ,
    We are using the free method of the LIB OBJ, to permanently delete the objects. As per documentation, the ContentGarbageCollectionAgent will be cleaning the database which runs in a scheduled mode. But the log of that ContentGargabageCollectionAsgent shows, all zero for objects without reference, objects cleared,etc. I.e the table space remains the same before and after deleteing all the contents in the cmsdk database. But the agent is running as per the schedule but just comes out doing nothing.
    Can anbody put some light on this issue.
    thanks
    Raj.

    Hi Matt,
    Thanks for replying. It's been a very long time waiting for you ;)
    ---"Are you running the 9.2.0.1, 9.2.0.2, or 9.2.0.3 version of the Database?"
    we are using 9.2.0.1
    ---"If you installed the CM SDK schema in the "users" tablespace ......."
    Yes we are using USERS tablespace for our Development.
    I ran the query. The result is:
    SYSTEM MANUAL NOT AFFECTED
    USERS MANUAL NOT AFFECTED
    CTXSYS_DATA MANUAL NOT AFFECTED
    CMSDK1_DATA MANUAL NOT AFFECTED
    (USERS belongs to develpoment cmsdk schema. And CMSDK1 for Prod CMSDK schema)
    From the results I see only "Manual", but still I don't see the tablespace size being coming down. Both table space sizes (USER and CMSDK1) always grows higher and higher.
    Also to let you know, We use ORACLE EM Console (Standalone) application to see the oracle databse information online. Will there be any thing to do with the tool we use to see the table space sizes. We make sure we always refresh it before making a note.
    So is there anything else I can see. Once I saw the ContentGarbageCollection agent to free 1025 objects and deleted 0 objects. But I don't see any change in the table space size. I am little confused b/w freed and deleted.
    thanks once again for your response Matt.
    -Raj.

  • Use of global temporary tables in Procedures

    Hi
    I am using global temporary tables in the procedures. Loading data in the same table through many procedures. I am fetching the data from the global temporary table in PRO-C by a cursor. Will this degrade performance?
    Please help me..
    Thanks in Advance...

    Will this degrade performance?That depends... in comparison to what?
    Loading data into temporary tables will generally be more efficient than loading data into permanent tables because Oracle needs to do less to protect this data since it is inherently transient. On the other hand, loading the data into a table in the first place tends to be more expensive than alternatives like using a single SQL statement, a pipelined table function, or an in memory collection.
    Justin

  • How to Create a Temporary Table with SQL Server

    I know you can create a temporary table in SQL Server 2000, but not quite sure how to do it in CFMX 7, i.e., does the SQL go inside a <CFQUERY dbtype="query"> tag?
    I'm pulling the main set of records from an Oracle server (1st data source), but it does not contain employee names, only employee IDs.  Since I need to show the employee name along with the Emp ID, I'm then pulling a list of "current" employee names from a SQL Server (2nd data source), which is the main database on our CF server.
    I've got a QofQ that works fine, except it only matches EmpIDs that exist in both result sets.  Employees who are no longer employed, don't match, and don't display.  Since I can't do a LEFT OUTER JOIN with a QofQ, what I need to do is get the records from the Oracle server into the SQL Server.  Preferably in a temporary table.
    I was hoping if I could get those Oracle records written to a temp table on the main SQL Server, in same database as the Employee Name table, I could then write a normal <CFQUERY> that uses a LEFT OUTER JOIN.
    I think I could probably write a Stored Procedure that would execute the SQL to create the temporary table, but am trying to avoid having to write the SP, and do it the simplest way.
    This query will be a program that can be run hundreds of times per day, with a form that allows users to select date ranges, locations, and other options.  That starts the queries, which creates the report.  So I just need the temp table to exist only until all the SQL has run, and the <CFOUTPUT> has generated a report.
    If the premise is right, I just need some help with the syntax for creating a SQL Server temp table, when you want to write records to it from an external data source.  I'm trying the following, but getting an error:
    <CFQUERY name="ITE_Temp" datasource="SkynetSQL">
    CREATE TABLE #MyTemp
    (   INSERT INTO #MyTemp
    ITE2.TrueFile char (7) NOT NULL,
    ITE2.CountOfEmployee int NULL,
    ITE2.DTL_SUBTOT decimal NULL,
    ITE2.EMPTYPE char (3) NULL,
    ITE2.ARPT_CD char (3) NULL
    </CFQUERY>
    So I actually created a permanent table on the SQL Server, and wrote the below SQL, which does work, and does write the records to table.  I can then write another CFQUERY with a LEFT OUTER JOIN, and get all the records, including those that don't have matching employee name:
    <CFQUERY datasource="SkynetSQL">
    <CFLOOP index="i" from="1" to = "#ITE2.RecordCount#">
    INSERT INTO ITE_Temp
       (FullFile,
       EmployeeCount,
       DTL_Amount,
       EmployeeType,
       station)
    VALUES  ('#ITE2.TrueFile[i]#',
       #ITE2.CountOfEmployee[i]#,
       #ITE2.DTL_SUBTOT[i]#,
       '#ITE2.EMPTYPE[i]#',
       '#ITE2.ARPT_CD[i]#')
    </CFLOOP>
    </CFQUERY>
    But, I hate to have to create a table and physically write to it.  For one, it seems slower, and doing it in temp would be in memory, and probably much faster, correct?  Is there some way to code the above, so that it does something similar, but in a TEMPORARY TABLE?   If I can figure out how to do this, I can pull data from multiple data sources and servers, and using SQL Server temp tables, work with the data as if it was all on the same SQL Server, and do some cool reports.
    Everything I've done for the past few years, has all been from data from a single source, whether SQL Server, or another server.  Now I need to start writing reports where data can come from 3 or 4 different servers, and be able to do joins (inner and outer).  Thanks for any advice/help.  Much appreciated.
    Gary

    While waiting to hear back, I was able to write the query results from an outside Oracle server, to a table on the local SQL Server, and do the LEFT OUTER JOIN required for the final query and report to work.  That was with this syntax:
    <CFQUERY name="AddTableRecords" datasource="MyTable">
    TRUNCATE TABLE ITE_Temp
    <CFOUTPUT query="ITE2">
    INSERT INTO ITE_Temp
    (FullFile,EmployeeCount,DTL_Amount,EmployeeType,station)
    VALUES
    ('#TrueFile#', #CountOfEmployee#, #DTL_SUBTOT#, '#EMPTYPE#', '#ARPT_CD#')
    </CFOUTPUT>
    </CFQUERY>
    However, I was not able to write to a temporary table AND read the results. I got the syntax to run to write the above results to a temporary table.  But when I tried to read and output the results from the temp table, I got an error.  Also, it wouldn't take the single "#" (local) only the global "##" table var, using this syntax.  Note that if I didn't have the DROP TABLE in the beginning, the 2nd time you run this query, you get an error telling you the table already exists.
    <CFQUERY name="ITE_Temp2" datasource="MyTable">
    DROP TABLE ##MyTemp2
    CREATE TABLE ##MyTemp2
    FullFile char (7) NOT NULL,
    EmployeeCount int NULL,
    DTL_Amount decimal NULL,
    EmployeeType char (3) NULL,
    station char (3) NULL
    <CFOUTPUT query="ITE2">
    INSERT INTO ##MyTemp2 VALUES
    '#ITE2.TrueFile#',
    #ITE2.CountOfEmployee#,
    #ITE2.DTL_SUBTOT#,
    '#ITE2.EMPTYPE#',
    '#ITE2.ARPT_CD#'
    </CFOUTPUT>
    </CFQUERY>
    So even though the above works, I could use some help in reading/writing the output.  I've tried several things similar to below, but they don't work.  It't telling me ITE_Temp2 does not exist.  It's not easy to find good examples of creating temporary tables in SQL Server.
    <CFQUERY name="QueryTest2" datasource="SkynetSQL">
    SELECT *
    FROM ITE_Temp2
    </CFQUERY>
    <CFOUTPUT query="ITE_Temp2">
    Output from Temp Table<br>
    <p>FullFile: #FullFile#, EmployeeCount: #EmployeeCount#</p>
    </CFOUTPUT>
    Thanks for any help/advice.
    Gary.

  • Life time of data in a Global Temporary Table.

    Dear Friends,
    I have a global temporary table in which I insert some values via a backend package, when forms start up and accessing it via the same package when user performs some changes in it - storing the value and during exit saving it in the master table. My problem is the data is not accessible while processing. I'm using Oracle9i Enterprise Edition Release 9.2.0.1.0 database and Forms [32 Bit] Version 6.0.8.8.0. I also give you the script in using which I created the temporary table.
    CREATE GLOBAL TEMPORARY TABLE GTT_PRA
    A1 VARCHAR2(10 BYTE) NOT NULL,
    A2 VARCHAR2(15 BYTE) NOT NULL,
    A3 VARCHAR2(10 BYTE) NOT NULL
    ON COMMIT DELETE ROWS;
    Why is that so? Please help me.
    With Regards,
    Senthil .A. Perumal.

    Dear Arun,
    Thank you for your script. But I'm accessing a large table, so for each and every process, the table get populated and grows very large giving some space problem, that is why I'm deleting rows when commiting. I would appreciate your help.
    Dear Yogesh,
    From the same forms I'm calling the backend package - will that be a different session. Once I'm calling to populate the table and next time I'm calling to store the user modified data and finally calling to store the data to master table. I think all are in the same sessions. Please reply me.
    Thank you dear friends fr your immediate response. I would really appreciate it.
    Regards,
    Senthil .A. Perumal.

  • How to purge data in a global temporary table from another session

    I've got a problem with vendor-delivered web-based software (jdbc) that periodically "hangs." When that happens, I have to kill the database session before retrying the process. This "workaround" does NOT clean up the temporary tablespace. Is there anyway (outside of bouncing the database) to truncate temporary tables regardless of sessionid? Thanks.

    In 8i the space used by temporary segments is not dropped in a temporary tablespace. The space is available for other queries or temporary tables. This avoids the costs of allocating and releasing space for temporary segments.

  • Temporary Tables in Oracle

    Hi all,
    I am developing a .net application withe back end being oracle 10g. previously i worked with sql server 2005,2008 and i am new to oracle.
    i am working on a complex query which requiries, temporary table inside the procedure. In sql server easy to create and drop the temp table inside the proc.
    Can I use a Transaction specific GTT to store and process the temporary data inside my procedure??? My web application gets connected to the database through a one username and password. Since being a web applicatioin multiple users will execute the procedure at the same time, logged under the same username and password...
    I know its a coomon question, but i need it urgently..
    its very complicated to use WITH SELCT or inline views etc...
    Thank you,
    Kris.

    I know its a coomon question, but i need it urgently..If you know it is a common question then you should know the common answer. But let's rehearse it one more time.
    In Oracle temporary tables are permanent objects. It is only the data in them which is temporary. So for your scenario you shoudl have the DBA create the table once, like any other table.
    The trick with temporary tables is that each session sees its own data and nothing else. So your procedure can populate the table with data, process it and return it without a hitch.
    Since being a web applicatioin multiple users will execute the procedure at the same time, logged under the same username and password...Doesn't matter: the view of the data is controlled by session. So you haven't got a problem providing the table is populated and the resultset returned within a single call.
    its very complicated to use WITH SELCT or inline views etc...Yes it is hard. Fortunately CPUs keep getting more powerful and bandwidth keeps getting cheaper, so our systems continue to cope with the increasing amount of suck-y code being thrown at them. Isn't Moore's Law wonderful :)
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com

  • How to Insert into a temporary table

    Hi Experts,
    I have created a temp table in sql from vfp using the #prefix. But when I issue an insert command sqlexec returns negative.
    The code which I have used :
    =sqlexec(oConn, "Create table #smenu (code_ varchar(1), name_ varchar(50))")
    Table created successfully under tempdb database of sql
    m_result=sqlexec(oConn, "insert into #smenu values ('100','Police')")
    m_result returns negative.
    Kindly help.

    Try to create a permanent table:
    =sqlexec(oConn, "Create table temp_smenu (code_ varchar(1), name_ varchar(50))")
    m_result=sqlexec(oConn, "insert into temp_smenu values ('100','Police')")
    Temporary table has limited visibility.
    You need to drop table temp_smenu when finished.
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

Maybe you are looking for