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

Similar Messages

  • 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

  • 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 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

  • 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

  • Partition exchange loading with a cube as target

    The owb does'nt generate pel-code, if we use a cube as the target of the mapping. There are no error messages, but the package does'nt contain the pel-code. If we use a normal partitioned table as the target, the codes is generated. Does anybody know if this (cube as a target of a pel-Mapping) is supported by the owb or wether we have to use a normal table.

    This sounds like a bug. PEL should at least inform users about why it doesn't show up. Please file an iTAR with Oracle Support and include a MDL file.

  • Partition Exchange

    We are in the process of moving data from regular tables to partition tables. The scheme is to make the partition tables first and then insert the data from its parent original table to these new partition tables. My understanding is that, partition exchange only occurs between a table and a selected partition and vice versa. Since the original table has data which would move to separate partitions, how it could be accomplished by exchange.
    Here is an example. The original TABLE is Called X and it has data on column(Y), 1, 2, 3, 4, ...... We built a partition table PARTX on column Y with Partition_1, partition_2, partition_3 etc. Now can we use the partition exchange for it ? If not what would be a good startegy to transfer the data.
    Thanks.

    user6116850 wrote:
    Here is an example. The original TABLE is Called X and it has data on column(Y), 1, 2, 3, 4, ...... We built a partition table PARTX on column Y with Partition_1, partition_2, partition_3 etc.The basic requirements for a partition exchange is that the table and partitioned table must have the same structure and same indexes. (i.e. the table's indexes must match the local partitioned indexes).
    Also, it is not a transfer of data. The table owns the data and indexes of X. The partitioned table owns the data and indexes of partition PARTX. The partition exchange simply changes ownership. The partition now owns the table's data and indexes and vice versa.
    As this in an exchange of ownership, it is a very effective method of swapping GBs (or even TBs) of data in and out of a partitioned table within milliseconds. In other words, a very effective data management tool.
    Now can we use the partition exchange for it ? If not what would be a good startegy to transfer the data.That depends on what problem you are trying to solve and what requirement you are trying to address... The requirement dictates which tool to use.
    I suggest you read chapter 18 of the [Oracle® Database Concepts|http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/partconc.htm] guide that deals with partitioned tables and indexes.

  • Compare Table Data on 2 different databases having same schema

    I need to compare data in all the tables in 2 different databases having same schema.
    If there is any difference in data in any table on Database1 and Database2 then I need to update/insert/delete the rows in my table in Database2.
    So Database1 is my source database and Database2 is my sync database. I cannot use expdp tables as I am not having sufficient privileges to the database server.
    Also I cannot drop and recreate the tables as they are huge.
    Can anyone please guide me how to compare data and to write a script to comapre the changes in say Database1.Table1 and Database2.Table1 and then accordingly do inserts/updates/deleted on Database2.Table1?
    Thanks

    Karthick_Arp wrote:
    Do you have a DBLink? If youes you can do this.
    1. Login into the Database-2 and run this code.
    begin
    for i in (select table_name from user_tables)
    loop
    execute immediate 'truncate table ' || i.table_name;
    end loop;
    end;This will empty all the tables in your Database-2. Now what you need is to just populate the data from Database-1This might result in error, if any of the tables have referential integrity on them.
    From 10g documentation :
    Restrictions on Truncating Tables
    You cannot individually truncate a table that is part of a cluster. You must either truncate the cluster, delete all rows from the table, or drop and re-create the table.
    You cannot truncate the parent table of an enabled referential integrity constraint. You must disable the constraint before truncating the table. An exception is that you can truncate the table if the integrity constraint is self-referential.
    If a domain index is defined on table, then neither the index nor any index partitions can be marked IN_PROGRESS.I would go for normal MERGE. Also change the cursor to select table names by first modifying the child tables and then the parent table.

  • Disk Utility - Partition map needs repair because a data partition needs loader space.

    I just finished setting up both my OSX and Windows installs from scratch after fitting an SSD, which in-turn was right before my logic board died and Apple replaced it, now it looks like I have some sort of hard drive issue brewing.
    This was my plan for the SSD, and how it currently displays in Disk Utility although that wasn't the case earlier:
    And in Terminal:
    My intention was to have two boot partitions for each OS, 'Macintosh HD' and 'Win 7 Pro' and a third shared data partition 'Projects' on the SSD, which I made in Drive Genius after installing Boot Camp. I don't want Macintosh HD accessible from Windows because I'll be using Paragon HFS+ or MacDrive to give write access and don't want OSs stomping on other OSs turf, hence needing three partitions. Everything looked fine until I just checked Disk Management under windows and realised it couldn't see the Projects volume. Even though it's fine in OS X, it was just marked black/unallocated space.
    So I booted back into OSX, all my files look fine so I ran Disk Utility and the Partition tab looked really odd - unfortunately I didn't get a screenshot. All volumes reported their size correctly but visually, Macintosh HD took up most of the drive. I could see 'Windows 7 Pro' under this, but the Partition Layout section had a scrollbar, which if I scrolled down showed 'Projects' squished into a tiny gap at the bottom. I ran a Verify, which reported no problems, and at some time since the Partition Layout has reverted to how it should look (as in the screenshot above), with 'Projects' book-ended by "Macintosh HD' and 'Windows 7 Pro'.
    Now when I run a Verify on Macintosh HD or Projects volumes, it says there's no problem, but if I run one on the drive, I get this message:
    Volume Macintosh HD on disk0s2 has 0 bytes of trailing loader space and it needs 134217728 bytes
    Problems were found with the partition map which might prevent booting
    Error: Partition map needs repair because a data partition needs loader space.
    I've only managed to find one other mention of this error here, but the fix is not relevant to me because I don't have Sophos installed. I've tried Single User/Safe Mode but it just boots into normal mode, so I can't do a fsck -fy.
    ** /dev/rdisk0s2 (NO WRITE)
    Can't open /dev/rdisk0s2: Permission denied
    That value in bytes is exactly 128mb, so I suspect the problem lies with one of the invisible partitions that show up in iPartition and Disk Management under Windows, but not in Disk Utility. I have backups and I suspect the root of the problem is partitioning in iPartition after installing Boot Camp, but I've never had issues with this approach in the past so I'm wary of just giving up and reinstalling Windows again will be massive hassle because I no longer have a SuperDrive and last time it refused to install from USB.
    Anyone have any idea what's going on? It seems like the sort of issue Disk Utility should just handle, at least in Recovery mode, but it's not playing ball. It also doesn't seem like a massive problem since my files all look fine and performance is OK, so I'm reluctant to do anything major.
    I'll update with a shot of the drive in Disk Management from Windows in a few minutes, in case that sheds light on anything. Thanks!

    Similar issue here. I manually partitioned my hard disk for triple boot (using Gparted on Linux), then everything was just fine until I ran bootcamp, to do something as simple as create a boot USB.
    I get the same error as a result and have to work my way into booting, by resorting first to a Linux live USB, then restarting from the live USB, to finally reach my rEFInd boot manager, or whichever boot manager should be initialized at startup.
    I suppose that the cause in my case is that some operation "scratched" the protective MBR. See this:
    http://www.mactech.com/articles/mactech/Vol.23/23.03/APMtoGPT/index.html
    I am hoping to fix it using an external Yosemite installation media: see this guide -
    http://www.macworld.com/article/2367748/how-to-make-a-bootable-os-x-10-10-yosemi te-install-drive.html
    And as a last resort to reinstall.
    I'll admit I am negatively surprised. I need this computer for professional reasons, and for the sake of "preserving the integrity of OSX", measures defined by Apple instead tend to make partitions far easier to damage. And this problem seems to affect a number of users.
    As for what I have to go through to fix it: a 5GB download, during which I have to register my credit card to the Apple Store. "Pay first, get your free software next."
    IF Disk Utility can fix it, from the external media, then fair enough. The hassle is unpleasant but it files as "a choice".
    Otherwise you can file it safely under software design calamity.

  • 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 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

  • Partition Exchange during DMLs

    Hello,
    This question regarding Partition Exchange during DML operations on 10.2.0.3
    I have a table that's RANGE-LIST partitioned as follow. Syntaxt may not be perfact..
    CREATE TABLE P_TBL
    O_DATE DATE,
    DOW    NUMBER, -- This actually is TO_NUMBER(TO_CHAR(O_DATE,'D'))
    SALE_AMT NUMBER,
    PARTITION BY RANGE ( DOW)
    SUBPARTITION BY LIST ( STATE)
    PARTITION P01 VALUE LESS THAN ( 2)
    (SUBPARTITION P01_EAST VALUE ('EAST'),
      SUBPARTITION P01_WEST VALUE ('WEST'),
      SUBPARTITION P01_NORTH VALUE ('NORTH'),
      SUBPARTITION P01_SOUTH VALUE ('SOUTH')
    PARTITION P02 VALUE LESS THAN ( 3)
    (SUBPARTITION P02_EAST VALUE ('EAST'),
      SUBPARTITION P02_WEST VALUE ('WEST'),
      SUBPARTITION P02_NORTH VALUE ('NORTH'),
      SUBPARTITION P02_SOUTH VALUE ('SOUTH')
    PARTITION P07 VALUE LESS THAN ( 8)
    (SUBPARTITION P07_EAST VALUE ('EAST'),
      SUBPARTITION P07_WEST VALUE ('WEST'),
      SUBPARTITION P07_NORTH VALUE ('NORTH'),
      SUBPARTITION P07_SOUTH VALUE ('SOUTH')
    /Other table (NP_TBL_EAST ) is Non partioned table. with the same columns.
    CREATE TABLE NP_TBL_[EAST|WEST|SOUTH|NORTH]
    O_DATE DATE,
    DOW    NUMBER,
    SALE_AMT NUMBER,
    )Now I have 2 processes,
    Process 1:
    Continuously INSERT the daily-Data in the P_TBL. Assume it's currently inserting data only in Partition P02 (i.e. Monday Partition )
    INSERT INTO P_TBL
    (O_DATE, DOW,SALE_AMT..... )
    VALUES
    (:1,:2, :3.... )
    Process 2:
    Will swap the previous day's( i.e. Sunday's ) data for each region with Partition Exchange mechanism.
    ALTER TABLE P_TBL exchange subpartition P01_EAST with table NP_TBL_EAST;
    ALTER TABLE P_TBL exchange subpartition P01_NORTH with table NP_TBL_NORTH;
    Now questions:
    1) What kind of lock Process 1 & process 2 will aquire?
    2) Can any of these two processes have risk of failure due to locking?
    Thanks in advance for your help
    -Max

    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>

  • How to register the same schema with same URL

    I'm getting ORA-31085 error when try to register the same schema with same URl.
    My requirement is that I should be able to reregister the same schema with the same URL .
    I'm using the following function :
    PROCEDURE validateXmlSchema(inp_xmlMsg IN VARCHAR2,
    out_isValidDoc IN OUT NUMBER,
    inp_xmlSchema IN OUT VARCHAR2,
    out_varchar_notused OUT VARCHAR2)IS
    xmldoc XMLType;
    res number;
    BEGIN
    xmldoc := XMLtype(inp_xmlMsg);
    res := xmldoc.isSchemaValid(inp_xmlSchema);
    IF (xmldoc.isSchemaValid = 1) THEN
    out_isValidDoc := 1;
    ELSE
    out_isValidDoc := 0;
    END IF;
    END validateXmlSchema;
    This is used recursively.Until the schema is not validated for a given URL this function should keep on throwing error and once the schema is validated the data should be inserted in the DB.
    But its not happening as of now instead the ORA-31085 is thrown second time.
    Plz provide pointers to solve the issue.

    "mjs" <[email protected]> wrote in message
    news:g7kjk5$o6$[email protected]..
    > "mjs" <[email protected]> wrote in message
    > news:g7gl2g$i3d$[email protected]..
    >> "Zorrrro" <[email protected]> wrote
    in message
    >> news:g7gcjv$a6n$[email protected]..
    >>> I'm completely nuckered trying to find an answer
    for this...
    >>>
    >>> Does anyone know how to keep the same width an
    position of the submenus
    >>> of a
    >>> horizontal dropdown menu?
    >>> Thank you in advance.
    >>>
    >>> Cheers.
    >>
    >> Doesn't a simple style="width:200px" in the input
    tag work?
    >
    > I'll asume the answer is "yes", then. ;) You're welcome.
    I believe the OP is talking about a dropdown menu like this
    one
    http://www.tjkdesign.com/articles/keyboard_friendly_dropdown_menu/default.asp
    not about a "select menu".
    I could be wrong though...
    Thierry
    Articles and Tutorials:
    http://www.TJKDesign.com/go/?0
    http://developer.yahoo.com/
    helps you build applications and mashups

