Temporary tables in Oracle

Hi all


I develop a .net application with back-end in oracle 10g. I had previously worked with sql server 2005,2008 and I am new to oracle.

I'm working on a query complex that requiries, the temporary table inside the procedure. In sql server easy to create and drop the temporary table inside the proc.

Can I use a specific Transaction TWG to store and process temporary data inside my procedure? My web application must be linked to the database via a a username and a password. Since being a web background multi-user executes the procedure at the same time, registered under the same user name and password...

I know it's a coomon question, but I need him...

It is very complicated to use WITH SELCT or inline views etc...

Thank you

Kris.

I know it's a coomon question, but I need him...

If you know that this is a frequently asked question, then you must know the common answer. But we're going there repeat once more.

In Oracle temporary tables are permanent objects. It was only the data in them that is temporary. So for your scenario, you should have the DBA create table once, like any other table.

The thing with temporary tables is that each session sees its own data and nothing else. If your procedure can fill the table with data, treat it and send it back without a hitch.

Since being a web background multi-user executes the procedure at the same time, registered under the same user name and password...

Is not serious: the display of the data is controlled by session. If you do not have a problem providing the table is filled and the result set returned in a single call.

It is very complicated to use WITH SELCT or inline views etc...

Yes it's hard. Fortunately, CPUs get more powerful and continue to become cheaper, bandwidth so that our systems to continue to deal with the growing number of suck is code thrown at them. Is not Moore's law wonderful :)

Cheers, APC

blog: http://radiofreetooting.blogspot.com

Tags: Database

