Partition Exchange Issue

Hello,
When I am trying to do a partition exchange between one unpartitioned and partitioned table I am getting the following error
ORA-08103: object no longer exists
The indexes of the two table matches. I donot know what caused this problem. Can you please help me in resolving this??
Thanks
Sathish

Hi,
Check Metalink for this.
There are a lot of bugs related to this error.
Also check this blog.
Best Regards,
Alex

Similar Messages

  • Primary Key Causing Problem in Interval Partition Exchange

    DB : 11.2.0.2
    OS : AIX 6.1
    I am getting the problem while exchanging data with interval partitioned table. I have a interval partitioned table and a normal staging table having data to be uploaded.
    Following are the steps i am doing.
    SQL> CREATE TABLE DEMO_INTERVAL_DATA_LOAD (
                    ROLL_NUM        NUMBER(10),
                    CLASS_ID        NUMBER(2),
                    ADMISSION_DATE  DATE,
                    TOTAL_FEE       NUMBER(4),
                    COURSE_ID       NUMBER(4))
                    PARTITION BY RANGE (ADMISSION_DATE)
                    INTERVAL (NUMTOYMINTERVAL(3,'MONTH'))
                    ( PARTITION QUAT_1_2012 VALUES LESS THAN (TO_DATE('01-APR-2012','DD-MON-YYYY')),
                     PARTITION QUAT_2_2012 VALUES LESS THAN (TO_DATE('01-JUL-2012','DD-MON-YYYY')),
                     PARTITION QUAT_3_2012 VALUES LESS THAN (TO_DATE('01-OCT-2012','DD-MON-YYYY')),
                     PARTITION QUAT_4_2012 VALUES LESS THAN (TO_DATE('01-JAN-2013','DD-MON-YYYY')));
    Table created.
    SQL> ALTER TABLE DEMO_INTERVAL_DATA_LOAD ADD CONSTRAINT IDX_DEMO_ROLL PRIMARY KEY (ROLL_NUM);
    Table altered.
    SQL> SELECT TABLE_OWNER,
               TABLE_NAME,
               COMPOSITE,
               PARTITION_NAME,
           PARTITION_POSITION,
              TABLESPACE_NAME,
           LAST_ANALYZED
    FROM DBA_TAB_PARTITIONS
        WHERE TABLE_OWNER='SCOTT'
       AND TABLE_NAME='DEMO_INTERVAL_DATA_LOAD'
       ORDER BY PARTITION_POSITION;
    TABLE_OWNER                    TABLE_NAME                     COM PARTITION_NAME                 PARTITION_POSITION TABLESPACE_NAME                LAST_ANAL
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_1_2012                                     1 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_2_2012                                     2 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_3_2012                                     3 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_4_2012                                     4 USERS
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (10,1,'12-MAR-2012',1000,90);
    1 row created.
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (11,5,'01-JUN-2012',5000,80);
    1 row created.
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (12,9,'12-SEP-2012',4000,20);
    1 row created.
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (13,7,'29-DEC-2012',7000,10);
    1 row created.
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD VALUES (14,8,'21-JAN-2013',2000,50); ---- This row will create a new interval partition in table.
    1 row created.
    SQL> commit;
    SQL> SELECT TABLE_OWNER,
            TABLE_NAME,
            COMPOSITE,
            PARTITION_NAME,
            PARTITION_POSITION,
            TABLESPACE_NAME,
            LAST_ANALYZED
      FROM DBA_TAB_PARTITIONS
         WHERE TABLE_OWNER='SCOTT'
       AND TABLE_NAME='DEMO_INTERVAL_DATA_LOAD'
       ORDER BY PARTITION_POSITION;
    TABLE_OWNER                    TABLE_NAME                     COM PARTITION_NAME                 PARTITION_POSITION TABLESPACE_NAME                LAST_ANAL
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_1_2012                                     1 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_2_2012                                     2 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_3_2012                                     3 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_4_2012                                     4 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  SYS_P98                                         5 USERS  
    SYS_P98 partition is added to table automatically.
    SQL> CREATE TABLE DEMO_INTERVAL_DATA_LOAD_Y (
                    ROLL_NUM        NUMBER(10),
                    CLASS_ID        NUMBER(2),
                    ADMISSION_DATE  DATE,
                    TOTAL_FEE       NUMBER(4),
                    COURSE_ID       NUMBER(4));
    Table created.
    SQL> INSERT INTO DEMO_INTERVAL_DATA_LOAD_Y VALUES (30,3,'21-MAY-2013',2000,12);
    1 row created.
    SQL> commit;
    Commit complete.
    Since, i need a partition in DEMO_INTERVAL_DATA_LOAD table, which can be used in partition exchange, so i create a new partition as below:
    SQL> LOCK TABLE DEMO_INTERVAL_DATA_LOAD PARTITION FOR (TO_DATE('01-APR-2013','DD-MON-YYYY')) IN SHARE MODE;
    Table(s) Locked.
    SQL> SELECT TABLE_OWNER,
               TABLE_NAME,
               COMPOSITE,
               PARTITION_NAME,
               PARTITION_POSITION,
               TABLESPACE_NAME,
               LAST_ANALYZED
    FROM DBA_TAB_PARTITIONS
        WHERE TABLE_OWNER='SCOTT'
       AND TABLE_NAME='DEMO_INTERVAL_DATA_LOAD'
       ORDER BY PARTITION_POSITION;
    TABLE_OWNER                    TABLE_NAME                     COM PARTITION_NAME                 PARTITION_POSITION TABLESPACE_NAME                LAST_ANAL
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_1_2012                                     1 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_2_2012                                     2 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_3_2012                                     3 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  QUAT_4_2012                                     4 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  SYS_P98                                         5 USERS
    SCOTT                          DEMO_INTERVAL_DATA_LOAD        NO  SYS_P102                                        6 USERS
    SQL> ALTER TABLE DEMO_INTERVAL_DATA_LOAD
    EXCHANGE PARTITION SYS_P102
    WITH TABLE DEMO_INTERVAL_DATA_LOAD_Y
    INCLUDING INDEXES
    WITH VALIDATION;
    ALTER TABLE DEMO_INTERVAL_DATA_LOAD
    ERROR at line 1:
    ORA-14097: column type or size mismatch in ALTER TABLE EXCHANGE PARTITIONNow, if i disable/drop the primary key constraint, it works without any problem.
    SQL> alter table DEMO_INTERVAL_DATA_LOAD disable constraint IDX_DEMO_ROLL;
    Table altered.
    SQL> alter table DEMO_INTERVAL_DATA_LOAD drop constraint IDX_DEMO_ROLL;
    Table altered.
    SQL> ALTER TABLE DEMO_INTERVAL_DATA_LOAD
    EXCHANGE PARTITION SYS_P102
    WITH TABLE DEMO_INTERVAL_DATA_LOAD_Y
    INCLUDING INDEXES
    WITH VALIDATION;
    Table altered.
    SQL> select * from DEMO_INTERVAL_DATA_LOAD partition (SYS_P102);
      ROLL_NUM   CLASS_ID ADMISSION  TOTAL_FEE  COURSE_ID
            30          3 21-MAY-13       2000         12
    SQL> select * from DEMO_INTERVAL_DATA_LOAD_Y;
    no rows selectedPlease suggest.

    First, thanks for posting the code that lets us reproduce your test. That is essential for issues like this.
    Because the primary key is global you will not be able to use
    INCLUDING INDEXES
    WITH VALIDATION;And you will need to add the primary key to the temp table
    ALTER TABLE DEMO_INTERVAL_DATA_LOAD_Y ADD CONSTRAINT IDX_DEMO_ROLL_Y PRIMARY KEY (ROLL_NUM);The the exchange will work. You will need to rebuild the primary key after the exchange.

  • Interval Partition naming Issue (Oracle 11g R2 )

    I need help on identifying latest partition:
    I am using Interval Partition for my table,which creates partition every month end based on inserted data.
    When oracle creates partition assigning its own name but users have automated reports using partition names like Table_name_YYYYMM.
    I tested following ways to identify partition then renamed,worked fine but in long run do i get any problems ?
    or any other way to identify the latest partition ?
    1)Using max partition position :
    select partition_name from dba_tab_partitions a where partition_position = (select max(partition_position)
    from user_tab_partitions b where a.table_name=b.table_name
    and b.table_name = 'INTRVL_PARTITION');
    2)Using Sub Object max creation date :
    SELECT SUBOBJECT_NAME FROM dba_objects
    WHERE OBJECT_TYPE='TABLE PARTITION'
    AND OWNER='ABCD'
    AND OBJECT_NAME='INTRVL_PARTITION'
    AND CREATED=(SELECt MAX(CREATED) FROM DBA_OBJECTS
    WHERE OBJECT_TYPE='TABLE PARTITION'
    AND OWNER='ABCD'
    AND OBJECT_NAME='INTRVL_PARTITION');
    Thanks in advance .
    Edited by: user607128 on Mar 2, 2012 7:09 AM

    Your initial question said you were already using interval partitioning.
    >
    I am using Interval Partition for my table
    now users asking to convert Range to Interval Partition and keeping existing partitions same name.
    >
    So is your issue that you want to use interval partitining for a table now is now using range partitioning? Why are your users driving this change? That should be a decision made by the DBA and technical management since the difference is mainly on of management.
    Though there is one BIG difference that is data related. With interval partitioning if data (even erroneous data) is inserted for a partition that does not exist Oracle will create one. So if you have an insert statement that inserts 12 records for the year '2038' you will get 12 new partitions even though the data may be bogus.
    Now your management problem is detecting the problem, deleting the data (or fixing the date to move it to the right partition) and then dropping the partitions and storage.
    With 'interval' partitioning you had better be absolutely sure your data is clean in terms of the partitioning key values.
    That said, you can use table redefinition or just create a new interval partitioned table and do partition exchanges with the existing partitions to move the data.

  • RTV-20003: Warning: Cannot perform Partition Exchange Loading

    Hi,
    We have a unique situation in which the data has to be loaded 4 times each month to the fact table. The fact table is partitioned by month. We have configured the mappings so that DIRECT is false and REPLACE DATA option is also false (so that we don't loose exisiting data, if any). When the data is loaded to the fact for the first time then PEL is performed but when data is loaded for 2nd, 3rd and 4th time in the current partition OWB issues a warning (RTV-20003). We understand that in these cases data is still loaded but without using PEL. Is there any way to force OWB to perform PEL all 4 times without lossing the exisiting data in the current partition?
    Thanks, Yashu

    Hi, you can't use PEL to add data to an existing partition: by definition PEL swaps the rows in a regular, non-partitioned table with the rows in 1 partition of a partitioned table. Or better said, it swaps the table data segment with the partition data segment, and possibly the corresponding index segments if the indexes match and the part.table indexes are local. This means you are not really moving any rows so you can't add any to the partition using PEL.
    As a safety net, OWB provides "replace data = false" by default so you don't trash your data.
    If the 4 loads/month are 1 per week, you can consider creating e.g. 4 week partitions instead of month partitions. OWB PEL can't handle weeks: if you follow this route you should disable OWB PEL and exchange partitions 'by hand' inside a stored procedure called in the postmapping. This can be worth if you have really big volumes or if you want to feed your fact table very fast, staging new rows and then swapping them in almost instantaneously. You should evaluate your index rebuild speed requirements too.
    Hope this helps, Antonio

  • Problem in Direct Partition Exchange Loading(PEL)

    Hi all,
    I am facing a problem during execution of a OWB mapping. The map is using direct partition exchange loading. There are one source and one target table in the map. it is very simple.
    While the source and target are in the same schema there is no problem. But when they are in different schemas during execution a warning is given. That is:
    ResolveTableNameErrorRTV20006;BIA_RTL_INTERFACE"."SALE_SRC
    Here BIA_RTL_INTERFACE is source schema and SALE_SRC is source table.
    However the source record is going to the target table as required but the same record also exists in the same table after execution which is not desirable for direct PEL. So i think though the loading is done in target but it is not using the direct Partition Exchange Technique.
    Is there some kind of special privileage for Partition Exchange Loading when the source and target are in different schemas in the same database? Plase clarify this. Hope i can explain the problem. Waiting for reply.
    Thanks & Regards,
    Sumanta Das
    Kolkata

    The error means you are trying to swap a partition that still contains data in a configuration where OWB expects an empty partition. How did you set the "Replace existing data in Target Partition" configuration parameter?
    Also, for more details on PEL, review the 10.19 to 10.27 pages of the user manual.
    Regards:
    Igor

  • Outlook 2010 has problems dealing with in-line attachment (not an Exchange issue!)

    Hi all...
    Is there an official way to have this bug looked at? 
    (Note -- it is *not* the Exchange/PDF bug that has been semi-addressed with the very-recentInterim Update for Exchange 2007...)
    If I set up Outlook 2010 to use an IMAP server account (not an Exchange account) and send that account a message from Apple's Mail.app program -- that contains an in-line attachment -- Outlook 2010 displays the e-mail incorrectly.
    If I send e-mail using Apple Mail of the form:
    <some text>
    attachment  (and in this case I've tried .pdf, .docx, .xls, etc. -- it seems not to matter what the attachment is...)
    <additional text>
    <signature>
    Outlook 2010 displays the resulting e-mail with a problem:
    The received e-mail will look like this
    <some text>
    then *two* attachments -- the attached file *and* an "Untitled Attachment" that contains the <additional text> and <signature> parts of the e-mail (!)
    The reproducible bug (at least here) is that Outlook 2010 should display the remaining text after the in-line attachment within the *body* of the e-mail message.
    Again, this is *not* the recent Exchange issue with .pdf files -- this is strictly an Outlook issue.
    Any thoughts/help on this one?
    - Steve

    Hello,
    In order to get a better understanding of your issue I have a few questions:
    1: You mention that the sending client is an Apple mail application. Do you see this issue when sending from a non-Apple email client?
    2: Which version of Apple Mail app are you using?
    3: If you send the same mail to an Outlook 2007 or earlier version of Outlook do you see the same issue?
    4:  What is the format of the Email when being sent from the Apple mail client, is it HTML; Plain Text or Rich Text? Additionally, what happens if you send the same email but change the format.
    5: If you send an Inline attachment to the Apple Mail application from Outlook 2010, what happens?
    6: As per the Post you are attaching a single Inline attachment with text before and after the attachment before sending the email, but when you receive the mail in Outlook you get two attachments. Are these attachments still inline attachments?
    7: The second file attachment; next to the remaining text and the signature does it contain any other text? Like some error added by the server?
    9: Instead of .pdf, .docx, .xls file if you send an image as an inline attachment from the Apple mail application, then so you see the issue?
    10: If you send the files as normal attachment not inline does everything work?
    Below is an article which may be applicable to your issue although it pertains to an earlier version of Outlook:
    ‘Outlook renders inline message information as an attachment’
    http://support.microsoft.com/kb/814111
    I also came across a user who experience similar issue and they suggested, setting the apple mail application to Always insert attachment at the end of the message.
    View->Attachments and select "Always Insert Attachments at End of Message
    Let me know what the results are using that setting.
    Do let me know if you have any queries regarding the same and I shall try my best to address it as far as possible.
    Regards,
    Harveyy - MSFT

  • Explain plan changing after partition exchange

    I currently have a data warehouse where I use partition exchange to refresh the data. I'm finding that after a partition exchange of exactly the same data. explain plan changes.
    database 11.2.0.2
    To demonstrate what I'm doing I simplified the steps.
    first I gather stats on the table that will be exchanged and run explain plan
    exec dbms_stats.gather_table_stats( ownname=> 'IDW_TARGET', tabname=> 'PROGRAM_DIM' );
    Select
    FROM IDW_TARGET.ITD_MONTHLY_SUMMARY_FACT A,
    IDW_TARGET.GL_PERIOD_DIM B,
    IDW_TARGET.PROGRAM_DIM C,
    IDW_TARGET.RPT_ENTITY_DIM D
    WHERE ASST_SEC_CONCISE_NAME = 'abc'
    AND A.GL_PERIOD_KEY = B.KEY
    AND A.PROGRAM_KEY = C.KEY
    AND A.RPT_ENTITY_KEY = D.KEY
    AND B.PERIOD_YEAR >= 2006;
    ** uses FTS on fact table and runs in 20 seconds. **
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop | TQ |IN-OUT| PQ Distrib |
    | 0 | SELECT STATEMENT | | 25M| 71G| 47105 (1)| 00:09:26 | | | | | |
    | 1 | PX COORDINATOR | | | | | | | | | | |
    | 2 | PX SEND QC (RANDOM) | :TQ10003 | 25M| 71G| 47105 (1)| 00:09:26 | | | Q1,03 | P->S | QC (RAND) |
    |* 3 | HASH JOIN | | 25M| 71G| 47105 (1)| 00:09:26 | | | Q1,03 | PCWP | |
    | 4 | BUFFER SORT | | | | | | | | Q1,03 | PCWC | |
    | 5 | PX RECEIVE | | 4551 | 1773K| 103 (0)| 00:00:02 | | | Q1,03 | PCWP | |
    | 6 | PX SEND BROADCAST | :TQ10000 | 4551 | 1773K| 103 (0)| 00:00:02 | | | | S->P | BROADCAST |
    | 7 | PARTITION RANGE SINGLE | | 4551 | 1773K| 103 (0)| 00:00:02 | 1 | 1 | | | |
    | 8 | TABLE ACCESS FULL | RPT_ENTITY_DIM | 4551 | 1773K| 103 (0)| 00:00:02 | 1 | 1 | | | |
    |* 9 | HASH JOIN | | 25M| 61G| 46999 (1)| 00:09:24 | | | Q1,03 | PCWP | |
    | 10 | BUFFER SORT | | | | | | | | Q1,03 | PCWC | |
    | 11 | PX RECEIVE | | 184 | 35696 | 5 (0)| 00:00:01 | | | Q1,03 | PCWP | |
    | 12 | PX SEND BROADCAST | :TQ10001 | 184 | 35696 | 5 (0)| 00:00:01 | | | | S->P | BROADCAST |
    | 13 | PARTITION RANGE SINGLE | | 184 | 35696 | 5 (0)| 00:00:01 | 1 | 1 | | | |
    |* 14 | TABLE ACCESS FULL | GL_PERIOD_DIM | 184 | 35696 | 5 (0)| 00:00:01 | 1 | 1 | | | |
    |* 15 | HASH JOIN | | 25M| 57G| 46992 (1)| 00:09:24 | | | Q1,03 | PCWP | |
    | 16 | BUFFER SORT | | | | | | | | Q1,03 | PCWC | |
    | 17 | PX RECEIVE | | 4085 | 6829K| 1334 (1)| 00:00:17 | | | Q1,03 | PCWP | |
    | 18 | PX SEND BROADCAST | :TQ10002 | 4085 | 6829K| 1334 (1)| 00:00:17 | | | | S->P | BROADCAST |
    | 19 | PARTITION RANGE SINGLE| | 4085 | 6829K| 1334 (1)| 00:00:17 | 1 | 1 | | | |
    |* 20 | TABLE ACCESS FULL | PROGRAM_DIM | 4085 | 6829K| 1334 (1)| 00:00:17 | 1 | 1 | | | |
    | 21 | PX BLOCK ITERATOR | | 71M| 45G| 45650 (1)| 00:09:08 | 1 | LAST | Q1,03 | PCWC | |
    | 22 | TABLE ACCESS FULL | ITD_MONTHLY_SUMMARY_FACT | 71M| 45G| 45650 (1)| 00:09:08 | 1 | 141 | Q1,03 | PCWP | |
    Predicate Information (identified by operation id):
    3 - access("A"."RPT_ENTITY_KEY"="D"."KEY")
    9 - access("A"."GL_PERIOD_KEY"="B"."KEY")
    14 - filter("B"."PERIOD_YEAR">=2006)
    15 - access("A"."PROGRAM_KEY"="C"."KEY")
    20 - filter("ASST_SEC_CONCISE_NAME"='abc'')
    drop table PELPROGRAMDIMALLDATA; -- Start fresh here and drop the partition that will be exchanged
    create table PELPROGRAMDIMALLDATA as select * from PROGRAM_DIM; -- going to use exact same data for partition exchange (only one parition)
    alter table PELPROGRAMDIMALLDATA add constraint CON_342 unique ("VALUE" ) using index ;
    alter table PELPROGRAMDIMALLDATA add constraint CON_343 primary key ("KEY" ) using index ;
    exec dbms_stats.gather_table_stats(ownname=>'IDW_TARGET', tabname=>'PELPROGRAMDIMALLDATA');
    alter table PROGRAM_DIM exchange partition ALL_DATA with table PELPROGRAMDIMALLDATA excluding indexes;
    ** rebuild indexes **
    ** explain plan for same statement uses nested loop**
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop | TQ |IN-OUT| PQ Distrib |
    | 0 | SELECT STATEMENT | | 2637K| 7514M| 33428 (1)| 00:06:42 | | | | | |
    | 1 | PX COORDINATOR | | | | | | | | | | |
    | 2 | PX SEND QC (RANDOM) | :TQ10003 | 2637K| 7514M| 33428 (1)| 00:06:42 | | | Q1,03 | P->S | QC (RAND) |
    |* 3 | HASH JOIN | | 2637K| 7514M| 33428 (1)| 00:06:42 | | | Q1,03 | PCWP | |
    | 4 | BUFFER SORT | | | | | | | | Q1,03 | PCWC | |
    | 5 | PX RECEIVE | | 4551 | 1773K| 103 (0)| 00:00:02 | | | Q1,03 | PCWP | |
    | 6 | PX SEND BROADCAST | :TQ10000 | 4551 | 1773K| 103 (0)| 00:00:02 | | | | S->P | BROADCAST |
    | 7 | PARTITION RANGE SINGLE | | 4551 | 1773K| 103 (0)| 00:00:02 | 1 | 1 | | | |
    | 8 | TABLE ACCESS FULL | RPT_ENTITY_DIM | 4551 | 1773K| 103 (0)| 00:00:02 | 1 | 1 | | | |
    |* 9 | HASH JOIN | | 2637K| 6511M| 33324 (1)| 00:06:40 | | | Q1,03 | PCWP | |
    | 10 | BUFFER SORT | | | | | | | | Q1,03 | PCWC | |
    | 11 | PX RECEIVE | | 184 | 35696 | 5 (0)| 00:00:01 | | | Q1,03 | PCWP | |
    | 12 | PX SEND BROADCAST | :TQ10001 | 184 | 35696 | 5 (0)| 00:00:01 | | | | S->P | BROADCAST |
    | 13 | PARTITION RANGE SINGLE | | 184 | 35696 | 5 (0)| 00:00:01 | 1 | 1 | | | |
    |* 14 | TABLE ACCESS FULL | GL_PERIOD_DIM | 184 | 35696 | 5 (0)| 00:00:01 | 1 | 1 | | | |
    | 15 | NESTED LOOPS | | 2642K| 6035M| 33318 (1)| 00:06:40 | | | Q1,03 | PCWP | |
    | 16 | BUFFER SORT | | | | | | | | Q1,03 | PCWC | |
    | 17 | PX RECEIVE | | | | | | | | Q1,03 | PCWP | |
    | 18 | PX SEND ROUND-ROBIN | :TQ10002 | | | | | | | | S->P | RND-ROBIN |
    | 19 | PARTITION RANGE SINGLE | | 420 | 702K| 220 (0)| 00:00:03 | 1 | 1 | | | |
    | 20 | TABLE ACCESS BY LOCAL INDEX ROWID| PROGRAM_DIM | 420 | 702K| 220 (0)| 00:00:03 | 1 | 1 | | | |
    |* 21 | INDEX RANGE SCAN | PROGRAM_DIM_IX20 | 420 | | 3 (0)| 00:00:01 | 1 | 1 | | | |
    | 22 | PARTITION RANGE ALL | | 6299 | 4201K| 33318 (1)| 00:06:40 | 1 | 9 | Q1,03 | PCWP | |
    | 23 | PARTITION LIST ALL | | 6299 | 4201K| 33318 (1)| 00:06:40 | 1 | LAST | Q1,03 | PCWP | |
    | 24 | TABLE ACCESS BY LOCAL INDEX ROWID | ITD_MONTHLY_SUMMARY_FACT | 6299 | 4201K| 33318 (1)| 00:06:40 | 1 | 141 | Q1,03 | PCWP | |
    | 25 | BITMAP CONVERSION TO ROWIDS | | | | | | | | Q1,03 | PCWP | |
    |* 26 | BITMAP INDEX SINGLE VALUE | ITD_MONTHLY_SUMMARY_SK09 | | | | | 1 | 141 | Q1,03 | PCWP | |
    Predicate Information (identified by operation id):
    3 - access("A"."RPT_ENTITY_KEY"="D"."KEY")
    9 - access("A"."GL_PERIOD_KEY"="B"."KEY")
    14 - filter("B"."PERIOD_YEAR">=2006)
    21 - access("ASST_SEC_CONCISE_NAME"='abc')
    26 - access("A"."PROGRAM_KEY"="C"."KEY")
    exec dbms_stats.gather_table_stats( ownname=> 'IDW_TARGET', tabname=> 'PROGRAM_DIM' );
    ** explain plan for same statement uses full table scan**
    see first explain plan
    Since the stats were not gathered after the partition exchange I would imagine that they would still be used.
    Edited by: user12198207 on Feb 7, 2012 8:13 AM
    Edited by: user12198207 on Feb 7, 2012 9:47 AM

    Locking stats did not make any difference. Also, I deleted the stats at the global level leaving just partition stats and it continued to use the nested loop which takes 15+ minutes instead of 20 seconds with the FTS.
    In my original situation it listed the stats at the global level as stale after the partition exchange. But after I removed many of the steps and use just what's described in this posts.
    select * from dba_tab_statistics
    where table_name='PROGRAM_DIM';
    shows stale stats=no for both global and partition. Kind of unexpected. Further digging in shows that is just determined by a case statement.
    from dba_tab_statistics view ddl
    case
    when t.analyzetime is null then null
    when ((m.inserts + m.deletes + m.updates) >
    t.rowcnt *
    to_number(DBMS_STATS.GET_PREFS('STALE_PERCENT',
    u.name, o.name))/100 or
    bitand(m.flags,1) = 1) then 'YES'
    else 'NO'
    end

  • Partition exchange loading for specific subpartitions

    Hi All,
    Looking at an archive strategy - where we have to archive a specific dataset.
    Rather than a insert/delete routine - I was thinking of using partition exchange.
    The to-be archived table is interval range partitioned on date, with a list subpartition on country.
    It is for specific countries that I want to partition exchange.
        create table
        test_table
        (tbl_id number,
        country varchar2(2),
        sales_dt date,
        volume number)
        partition by range (sales_dt) interval (NUMTOYMINTERVAL(1,'Month'))
        subpartition by list (country)
        Subpartition template
        (subpartition p_ireland values ('IR'),
        subpartition p_france values ('FR'),
        subpartition p_other values (DEFAULT))
        (partition before_2008 values less than (to_date('01-JAN-2008','DD-MON-YYYY'))); The data loaded falls into the partitions and subpartitions correctly. All the partitions names are system generated.
    When I come to partition exchange for all the 'FR' subpartitions- I can't determine the logic.
    Using
        Alter table test_table
        exchange subpartition system_generated_name
        with table TEST_TABLE_ARCH;I can swap out a specific 'known' subpartition.
    I know you can use the 'for' logic with Oracle 11g but can't get the syntax to work.
    Any ideas?

    The error means you are trying to swap a partition that still contains data in a configuration where OWB expects an empty partition. How did you set the "Replace existing data in Target Partition" configuration parameter?
    Also, for more details on PEL, review the 10.19 to 10.27 pages of the user manual.
    Regards:
    Igor

  • Partition Exchange Loading

    Have anyone had success with this feature in OWB? I've just attempted it but got an "ORA-12841: Cannot alter the session parallel DML state within a transaction". Is there a property somewhere to stop it from generating these alter sessions stmt?
    TIA
    Hong
    Environment:
    OWB version 9.0.2.62.3
    Oracle9i EE 9.0.1.3.0
    Solaris 2.7

    There is a number of restrictions when using Partition Exchange, please check these conditions are true:
    - The partition you are loading into is empty,
    - The index is local (i.e. every partition has it's own index),
    - All the data you are loading fits into the partition (this is a primary suspect in your case),
    - Loading tipe is INSERT (DELETE/INSERT, TRUNCATE/INSERT, CHECK/INSERT should work bu you can get warnings during generation),
    Regards:
    Igor

  • Partition Exchange Loading (PEL)

    Hi everyone,
    I'm trying to set up a mapping in Oracle Warehouse Builder 9.0.4 to use Partition Exchange Loading.
    When running, I get the warning: PELWarningRTV1003
    Does anyone know what this message means, and where I can find information about such error messages?
    Thanks for your help!
    Best regards,
    Ronald Ommundsen

    The error means you are trying to swap a partition that still contains data in a configuration where OWB expects an empty partition. How did you set the "Replace existing data in Target Partition" configuration parameter?
    Also, for more details on PEL, review the 10.19 to 10.27 pages of the user manual.
    Regards:
    Igor

  • Virtual column and partition exchange load

    Hi All,
    Can someone tell me that if i have a virtual column on a table in 11g then can we load the data as partition exchange loading into the table.
    Thanks & Regards,
    Ankit Rana

    Hemant K Chitale wrote:
    Why not run a simple test with a dummy table, a few columns (plus a virtual column) and a few partitions ?
    Excellent suggestion.
    Shouldn't take more than about 30 minutes to create a test case - and if it takes more than 30 minutes the OP needs the practice anyway to get a better feel for the technology.
    Hint to OP: make sure you put some data in the "incoming" table, make sure you put some data in the "non-exchanged" partitions, remember to include a unique/pk constraint if you're expecting one on production, and run with sql_trace enabled to see what's happening in the background.
    Regards
    Jonathan Lewis

  • Partition Exchange Load in same schema

    Hi all,
    If my source and target tables are in different schema but table's structures are same. Can I apply Direct partition exchange load (PEL) in my mapping using OWB. Plz help me......
    Thank & Regards
    Soumen

    Hemant K Chitale wrote:
    Why not run a simple test with a dummy table, a few columns (plus a virtual column) and a few partitions ?
    Excellent suggestion.
    Shouldn't take more than about 30 minutes to create a test case - and if it takes more than 30 minutes the OP needs the practice anyway to get a better feel for the technology.
    Hint to OP: make sure you put some data in the "incoming" table, make sure you put some data in the "non-exchanged" partitions, remember to include a unique/pk constraint if you're expecting one on production, and run with sql_trace enabled to see what's happening in the background.
    Regards
    Jonathan Lewis

  • APPLE PLEASE ANSWER SOME OF THESE EXCHANGE ISSUES

    I can t sync my inbox over exchange, everything else works and syns fine.
    My inbox keeps downloading and clearing emails. Now it doesnt even download.
    The conststant trying to download is killing my battery in 6 hours.
    Whats going on ??

    Yeh, already tried that one.
    Ive been onto the phone to apple care in the states and they seem to think it is an exchange issue ?
    As nice and as helpfull as the guy was I dont believe that for a minute I dont hink it is. My Administrators have checked all aspect of our server and are at a loose end..
    I pointed the nice guy in this direction to look at the amount of issues..
    Anyways,, annoying as it is, hopefully theres a fix asap..

  • Automating partition exchange

    I am looking to automate a partition exchange process because I am changing a column
    from a date to a timestamp.
    For each parition in a table I want to do the following steps:
    1. PEX: SRC_TBL to TEMP_TBL
    2. Make the date to timestamp change on the TEMP_TBL
    3. PEX: TEMP_TBL to DEST_TBL
    4. Prepare the TEMP_TBL for the next cycle - change the timestamp back to date
    CREATE OR REPLACE PROCEDURE test1.history_pex_proc
    (OWNER in VARCHAR2(25)
    SRC_TBL in VARCHAR2(25),
    TEMP_TBL in VARCHAR2(25),
    DEST_TBL in VARCHAR2(25))
    -- Table name and owner can be hard coded.
    for x in ( SELECT * FROM dba_tab_partitions WHERE
    table_name = SRC_TBL AND
    table_owner = OWNER)
    loop
    sql_stmt='ALTER TABLE OWNER.SRC_TBL EXCHANGE PARTITION x.partition_name WITH TABLE OWNER.TEMP_TBL WITHOUT VALIDATION;'
    execute immediate sql_stmt ;
    sql_stmt='ALTER TABLE OWNER.TEMP_TBL MODIFY(QUEUE_DATE TIMESTAMP(3));'
    execute immediate sql_stmt ;
    sql_stmt='ALTER TABLE OWNER.DEST_TBL EXCHANGE PARTITION x.partition_name WITH TABLE OWNER.TEMP_TBL WITHOUT VALIDATION;'
    execute immediate sql_stmt ;
    sql_stmt='TRUNCATE TABLE OWNER.TEMP_TBL ;'
    execute immediate sql_stmt ;
    sql_stmt='ALTER TABLE OWNER.TEMP_TBL MODIFY(QUEUE_DATE DATE);'
    execute immediate sql_stmt ;
    sql_stmt='commit;'
    execute immediate sql_stmt ;
    end loop
    Is there a more efficient way to execute the commands other than using execute immediate sql_stmt after every command? I have about 300 partitions to exchange and the size of my tables is approx 3Tb's so I want to get this done as quick and as efficeintly as possible

    Create a dummy partitioned table without constraints and, in a loop that will run for 5 minutes, continuously insert into the table.
    While that is running, in a separate session, exchange partitions.
    What happens?
    And yes I am returning to my instructor role intentionally.
    Please report back to the other students the results from your homework assignment. <g>

  • Partition exchange failure

    (Oracle 10g R1 on zLinux) I've got a large partitioned table with some partitions that are almost empty (but still claiming large amounts of blocks). To do some partition exchanging I created a second table that has exactly the same column layout (I used the create script from the large table without the partition directives and I tried a 'create table .. as select * from big-table) without any indexes. Fot the indexes(the plan was to re-create them when the exchanges were done.
    Now when I start the partition exchange using:
    ALTER TABLE ahd_request
    EXCHANGE PARTITION tm2002
    WITH TABLE ahd_request_small
    I get the message 'ORA-14097: column type or size mismatch in ALTER TABLE EXCHANGE PARTITION'
    Any ideas wether or not this is a bug or am I missing something obivous?
    tia
    Martin

    Please check two tables are absolutely in sync with
    each other. In terms of columns and data type.That was the easy part (the query is supplied in the meta link documents).
    After that it gets more complicated because you have to check for (deleted) Function Based Indexes, Unused Columns etc. which do not show up but create/hide hidden columns etc.
    Believe me, I'm way beyond simple structure checking and will follow the only advise I haven't tried yet (from Oracle that is): dump and reload.
    regards,
    Martin

Maybe you are looking for

  • Error while starting CE1 DB instance on CE Trial 7.2

    Installed CE 7.2 Evaluation Trial but the MAXDB Instance CE1 is not coming up. I have probably a related error coming in my SAPMMC tool with exit error 503. Tried starting DBMCLI with the cmd dbmcli -d CE1 -u superdba,intel123 db_online but i get an

  • Get settlement data for an order - Recursive

    Hi Experts, I have a peculiar requirement. For an internal order, determine its FERC indicator. If the FERC Indicator for the internal object is 0000, then read the settlement rules of the object for the period(s) being processed and re-perform the l

  • Search

    Hello Friends! I have one little bit problem in this query that I want the cursor replace on the field of email when I find some employee code. just like 123 email 456 email 111 email If I search 123 then cursor must go to email field. I wrote this c

  • Air 3.3 and background ios apps

    Hi All I cannot find some coherent information on this so I am asking here. I need to write an iOS app that needs to perform a webservice call every x minutes to update the slqite db on the device, even if the application is not running in the foregr

  • Safari doesn't load a special page

    hello, I've got a problem with Safari. It doesn't load a special page. I always got a timeout. It's the admin page from my pixelpost site. Other Browsers like Firefox or Camino etc didn't work too, but when I start Parallels and load this page in Int