Maybe you are looking for

  • Direct comparison old and new mini into tv

    Hi all. I notice a slew of threads berating the display quality of the mini and I want to put my chime in. I have a 1.6 core duo mini and I replaced it Saturday with a new one. I have a 32 in LCD in the living room, the old one was hooked up with a d

  • V.02 use different RFC connection

    Hello all, We have a situation that when a user executes V.02 in R3 and then clicks on an incomplete Sales Document it jumps to the SCM system to do an APO Availability Check.  The problem is that it uses a RFC connection with a system user and when

  • What is AirPort Extreme?

    Hey guys, i was just wondering what AirPort Extreme actually is. Looking around, i think it's just a good router that provides 802.11ac wifi and is really fast.... 1. Is the Extreme just a normal router from Apple that supports 802.11ac wifi? Nothing

  • How do I change TimeStamp from US server to UK time

    Hello, I am based in the UK. My hosting company is based in the US. I am using a MySql database. All the database tables have timestamps that are set to the local machine time. I would like to change the timestamp so that it is GMT. Can you please te

  • Redownloading Photoshop with an expired email account

    I purchased the student Adobe Photoshop CS4 Extended software while in college using my school email address.  Upon graduating, my account expired and I have no way to access the redownload feature to install Photoshop on my new computer.  I still ha