Similar Questions

  • global temporary table in oracle

    HI all,
    I want to know more about TWG in oracle, why we use it, cant why we use table bunch (we can truncate and we can use) as TWG, please help me

    The data in a temporary table are private to the session that created and can be specific to the session or operations. If the data are deleted at the end of the transaction, the table must be defined as follows:

    CREATE TEMPORARY table GLOBAL My_Temp_Table (NUMBER of Column1, Column2 NUMBER) ON COMMIT DELETE ROWS.

    If on the other hand that data should be kept until the session ends, it should be defined as follows:

    CREATE TEMPORARY TABLE global my_temp_table (NUMBER of Column1, Column2) ON COMMIT PRESERVE ROWS;

    Various characteristics
    1. If the TRUNCATE statement is issued against a temporary table, only the specific session data trucated. There is no impact on the data of the other sessions.
    2. the data in temporary tables is automatically delete at the end of the session of the database, even if it ends abnormally.
    3 indexes can be created on temporary tables. Content in the index and the scope of the index are the same as the database session.
    4. the views can be created against temporary tables and combinations of temporary and permanent tables.
    5 Tempoarary tables can have triggers associated with them.
    6. export and import utilities can be used to transfer table definitions, but without data lines are treated.
    7. There are a number of tables linked to temporary restrictions, but here are the specific version.

  • Global temporary Tables from Oracle and connection pooling

    When grouping, connection ('maintain connections' in cfadmin) is enabled. Oracle Global Temporary tables is screwed up. Bleeding of a page of data request to another because CF is reusing the same Oracle session over and over again.

    Is there a JDBC driver that will allow the use of global Temp Tables while having enabled connection pooling? 

    Other applications, such as Oracle Application Server servers, somehow allow the pooling and work together harmoniously TWG.

    If your temporary tables created with the default setting of validation remove lines, the cftransaction tag will help you.  Copy the following code:



    insert into t_dan_test values (1)


    Select * from t_dan_test



    Select * from t_dan_test


    a 1 1 x sheet of dumping and x 2 0 dumping.

  • Local temporary table

    Hi all

    Oracle version: 11g.

    I know how the global temporary table in Oracle. But I've never heard of local temporary tables. I e cam all over and I tried to create one by Googling. But could not create.

    The syntax I used is,

    DECLARE LOCAL TEMPORARY TABLE test_sk5 (col1 number, col2 NUMBER);
    

    Can you please shed some light on local temporary tables.

    THX & regards,.

    Shan.

    Everything you have found by Google (it would have been helpful if you showed us the real link) is not for Oracle.

    So I will throw the light: they do not exist

    Edit: when I google for 'local temporary table oracle', I found a thread on this same site where someone asked the same question with the same type of example and got the same answer, the additional information that the syntax is apparently from RDB.

  • Create temporary table in the procedure

    I have a procedure which can be called at any time by multiple users. So I cann't use table in there, because on each call, the table is truncated and inserted. How can I create a temporary table in the procedure?

    Temporary tables in Oracle are different from other RDBMS like SQL Server.

    In Oracle, you create a global temporary table ONCE as part of the design of your database.

    create a global temporary table MyTableName (... columns...) on commit preserve rows;

    You can then use this table in your code as you would any other table.

    The difference is that any data that you insert in this table are only available/visible so that the code runs in the session, and if delete you / truncate the table it only removes the data for this session.  In this way, several sessions we can table without interfering with each other.

    (Note: instead of "preserve" you can change this to "delete" If you want that deleted data automatically when a commit is issued in your session, otherwise the data will be automatically deleted at the end of the session)

  • Temporary tables

    Hi guys,.

    Please can you advise if we can create indexes and constraints into Temp Tables can also we grant or revoke access to them or can someone with passwords schema access this particular diagram TEMP tables.

    See you soon,.
    Shaz

    The fact is more often that not the use of temporary tables in Oracle is false because all of the databases are not the same, and operations that have been a trend toward the use of temporary tables in SQL Server and Sybase normally does not require the same approach in Oracle where SQL big is often the preferred approach.

    They do not create of redo

    Not quite true that the use of temporary tables generates the cancellation. Undo generates redo.

    Please can you advise if we can create indexes and constraints into Temp Tables can also us grant or revoke access to them or what anyone with the schema > passwords can access the TEMP of this particular schema tables.

    The question is far from clear.

    The content of a temporary table is private.
    Multiple sessions can use a temporary table at the same time, any use of a temporary table is private to the session.
    You can create an index and constraints.
    Privileges of a temporary table are controlled according to any other object.

    Published by: Dom on May 8, 2012 Brooks 16:09

  • How to create temporary tables in stored procedures.

    Hello

    I am new to oracle, I have a requirement where I need to run a query in a loop for different values of where condition. Here, I need to record the results of the query on each iteration. After the end of the loop, I need to send the results to the front end. I did a lot of research for the concept of the temporary table in oracle, but I found myself unresolved except headaches. Everyone is showing how to create temporary tables in general but not in stored procedure.

    Bad, I need the concept of temporary tables, or is there an alternative way to store temporary results. My procedure looks like this.

    create or replace
    procedure uspMatchCode (parWord varchar2, p_recorderSet to types.cursor_type)
    as
    smallint parCnt;
    Start
    parcnt: = 0;
    Select count (1) in parCnt of...;
    If parcnt > 0 then
    Open for P_recorderSet
    Select field1, field2, field3,... of table1, table2, table2 where < < condition > >
    on the other
    -Here, I want to create a temporary table and store the result for the loop shape into the temporary table.
    CREATE TEMPORARY TABLE global my_temp_table (NUMBER of Column1, Column2) ON COMMIT DELETE ROWS.
    FOR parCnt in 0.3
    loop
    INSERT into my_temp_table select Field1, Field2, field3,... from table1, table2, table2 where < < condition > >
    end loop;
    Open for P_recorderSet
    Select * from < < temporary table > >
    end if;
    end;

    Any help would be great to check me on the problem.

    Thank you
    Kiran.

    This is a change to the query Kiss has posted:

    with data_text like)
    Select regexp_substr (' sales financing marketing ',' [^] +', 1, level ") val
    of tconnect by level<= length('sales="" finance="" marketing')-="" length(replace('sales="" finance="" marketing','="">
    )
    Select * from t, data_text, where t.colname like '% "| data_text. Val |' %'

    This will help you. Please change the column names and the name of the table as a result

  • Working with temporary tables in PL/SQL processes

    So I'm trying to write a PL/SQL process and I have some difficulty. Here's what I do:

    -Create temporary tables
    -Put the data in them
    -Use the data in temporary tables to fill the main status table
    -Remove temporary tables

    I'm running into some problems when I try to create the tables. If I do as I would in SQL Server:

    SELECT field1, Field2
    IN TempTable1
    Of


    Then, I get an error saying that there is no such thing as TempTable1. If I say:

    CREATE TABLE TempTable1 AS
    SELECT field1, Field2
    Of


    Then I get "found CREATE, Expecting CASE or another statement." I know that to truncate or remove tables in a PL/SQL, I use EXECUTE IMMEDIATE. I do the same thing for the creation of a table? If this is the case, how can I use run immediately on a query with apostrophe inside multi-line?

    Thank you!

    Use of temporary tables in Oracle is different from MS Sql Server.
    In Oracle, you create tables Temp the same way you would normally create a permanent table.
    Search syntax "create a global temporary table.
    Oracle global temporary tables are visible to all connections, but don't share all the data.
    The data are visible only for connections that introduced the data and are removed on commit / rollback, or when the connection ends.
    So Structure is permanent, data is temporary and exclusive to a single connection.

    If your process should look like this:

    Create global temporary tables - once - at the same time, you create all of the other tables in your system.

    -Fill the temporary tables.
    -use the data in temporary tables to fill the main report table
    -remove the data from the temporary tables.

    Information on the Temp in Oracle tables:
    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14231/tables.htm#sthref2213

    HTH
    Thomas

  • Are global temporary tables, a standard feature of Oracle?

    I apologize for introducing me to this community with what must seem like a very stupid question...

    I am a software developer, working on a product that uses Oracle as its database, specifically Oracle 11 g Enterprise Edition. Recently, I solved a problem of performance by converting an ordinary table into a global temporary table. Before my boss allows me to put this change in the product, it wants to be sure that global temporary tables are a standard part of Oracle, not something that the customer must install separately or pay extra for. (This is the first time that we never used them in our product, so I think that most of the team are not familiar with them).

    I know that Oracle has had global temporary tables since the last millennium, so if ever, they have been a feature of the premium, they are unlikely to be now, but the boss wants me to get independent confirmation of this.

    Thank you.

    Steve Pemberton

    Here you can see "feature availability by Edition":

    http://docs.Oracle.com/CD/E11882_01/license.112/e47877/editions.htm#DBLIC116

    TWG tables is not even mentioned, which means that they do not belong to the functional components are paid separately.

    One caveat - if you have an application that uses connection pooling, it is recommended to use ON COMMIT DELETE ROWS, not ON COMMIT PRESERVE ROWS

    (or always use explicitly "DELETE gtt_table" at the beginning), because otherwise a user of the application can display the data TWG who has previously made a second user of the application.

    Kind regards

    Zlatko

  • PLS-00357 on a global temporary table

    Oracle 11g R2

    I am using a dynamic SQL statement to delete rows. The WHERE THERE EXIST uses a global temporary table and it gives me

    PLS-00357: Table, view or reference sequence "TMPPRE_ARC" not allowed in this context

    Any ideas of a work around?

    create global temporary table tmppre_arc
      ( id number)
      ON COMMIT PRESERVE ROWS;
    
    
    CREATE OR REPLACE PROCEDURE test_del
    IS
       v_owner_tbl varchar2(61) := 'test_table'     ;
    BEGIN   /* DELETE_SOURCE */
            EXECUTE IMMEDIATE
                'DELETE FROM ' || v_owner_tbl || ' v ' || chr(10) ||
                'WHERE EXISTS ( SELECT    null '       || chr(10) ||
                'FROM      ' || tmppre_arc || ' r '  || chr(10) ||
                'WHERE       r.id     = v.id )' ;
    END test_del;
    /
    show errors
    
    
    LIsNE/COL ERROR
    -------- -----------------------------------------------------------------
    5/9      PL/SQL: Statement ignored
    8/29     PLS-00357: Table,View Or Sequence reference 'TMPPRE_ARC' not
    allowed in this contenxt
    
    
    
    
    
             allowed in this context
    

    This is false:

    'FROM ' | tmppre_arc | ' r '  || Chr (10) |

    Should be

    "OF tmppre_arc r | Chr (10) |

    SY.

  • Create a temporary table using EXECUTE IMMEDIATE

    Hello

    I need to create a report more complex which must have three different queries. I use a determined IF clause that the query that uses the report, according to the parameters.

    I want to write the output to a csv file, so I created a PROCEDURE.

    The first package of the procedure has the three SQL and the IF clause in order to determine the query that the report uses and stores the query code in a variable (v_sql), which is passed to the PROCEDURE that needs to write to the output of the report.

    I tried to create a table with data from the request in order to make a LOOP and exit, something like this:

    WRITE_FILE (errBUFF of the PROCEDUREOUT VARCHAR2,
    retCODEOUT VARCHAR2,
    v_sqlIN VARCHAR2)

    IS

    ContorNUMBER;

    BEGIN

    EXECUTE IMMEDIATE v_sql;
    SLIDE G
    IS
    Select * from XXROR_REG_MF_TBL;
    --
    -initialization
    --
    retCode: = 0;
    errBUFF: = NULL;
    Contor: = 0;
    --
    -cursor
    --

    FOR X IN G
    LOOP
    APPS. FND_FILE.
    PUT_LINE)
    APPS. FND_FILE. OUTPUT,
    ....)

    I should mention that v_sql is something like:

    CREATE GLOBAL TEMPORARY TABLE ACEs (SELECT * of the double);

    I can't really do that, so I was wondering if you have any suggestions

    Thank you

    Claudiu

    Hello

    I don't think you need a table at all. You can set the cursor based on the SQL passed as parameter

    https://docs.Oracle.com/database/121/LNPLS/dynamic.htm#LNPLS629

    Concerning

    Marcus

  • CANCEL reading and overall-TWG temporary table

    Hello Expert!

    Based on an analysis made by my colleagues... He mentions on a compound of SQL to extract data only to leave a TWG and overturn readings! (Current_obj # ash captured as a event 0 and wait - db_file_sequential_read)

    The thought difficult to obtain a cancellation reason reading when extracting data from TWG!.

    On cancellation, cancellation would be needed!

    But as TWG specific Session, at any time in my session would read the latest copy for all operations. This reading must come from a buffer or disc (Temp).

    Why a reading of cancellation will be required?

    Can you please help me understand a scenario where cancel read for TWG is valid or unrealistic?

    Or conceptually missed something?

    Based on an analysis made by my colleagues... He mentions on a compound of SQL to extract data only to leave a TWG and overturn readings! (Current_obj # ash captured as a event 0 and wait - db_file_sequential_read)

    The thought difficult to obtain a cancellation reason reading when extracting data from TWG!.

    TWG activity generates CANCEL as a result of DML for any table. Which CANCEL then also causes RESTORE to be generated.

    On cancellation, cancellation would be needed!

    OK - but this isn't the only case of use.

    But as TWG specific Session, at any time in my session would read the latest copy for all operations. This reading must come from a buffer or disc (Temp).

    And that is where you get off the track. These statements are NOT correct.

    A session can open several sliders on these data TWG and these several cursors can represent a different "coherent reading" as far as data is concerned.

    Tom Kyte explains better in this AskTom blog.

    https://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:4135403700346803387

    and we said...

    Yes, temporary tables generate UNDO - and therefore to generate REDO to CANCEL it.

    Do it again for the cancellation must be created because Cancel is treated the same, the undo tablespace seems to be corrupted on an event of failure/media instance recovery if the cancellation has disappeared.

    The cancellation must be filed in support of the coherence of reading. For example, if you:

    (a) charge a TWG of temporary table with data

    (b) open cursor_1 SELECT * from TWG

    (c) update the data of TWG

    (d) open cursor_2 SELECT * from TWG

    (e) delete most of the data of TWG

    (f) open cursor_3 SELECT * from TWG

    Each of these sliders should see a different result set - we have not recovered from them, has just opened their. cursor_1 must push the blocks changed to point in time (b). This requires CANCELLATION. Thus, the cancellation must be generated - and undo is always protected by the roll forward.

    Changed blocks to the TWG, as for ANY table could be physically written to disk until the transaction is completed. It is not always room in the cache buffers for ALL data that has changed.

    And, as Tom above, each of the sliders really sees the data at a point different 'read-consistent. If some of these extractions of cursor will require reading the UNDO data for "compatible" data for this particular slider.

    The point in time' is established when a cursor is open - no data has yet been read yet.

    See the section 'Multiversion Concurrency Control' of the doc

    https://docs.Oracle.com/CD/B28359_01/server.111/b28318/consist.htm#i17881

    Multiversion Concurrency Control

    Database Oracle automatically provides the reading consistency to a query so that all the data that sees the request comes from a single point in time (at the level of instruction read consistency). Oracle database can also provide read consistency to all queries in a transaction (consistency of reading at the level of transactions).

    Oracle database uses information stored in its rollback segments to provide these consistent views. Rollback segments contain old data values that have been changed by validated or recently committed transactions. Figure 13-1 shows how the Oracle database provides consistent reading using rollback segments data at the level of instruction.

    That reference above 'consistent read to a query' also applies when cursors are opened.

  • What to fill in 'field of the temporary table' for global temporary tables?

    Hello

    I use the Data Modeler 4.0.1.836 and everything that I put in the box 'the scope of the table temp' for a global temporary table doesn't seem to affect the DDL script about the ON COMMIT PRESERVE/DELETE the LINES option. The script poster ON COMMIT PRESERVE ROWS always anything.

    Yet, some of my temporary tables must be created as ON COMMIT DELETE ROWS.

    Using the Data Modeler wrote about it:

    Scope of the temporary Table:

    For a class as a temporary table, you can specify a scope, such as the Dimension or the Session.

    Not sure what 'Dimension' has to do with the scope here, but it makes no difference.

    I tried to put 'Session', 'Dimension', 'Operation', but no luck. So what is the text for the script generate ON COMMIT DELETE ROWS?

    Thank you

    Hello

    The temporary Scope of Table property (on page Types of Classification of the table properties dialog box) is purely documentary.

    To set ON COMMIT DELETE ROWS you must expand the browser for the relational model and find the node for the relevant Oracle physical model.  If you develop it you will find an entry there for your Table. Double-click on that to get the physical model properties dialog box for your table, and you will find a "Temporary" facility that has options (Preserve Rows), YES (Delete Rows) YES or no.

    David

  • Global temporary table in PL/SQL with XML

    Hello

    I have the impression that it is something strange or maybe I'm missing something basic.

    Step 1: Create a global Temp table that should not be specific transaction.

    create a global temporary table Temp01

    (

    NUMBER OF TICKET_ID

    , Varchar2 (10) of the REGION

    NUMBER OF THE YEAR

    , CO_ID VARCHAR2 (10)

    ) ON COMMIT DELETE ROWS.

    Step 2:

    My XML that goes as a parameter to a new function.

    < TICKET >

    < TICKET_ID > 38498051 < / TICKET_ID >

    the USA < REGION > < / REGION >

    < YEAR > 2014 < / YEAR >

    XYZ123 < CO_ID > < / CO_ID >

    < / TICKET >

    Step 3: Create a Stand Alone function:

    -drop function aagarwal.wr_creation;

    create or replace FUNCTION XML_FUNC

    (

    ret_msg out varchar2,.

    p_xmlval IN varchar2

    )

    RETURN varchar2

    is

    l_xmlval varchar2 (4000): = p_xmlval;

    V_CO_ID VARCHAR2 (10);

    V_CODE VARCHAR2 (10);

    BEGIN

    BEGIN

    INSERT INTO Temp01

    (

    TICKET_ID,

    REGION,

    BLEACHED,

    CO_ID

    )

    SELECT

    EXTRACTVALUE (XmlType (p_xmlval), "/ TICKET/TICKET_ID ') ID,.

    EXTRACTVALUE (XmlType (p_xmlval), "/ TICKET/REGION") REGION.

    EXTRACTVALUE (XmlType (p_xmlval), "/ TICKET per YEAR"),.

    EXTRACTVALUE (XmlType (p_xmlval), "/ TICKET/CO_ID ') CO_ID

    FROM DUAL;

    ret_msg: = 'SUCCESS';

    -SELECT CO_ID IN V_CO_ID of aagarwal. TEMP_STAGE_WR;

    -return ret_msg;

    EXCEPTION

    WHILE OTHERS THEN

    ret_msg: = sqlerrm;

    Return ret_msg;

    END;

    BEGIN

    SELECT CO_ID INTO V_CO_ID FROM Temp01;

    / * MERGE IN the site is

    With the HELP of aagarwal. TEMP01 T

    WE (T.co_id = se.code AND se.type_nm = ' TYPE' and se.src_nm = T.region)

    WHEN NOT MATCHED THEN

    INSERT (ID, SRCNM, CODE, TYPENM)

    VALUES (SHARED_SEQ. NEXTVAL, T.region, T.co_id, 'TYPE');

    -commit; */

    return ret_msg | "ACE" | v_co_id;

    END;

    END;

    /

    Fact - created function.

    NOTE: MERGE statement is blocked and if the function was created in sweetness.

    Step 4: Call the function

    declare

    l_out varchar2 (50);

    l_outr varchar2 (50);

    p_xml XMLTYPE.

    Start

    l_outr: = XML_FUNC (l_out, ' < TICKET >)

    < TICKET_ID > 38498051 < / TICKET_ID >

    the USA < REGION > < / REGION >

    < YEAR > 2014 < / YEAR >

    XYZ123 < CO_ID > < / CO_ID >

    (< / TICKET > ');

    dbms_output.put_line (l_outr);

    end;

    /


    Step 5: Check the value being inserted into the temporary Table:


    Select * from temp01;


    So far so good.

    THE PROBLEM:

    Now I want to tweek the XML_FUNC function above by uncommenting MERGE statement, which brings me to an error that is not differentiable:

    I.e. PL/SQL: ORA-00942: table or view does not exist in line on MERGE pointing to Temp01 statement.

    NOTE: I tested this Merge statement explicitly (as long as the execution of Stand Alone and also by calling via anonymous block PLSQL) and its absolutely perfect work. And SITE table exist.

    PS: I would be grateful, if there is a better way to write this code? I'm not a regular PLSQL developer and so badly can write the code of practice.

    Kind regards

    AAG.

    Using 11.2.0.3:

    Owner of all these three objects is DBA.

    Are you sure?

    After the release of:

    Select object_name, object_type

    of object

    where object_name in ('TEMP01', 'SITE', 'XML_FUNC');

    You must grant the explicit right to select on the table for the owner of the function if the owners are different.

    This works as expected for me (user DEV has all 3 items):

    Connected to Oracle Database 11g Enterprise Edition Release 11.2.0.3.0

    Logged in as dev

    SQL >

    SQL > create a global temporary table Temp01)

    NUMBER OF TICKET_ID 2

    3, Varchar2 (10) of the REGION

    4, NUMBER OF THE YEAR

    5, CO_ID VARCHAR2 (10)

    6)

    7. ON COMMIT DELETE ROWS.

    Table created

    SQL >

    SQL > create table site)

    Identification number 2

    3, srcnm varchar2 (10)

    4, code varchar2 (10)

    5, typenm varchar2 (10)

    6  );

    Table created

    SQL > create the sequence shared_seq;

    Order of creation

    SQL >

    SQL >

    SQL > create or replace FUNCTION XML_FUNC)

    2 p_xmlval IN varchar2

    3)

    4 RETURN varchar2

    5 is

    6 l_xmlval xmltype: = xmltype (p_xmlval);

    7. START

    8

    9 INSERT INTO Temp01

    (10)

    TICKET_ID 11,

    REGION 12,

    13 YEARS,

    CO_ID 14

    15)

    16. SELECT ID EXTRACTVALUE(l_xmlval, '/TICKET/TICKET_ID'),

    17 EXTRACTVALUE(l_xmlval, '/TICKET/REGION') REGION,

    18 EXTRACTVALUE (l_xmlval, ' / TICKET per YEAR ') YEAR.

    19 EXTRACTVALUE(l_xmlval, '/TICKET/CO_ID') CO_ID

    20 FROM DUAL;

    21

    22. MERGE IN site

    23. WITH THE HELP OF TEMP01 T

    (24)

    25 T.co_id = se.code

    26 AND se.typenm = 'TYPE '.

    27 and se.srcnm = T.region

    28)

    29 WHEN NOT MATCHED THEN

    30 INSERT (ID, SRCNM, CODE, TYPENM)

    31 VALUES (SHARED_SEQ. NEXTVAL, T.region, T.co_id, 'TYPE');

    32

    33 return "SUCCESS";

    34

    35 END;

    36.

    Feature created

    SQL >

    SQL >

    SQL > set serveroutput on

    SQL >

    SQL >

    SQL > declare

    2

    3 l_outr varchar2 (50);

    4

    5. start

    6

    7 l_outr: = XML_FUNC (')

    8 38498051

    9 USA

    10 2014

    11 XYZ123

    12    ');

    13

    14 dbms_output.put_line (l_outr);

    15

    16 end;

    17.

    SUCCESS

    PL/SQL procedure successfully completed

    SQL > select * from site;

    ID CODE TYPENM SRCNM

    ---------- ---------- ---------- ----------

    TYPE 1 USA XYZ123

  • Possible to Exchange temporary table with composite range-hash partitioned table?

    Hello

    Using oracle 11.2.0.3

    We want to clean up the data in some of our existing partitioned table.

    Afetr updates check spped that is too slow for us.

    Current table is partitioned the inetrval compoiste range-hash table.  Also it is compressed - enabled for compression of basis as well

    An interval of 1 month and 1 partition by month and 4 secondary partitions in the partition of ecah.

    You want to create tenp table with the data of celan and exchange the data in this table in the 'dirty' uisng existing partitions partition exchnage.

    Is this possible?

    The plan is

    1) create temporary table containing data for 1 partition (1 month worth of data)

    (2) clean the data here

    (3) create new temporary table with these specific data which compressed and discovered partitioned with 4 secondary partitions

    (4) table 3 for swap partition dirty using partition excahnge.

    Thaks

    I think that this can be done with a combination of Exchange and Split partition partitions. Prior to Oracle 11 g, only way of redefining tables online was DBMS_REDEFINITION package. Now, you can redefine the use of partitions for Exchange & Split. Check

    http://www.Oracle-base.com/articles/Misc/partitioning-an-existing-table-using-Exchange-partition.php

    Maintenance of Partitions

    Kind regards

Maybe you are looking for

  • Firefox always opens all tabs that were open when last closed

    Firefox, started out of the blue, to always show my tabs in the last session when it is started. I checked Firefox not listed in the Task Manager list after closing. So I tried the following: -change the "Startup of Firefox" option to all three of th

  • FF does not save connection

    The "Save login" box appears, I click on it but nothing happens. Next time I have access to the site, the fields are not filled. When I try to manually add the connection with "saved passwords", it gives me this error. Any ideas what could be the pro

  • How to stop the mouse wake up Satellite L850 fashion watches?

    Hello. I followed this tutorial: Stop the mouse to wake your computer go Sleep Modehttp://www.howtogeek.com/HOWTO/10418/stop-the-mouse-from-waking-up-your-computer-from-sleep-mode/ but it does not work in my Toshiba L850, running on Windows 7-64 bit

  • Equiuim L300 - not light, seem to be without power

    Hello The laptop does not light and there seems to be no power going to the laptop at all. I think that the food came lose as when the charger is in the port and drawn out there is a good amount of movement. Is and easy fix or I will leave it to the

  • Synchronization of the NI 9205

    Hi all I use cDAQ9188 with 03 modules OR 9205. One thing I want to clarify is that cDAQ9188 will provide synchronization between the three 9205 modules or or other devices also require for this purpose? NO DAQMAX software provides some guidance if th