Parent partition of subpartitions that move to a new TS

PLATFORM_NAME: Solaris[tm] OE (64-bit)
VERSION: 11.2.0.2.0
In our system we have several tables that are partitioned by range. Some of these tables are then sub-partitioned by list. Well initially we were creating a new tablespace every month and creating the new monthly partition on the new tablespace. Well I got annoyed by this, so I decided to move all of the partitions/subpartitions to a single tablespace. And this went smooth, at first, in my dev region. I moved all of the segments to the new tablespace, but then I noticed something odd...
Example:
CREATE TABLE me.sub_partitioned_table
my_range_partitioned_column date,
my_list_partitioned_column varchar2(30)
PARTITION BY RANGE (my_range_partitioned_column)
SUBPARTITION BY LIST (my_list_partitioned_column)
SUBPARTITION TEMPLATE
(SUBPARTITION value4 VALUES (4),
SUBPARTITION value23 VALUES (23),
SUBPARTITION value60 VALUES (60),
SUBPARTITION "DEFAULT" VALUES (DEFAULT)
PARTITION P_HIST VALUES LESS THAN (TO_DATE(' 2007-09-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
TABLESPACE P_HIST
( SUBPARTITION P_HIST_value4 VALUES (4) TABLESPACE MONTHLY_PARTITION,
SUBPARTITION P_HIST_value23 VALUES (23) TABLESPACE MONTHLY_PARTITION,
SUBPARTITION P_HIST_value60 VALUES (60) TABLESPACE MONTHLY_PARTITION,
SUBPARTITION P_HIST_DEFAULT VALUES (DEFAULT) TABLESPACE MONTHLY_PARTITION ),
...... and there are a lot more partitions/subpartitions
So I create all of my alter table move subpartition statements, and the execute as they should. If I do:
select tablespace_name from dba_tab_subpartitions where table_name = 'SUB_PARTITIONED_TABLE' and table_owner = 'ME', I see that all of my subpartitions are on the new, single tablespace. BUUUUUUT, if I do:
select tablespace_name from dba_tab_partitions where table_name = 'SUB_PARTITIONED_TABLE' and table_owner = 'ME', I see all of the old tablespace names are still listed for my partitions.
My question is, can this be changed? Did I screw something up? Is this a bug? If I try to alter the table and move the partition I get an error because I'm trying to move something that isn't a segment. Any help would be appreciated. Hopefully this makes sense. If you need clarification on anything, please let me know.
Thanks!

I found my answer...
ALTER TABLE ME.sub_partitioned_table MODIFY DEFAULT ATTRIBUTES FOR PARTITION MONTHLY_PARTITION TABLESPACE NEW_BIG_TS;

Similar Messages

  • Where did the Partitions and SubPartitions go?

    I created a table with partition Range (Transaction_Date, Retention_Period) and hash (Record_Id) subpartition template (for 32 subpartitions)
    Then I add more partitions and while the loop is going on I can get counts of partitions and subpartitions. The job finished and my log table shows about 1800 partitions added and there should be 32 subpartitions for each of the partitions. However, user_tab_partitions shows zero records for the table, and user_tab_subpartitions also show zero record. After a few minutes the partitions show up but no subpartitions. The indexes on the table have also disappeared (one local and one global)
    Any explanation for this behaviour?
    Working on Exadata 11.2.0.3
    Querying
    USER_TABLES
    USER_TAB_PARTITIONS
    USER_TAB_SUBPARTITIONS
    USER_INDEXES

    >
    Step 1. Create Table xyz (c1 date, c2 integer c3 integer, etc)
    partition by range (c1,c2)
    subpartition template (s01, s02... s32)
    create index i1 on xyz (c1,c2,c3) local;
    Then, since I want to create about 1800 partitions I have a procedure that has a "loop around" ALTER TABLE add Partition .. until all the partitions are created. This is the "Job" which while running I query USER_TAB_PARTITIONS and USER_TAB_SUBPARTITIONS to see how things are progressing. And Yes ALTER Table has no progressing to verify.
    So al the partitions get created. No errors from the procedure to go through creating all the partitions. So I would expect that at the end I should get to see all the new partitions for the Table. Instead I get "no records" from USER_TAB_PARTITIONS and USER_TAB_SUBPARTITIONS.
    I am also aware that "ALTER TABLE ADD PARTITION .." cannot make indexes go away. However, if the query on USER_INDEXES returns nothing, what happend to the Index created before the partitions were added?
    I am not using DBMS_REDEFINITION. The only procedure is to add partitions one at a time for each date for 3 years. If you have a better way than a procedure please advise accordingly.
    >
    In order to help you the first step is to understand what problem you are dealing with. Then comes trying to determine what options are available for addressing the problem. There are too many times , and yours may, or may not, be another one, where people seem to have settled on a solution before they have really identified the problem.
    Anytime someone mentions the use of dynamic SQL it raises a red flag. And when that use is for DDL, rather than DMl, it raises a REALLY BIG red flag.
    Schema objects need to be managed properly and the DDL that creates them needs to be properly written and kept in some sort of version control.
    Scripts and procedures that use dynamic SQL are more properly used to create DDL, not to execute it. That is, rather than use a procedure to dynamically create or alter a table you would use the procedure to dynamically create a DDL script that would create or alter the table.
    Let's assume that you know for certain that your table really needs to have 1800 partitions, be subpartitioned the way you say and have partition and subpartitions names that you assign. Well, that would be a pain to hand-write 1800 partition definitions.
    So you would create a procedure that would produce a CREATE TABLE script that had the proper clauses and syntax to specify those 1800 partitions. Your 'loop' would not EXECUTE an ALTER TABLE for each partition but would create the partition specification and modify the partition boundaries for each iteration through the loop. Sort of like
    for i from 1 to 365 loop
        add partition spec for startDate + i
    end loop;The number of iterations would be a parameter and you would start with 2 or 3. Always test with the smallest code that will produce the correct results. If the code works for 3 days it will work for any larger reasonable number.
    Then you would save that script in your version control system and run it to create the table. There would be nothing to monitor since there is just one script and when it is done it is done.
    That would be a proper use of dynamic sql: to produce DDL, not to execute it.
    Back to your issue. If I were your manager then based on what you posted I would expect you to already have
    1. a requirements document that stated the problem (e.g. performance, data management) that was being addressed
    2. test results that showed that your proposed solution (a table partitioned the way you posted) solves the problem
    The requirements doc would have detail about what the performance/management issues are and what impact they are having
    You also need to document what the possible solutions are, the relative merits of each solution and the factors you considered when ranking the solutions. That is, why is your particular partitioning scheme the best solution for the problem.
    You should have test results that show the execution plans and performance you achieved by using a test version of your proposed table and indexes.
    Until you have 'proven' that your solution will work as you expect I wouldn't recommend implementing the full-blown version of it.
    1. Create a table MANUALLY that has 2 or three days worth of partitions.
    2. Load those partitions with a representative amount of data
    3. Execute test queries to query data from one of those partitions
    4. Execute the same test queries against your current table
    5. Capture the execution plans (the actual ones) for those queries. Verify that you are getting the performance improvements that you expected.
    Once ALL of that prep work is done and you have concluded that your table/index design is correct then go back to work on writing a script/procedure that will produce (not execute) DDL to produce the main table and partitioning you designed.
    Just an aside on what you posted. The indexes should be created AFTER the table and its partitions are created. If you are creating your local index first, as you post suggests, you are forcing Oracle to revamp it 1800 times when each partition is added. Just create the index after the table.
    p.s. the number of posts anyone has is irrevelant. The only thing that matters is whether the advice or suggestions they provide is helpful. And the helpfullness of those is limited to, and based on, ONLY the information a poster provides. For exampe, your proposed partitioning scheme might be perfectly appropriate for your use case or it could be totally inappropriate. We have no way of knowing without knowing WHY you chose that scheme.
    But I haven't seen one like that so it makes me suspicious that you really need to get that complicated.

  • Using PARTITION FOR/SUBPARTITION FOR syntax to insert

    We are trying to use PARTITION FOR syntax (or, better, SUBPARTITION FOR syntax) to insert into a subpartitioned table.
    http://docs.oracle.com/cd/E11882_01/server.112/e26088/sql_elements009.htm#i165979
    08:26:46 GM_CS_CDR@oradev02> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for Solaris: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    5 rows selected.This table is has interval partitions on DATA_ORIGIN_ID and list subpartitions on TABLE_NAME.
    First, a basic insert without specifying partitions:
    08:10:05 GM_CS_CDR@oradev02> insert into key_ids2 (
    08:11:51   2  DATA_ORIGIN_ID         ,
    08:11:51   3  TABLE_NAME             ,
    08:11:51   4  DUR_UK                 ,
    08:11:51   5  DUR_UK_ID              )
    08:11:51   6  select
    08:11:51   7  12         ,
    08:11:51   8  TABLE_NAME             ,
    08:11:51   9  DUR_UK                 ,
    08:11:51  10  DUR_UK_ID             
    08:11:51  11  from key_ids where table_name = 'PART'
    08:11:51  12  and rownum <= 10;
    10 rows created.Verifying SUBPARTITION FOR syntax on a SELECT:
    08:19:43 GM_CS_CDR@oradev02>
    08:26:45 GM_CS_CDR@oradev02>
    08:26:45 GM_CS_CDR@oradev02>
    08:26:45 GM_CS_CDR@oradev02>
    08:26:45 GM_CS_CDR@oradev02> select count(*) from key_ids2
    08:26:45   2  subpartition for(12,'PART');
      COUNT(*)
            10
    1 row selected.But when we add a subpartition specification (to limit the lock to a single subpartition), we get a syntax error:
    08:14:57 GM_CS_CDR@oradev02> insert into key_ids2 subpartition for(12,'PART') (
    08:14:57   2  DATA_ORIGIN_ID         ,
    08:14:57   3  TABLE_NAME             ,
    08:14:57   4  DUR_UK                 ,
    08:14:57   5  DUR_UK_ID              )
    08:14:57   6  select
    08:14:57   7  14         ,
    08:14:57   8  TABLE_NAME             ,
    08:14:57   9  DUR_UK||'!'                 ,
    08:14:57  10  DUR_UK_ID             
    08:14:57  11  from key_ids
    08:14:57  12  where table_name = 'PART'
    08:14:57  13  and rownum <= 10;
    insert into key_ids2 subpartition for(12,'PART') (
    ERROR at line 1:
    ORA-14173: illegal subpartition-extended table name syntaxSpecifying at the partition level did not work either:
    08:14:58 GM_CS_CDR@oradev02> insert into key_ids2 partition for(14) (
    08:15:23   2  DATA_ORIGIN_ID         ,
    08:15:23   3  TABLE_NAME             ,
    08:15:23   4  DUR_UK                 ,
    08:15:23   5  DUR_UK_ID              )
    08:15:23   6  select
    08:15:23   7  14         ,
    08:15:23   8  TABLE_NAME             ,
    08:15:23   9  DUR_UK||'!'                 ,
    08:15:23  10  DUR_UK_ID             
    08:15:23  11  from key_ids
    08:15:23  12  where table_name = 'PART'
    08:15:23  13  and rownum <= 10;
    insert into key_ids2 partition for(14) (
    ERROR at line 1:
    ORA-14108: illegal partition-extended table name syntaxBut specifying explicit partition and subpartition does work:
    08:17:45 GM_CS_CDR@oradev02> insert into key_ids2 partition (SYS_P15127) (
    08:18:23   2  DATA_ORIGIN_ID         ,
    08:18:23   3  TABLE_NAME             ,
    08:18:23   4  DUR_UK                 ,
    08:18:23   5  DUR_UK_ID              )
    08:18:23   6  select
    08:18:23   7  12         ,
    08:18:23   8  TABLE_NAME             ,
    08:18:23   9  DUR_UK||'!'                 ,
    08:18:23  10  DUR_UK_ID             
    08:18:23  11  from key_ids
    08:18:23  12  where table_name = 'PART'
    08:18:23  13  and rownum <= 10;
    10 rows created.
    08:18:24 GM_CS_CDR@oradev02> insert into key_ids2 subpartition (SYS_SUBP15126) (
    08:19:42   2  DATA_ORIGIN_ID         ,
    08:19:42   3  TABLE_NAME             ,
    08:19:42   4  DUR_UK                 ,
    08:19:42   5  DUR_UK_ID              )
    08:19:42   6  select
    08:19:42   7  12         ,
    08:19:42   8  TABLE_NAME             ,
    08:19:42   9  DUR_UK||'!#'                 ,
    08:19:42  10  DUR_UK_ID             
    08:19:42  11  from key_ids
    08:19:42  12  where table_name = 'PART'
    08:19:42  13  and rownum <= 10;
    10 rows created.We have been successful in using the PARTITION FOR syntax for tables that were partitioned but not subpartitioned.
    Any ideas?
    Thanks,
    Mike

    I've created a simplified script to reproduce our issue. The use of the syntax on an INSERT INTO using VALUES still produces the same error.
    Thanks,
    Andy
    select * from v$version;
    create table part_test_tbl
      data_origin_id NUMBER  not null,
      table_name VARCHAR2(30) not null,
      dur_uk     VARCHAR2(250) not null,
      dur_uk_id  NUMBER
    partition by range (data_origin_id) INTERVAL (1)
    subpartition by list (TABLE_NAME)
    SUBPARTITION TEMPLATE(
      subpartition BLUE values ('BLUE'),
      subpartition RED values ('RED'),
      subpartition YELLOW values ('YELLOW'),
      subpartition GREEN values ('GREEN'),
      subpartition ORANGE values ('ORANGE')
    (PARTITION DFLT_INTRVL VALUES LESS THAN (0)
      subpartition BLUE values ('BLUE'),
      subpartition RED values ('RED'),
      subpartition YELLOW values ('YELLOW'),
      subpartition GREEN values ('GREEN'),
      subpartition ORANGE values ('ORANGE')
    -- Create/Recreate indexes
    create index PART_TEST_TBL_PK on PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
      compress 2  local;
    create unique index PART_TEST_TBL_UK on PART_TEST_TBL (TABLE_NAME, DUR_UK_ID)
      compress 1;
    -- Create/Recreate primary, unique and foreign key constraints
    alter table PART_TEST_TBL
      add constraint PART_TEST_TBL_PK primary key (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK) USING INDEX PART_TEST_TBL_PK;
    alter table PART_TEST_TBL
      add constraint PART_TEST_TBL_UK unique (TABLE_NAME, DUR_UK_ID) USING INDEX PART_TEST_TBL_UK;
    --Add test data
    BEGIN
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (0, 'BLUE', '1', 1);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (0, 'BLUE', '2', 2);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (0, 'YELLOW', '3', 3);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (0, 'GREEN', '4', 4);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (0, 'ORANGE', '5', 5);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (1, 'BLUE', '6', 6);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (1, 'BLUE', '7', 7);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (1, 'YELLOW', '8', 8);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (1, 'GREEN', '9', 9);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (1, 'ORANGE', '10', 10);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (2, 'BLUE', '11', 11);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (2, 'BLUE', '12', 12);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (2, 'YELLOW', '13', 13);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (2, 'GREEN', '14', 14);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (2, 'ORANGE', '15', 15);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (10, 'BLUE', '16', 16);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (10, 'BLUE', '17', 17);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (10, 'YELLOW', '18', 18);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (10, 'GREEN', '19', 19);
       insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
       values (10, 'ORANGE', '20', 20);
       COMMIT;
    END;
    --Validate the subpartition_extended syntax
    select count(*) from PART_TEST_TBL subpartition for(10,'BLUE');
    --Show subpartition_extended syntax does not work on INSERT INTO
    INSERT /*+APPEND */ INTO PART_TEST_TBL SUBPARTITION FOR (10,'BLUE')
    (data_origin_id
    ,table_name
    ,dur_uk
    ,dur_uk_id)
    VALUES
    (10
    ,'BLUE'
    ,'16!'
    ,1016);
    --Show subpartition_extended syntax does not work on INSERT INTO
    INSERT /*+APPEND */ INTO PART_TEST_TBL SUBPARTITION FOR (10,'BLUE')
    (data_origin_id
    ,table_name
    ,dur_uk
    ,dur_uk_id)
    SELECT ptt.data_origin_id
          ,ptt.table_name
          ,ptt.dur_uk || '!' dur_uk
          ,ptt.dur_uk_id + 1000 dur_uk_id
      FROM PART_TEST_TBL ptt
    WHERE ptt.table_name = 'BLUE'
       AND ptt.data_origin_id = 10;
    DROP TABLE part_test_tbl PURGE;-----
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE  11.2.0.3.0  Production
    TNS for Solaris: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    SQL> create table part_test_tbl
      2  (
      3    data_origin_id NUMBER  not null,
      4    table_name VARCHAR2(30) not null,
      5    dur_uk     VARCHAR2(250) not null,
      6    dur_uk_id  NUMBER
      7  )
      8  partition by range (data_origin_id) INTERVAL (1)
      9  subpartition by list (TABLE_NAME)
    10  SUBPARTITION TEMPLATE(
    11    subpartition BLUE values ('BLUE'),
    12    subpartition RED values ('RED'),
    13    subpartition YELLOW values ('YELLOW'),
    14    subpartition GREEN values ('GREEN'),
    15    subpartition ORANGE values ('ORANGE')
    16  )
    17  (PARTITION DFLT_INTRVL VALUES LESS THAN (0)
    18    (
    19    subpartition BLUE values ('BLUE'),
    20    subpartition RED values ('RED'),
    21    subpartition YELLOW values ('YELLOW'),
    22    subpartition GREEN values ('GREEN'),
    23    subpartition ORANGE values ('ORANGE')
    24    )
    25  );
    Table created
    SQL> -- Create/Recreate indexes
    SQL> create index PART_TEST_TBL_PK on PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
      2    compress 2  local;
    Index created
    SQL> create unique index PART_TEST_TBL_UK on PART_TEST_TBL (TABLE_NAME, DUR_UK_ID)
      2    compress 1;
    Index created
    SQL> -- Create/Recreate primary, unique and foreign key constraints
    SQL> alter table PART_TEST_TBL
      2    add constraint PART_TEST_TBL_PK primary key (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK) USING INDEX PART_TEST_TBL_PK;
    Table altered
    SQL> alter table PART_TEST_TBL
      2    add constraint PART_TEST_TBL_UK unique (TABLE_NAME, DUR_UK_ID) USING INDEX PART_TEST_TBL_UK;
    Table altered
    SQL> --Add test data
    SQL> BEGIN
      2 
      3     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
      4     values (0, 'BLUE', '1', 1);
      5 
      6     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
      7     values (0, 'BLUE', '2', 2);
      8 
      9     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    10     values (0, 'YELLOW', '3', 3);
    11 
    12     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    13     values (0, 'GREEN', '4', 4);
    14 
    15     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    16     values (0, 'ORANGE', '5', 5);
    17 
    18     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    19     values (1, 'BLUE', '6', 6);
    20 
    21     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    22     values (1, 'BLUE', '7', 7);
    23 
    24     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    25     values (1, 'YELLOW', '8', 8);
    26 
    27     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    28     values (1, 'GREEN', '9', 9);
    29 
    30     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    31     values (1, 'ORANGE', '10', 10);
    32 
    33     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    34     values (2, 'BLUE', '11', 11);
    35 
    36     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    37     values (2, 'BLUE', '12', 12);
    38 
    39     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    40     values (2, 'YELLOW', '13', 13);
    41 
    42     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    43     values (2, 'GREEN', '14', 14);
    44 
    45     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    46     values (2, 'ORANGE', '15', 15);
    47 
    48     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    49     values (10, 'BLUE', '16', 16);
    50 
    51     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    52     values (10, 'BLUE', '17', 17);
    53 
    54     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    55     values (10, 'YELLOW', '18', 18);
    56 
    57     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    58     values (10, 'GREEN', '19', 19);
    59 
    60     insert into PART_TEST_TBL (DATA_ORIGIN_ID, TABLE_NAME, DUR_UK, DUR_UK_ID)
    61     values (10, 'ORANGE', '20', 20);
    62 
    63     COMMIT;
    64  END;
    65  /
    PL/SQL procedure successfully completed
    SQL> --Validate the subpartition_extended syntax
    SQL> select count(*) from PART_TEST_TBL subpartition for(10,'BLUE');
      COUNT(*)
             2
    SQL> --Show subpartition_extended syntax does not work on INSERT INTO
    SQL> INSERT /*+APPEND */ INTO PART_TEST_TBL SUBPARTITION FOR (10,'BLUE')
      2  (data_origin_id
      3  ,table_name
      4  ,dur_uk
      5  ,dur_uk_id)
      6  VALUES
      7  (10
      8  ,'BLUE'
      9  ,'16!'
    10  ,1016);
    INSERT /*+APPEND */ INTO PART_TEST_TBL SUBPARTITION FOR (10,'BLUE')
    (data_origin_id
    ,table_name
    ,dur_uk
    ,dur_uk_id)
    VALUES
    (10
    ,'BLUE'
    ,'16!'
    ,1016)
    ORA-14173: illegal subpartition-extended table name syntax
    SQL> --Show subpartition_extended syntax does not work on INSERT INTO
    SQL> INSERT /*+APPEND */ INTO PART_TEST_TBL SUBPARTITION FOR (10,'BLUE')
      2  (data_origin_id
      3  ,table_name
      4  ,dur_uk
      5  ,dur_uk_id)
      6  SELECT ptt.data_origin_id
      7        ,ptt.table_name
      8        ,ptt.dur_uk || '!' dur_uk
      9        ,ptt.dur_uk_id + 1000 dur_uk_id
    10    FROM PART_TEST_TBL ptt
    11   WHERE ptt.table_name = 'BLUE'
    12     AND ptt.data_origin_id = 10;
    INSERT /*+APPEND */ INTO PART_TEST_TBL SUBPARTITION FOR (10,'BLUE')
    (data_origin_id
    ,table_name
    ,dur_uk
    ,dur_uk_id)
    SELECT ptt.data_origin_id
          ,ptt.table_name
          ,ptt.dur_uk || '!' dur_uk
          ,ptt.dur_uk_id + 1000 dur_uk_id
      FROM PART_TEST_TBL ptt
    WHERE ptt.table_name = 'BLUE'
       AND ptt.data_origin_id = 10
    ORA-14173: illegal subpartition-extended table name syntax
    SQL> DROP TABLE part_test_tbl PURGE;
    Table dropped
    SQL>

  • ORA 2266 -- Drop parent partition with no child records exists

    Hi Team ,
    Here I have a parent partitioned table and child refrenced non-partition table .
    To drop parent partition I am doing
    1)delete from child
    2)delete from parent partition
    3)alter table drop parent partition
    ---and its working fine .
    I am trying to do below which is not working , Could you please guide me why it is not
    1)delete from child
    2)alter table drop parent partition -- throwing below error
    Summarizing ,
    Why I am not able to drop/trunc a parent partition(no corresponding rows exists in child tables) where as able to do after deleting the rows from parent partition .
    From Doc :
    Error: ORA 2266
    Text: table has some unique/primary keys that are referenced by some foreign k
    eys
    Cause: Attempt to drop the table while the table still has some unique/
    primary keys that are referenced by some foreign keys.
    Action: Remove all such references to the keys before dropping the table
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE     11.2.0.2.0     Production
    TNS for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production

    Oracle decides what the rules are & you must conform to them
    bcm@bcm-laptop:~$ oerr ora 2266
    02266, 00000, "unique/primary keys in table referenced by enabled foreign keys"
    // *Cause: An attempt was made to truncate a table with unique or
    //         primary keys referenced by foreign keys enabled in another table.
    //         Other operations not allowed are dropping/truncating a partition of a
    //         partitioned table or an ALTER TABLE EXCHANGE PARTITION.
    // *Action: Before performing the above operations the table, disable the
    //          foreign key constraints in other tables. You can see what
    //          constraints are referencing a table by issuing the following
    //          command:
    //          SELECT * FROM USER_CONSTRAINTS WHERE TABLE_NAME = "tabnam";

  • Running out of space on my C: partition. Need to move CC suite of apps to D: partition. tried to do this in install/file location preferences but it didn't make a difference.

    Running out of space on my C: partition. Need to move CC suite of apps to D: partition. tried to do this in install/file location preferences but it didn't make a difference.

    *unselected "Sync music" from the appropriate tab. And iTunes warned: if you do this, we will delete every playlist and song on your iPod*
    To change to manually managing an iPod you don't "unselect" sync music, you "select" manually manage songs and videos. If you want to delete songs from iTunes and keep them on the iPod you need to change the update option of your iPod by checking the box beside "manually manage songs and videos" in the Summary tab and clicking Apply. Your iPod will not sync with iTunes in this mode so it can have different content, you can get details here:
    Managing content manually on iPod
    iPod 101: Fill 'er Up
    One major word of caution. If you delete songs or videos from your computer and have no back up other than the iPod you will risk losing them permanently if your iPod fails or you find you have to restore it to solve a problem. You should consider investing in an additional internal or external hard drive to store/back up your music. Alternatively at the very least back up anything you can't replace such as iTunes downloads to CD or DVD: How to back up your media in iTunes
    Something else to be aware of when using an iPod in manual mode is that the "Do Not Disconnect" message will remain on the display until you physically eject the device. In that case use Safely Remove Hardware icon in the Windows system tray on your desktop or check this link: Safely Disconnect IPod
    I don't have any TV shows so I can't speak from experience here but looking at the TV tab it appears you can only sync shows, there's no manually manage option. Syncing would require that you keep the shows on your computer otherwise they would be removed from the iPod the next time you syncronised with iTunes.

  • Doubt in partition and subpartition

    hi gems...good afternoon...
    I have a doubt redgarding partitioning and subpartitioning...This may be a silly question, but i am really not getting this...please help me..
    I have a table which has Range-Hash composite partitioning.
    The Range partitioning is on the default tablespace TS_PROD (because I didnt mention any tablespace name in the Range partitions).
    The Hash subpartitioning are on the corresponding partition tablespaces (TS_PART1,TS_PART2,TS_PART3....TS_PART6).
    I have created total 8 Range partitions and the number of Hash subpartitions are 6 for each of them.
    Now when I query the DBA_TAB_PARTITIONS, then I got the desired output i.e. all the Range partitions are in the default tablespace.
    When I query the DBA_TAB_SUBPARTITIONS, then also I got the desired output i.e. all the Hash subpartitions are in the separate partition tablespaces.
    But when I have inserted data in that table, then I found that both the default tablespace and partition tablespaces are getting filled up.
    Moreover, the sum of the increase in sizes of the partition tablespaces is equal to the increase in default tablespace.
    I am not getting the concept of this. Where are the datas are getting stored??? In the default tablespace or in the partition tablespaces??
    Thanks a lot in advance..

    thanks a lot RP for your reply...
    and sorry for the late and miscommunication...
    Actually i am not so experienced in the DBA line and in my company suddenly my senior DBA left and i am the only one here...I got tensed... :( :(
    I have started reading documentation of Oracle, have started the Administrator's Guide first...
    Anyways...now i got the concept of the partitioning and subpartitioning i was doing...
    The mistake which I was doing is: I was not mentioning the primary key index tablespace and that segment is going into the default tablespace and thats why the size was increasing for both default tablespace and partitioned tablespaces. Because of that fact I was getting confused again and again.
    As soon as I mentioned the primary key index tablespace, the size of the default tablespace stopped increasing...
    Now the script from which I am getting the size of the tablespaces: (join of dba_datafiles and dba_free_space)
    select /* + RULE */ t.tablespace, t.totalspace as " Totalspace(MB)",
    round((t.totalspace-fs.freespace),2) as "Used Space(MB)",
    fs.freespace as "Freespace(MB)",
    round(((t.totalspace-fs.freespace)/t.totalspace)*100,2) as "% Used",
    round((fs.freespace/t.totalspace)*100,2) as "% Free"
    from
    (select round(sum(d.bytes)/(1024*1024)) as totalspace, d.tablespace_name tablespace
    from dba_data_files d
    group by d.tablespace_name) t,
    (select round(sum(f.bytes)/(1024*1024)) as freespace, f.tablespace_name tablespace
    from dba_free_space f
    group by f.tablespace_name) fs
    where t.tablespace=fs.tablespace
    order by t.tablespace;
    Thanks a lot RP for your help... :)

  • PS CS5 Extended on Windows -  When trying to use the clone stamp and/or healing brush as soon as I move the cursor over the image I get an exact copy of the existing layer that moves around the window with the movement of the clone stamp/healing brush.  W

    PS CS5 Extended on Windows
    When trying to use the clone stamp and/or healing brush as soon as I move the cursor from the toolbar over to the image I get an exact copy of the existing layer that moves around the window with the movement of the clone stamp/healing brush.  This just started tonight.  What's causing this weird behaviour?

    What are the settings in Window > Clone Source?

  • I have previously viewed movies and TV Shows on my IPHONE that I want to delete and free up space so that I can buy new movies/TV show to watch.  How do I get them off my IPHONE and my ITUNES account?

    I have previously viewed movies and TV Shows on my IPHONE that I want to delete and free up space so that I can buy new movies/TV show to watch.  How do I get them off my IPHONE and my ITUNES account?

    Hey RR6705,
    If you would like to delete previously purchased content off of your iPhone, you may find the steps outlined in the following article helpful:
    How to delete content you've downloaded from the iTunes Store, App Store, iBooks Store, or Mac App Store - Apple Support
    Cheers,
    - Brenden

  • I want to buy the movie Crazy Stupid Love but it is not available in the US, only in the UK.  I live in the US but is it possible to switch the itunes store so that I can buy that movie?

    I want to buy the movie Crazy Stupid Love but it is not available in the US, only in the UK.  I live in the US but is it possible to switch the itunes store so that I can buy that movie?

    It used to be in the US iTunes Store as that's where I purchased it.  Often the studios will temporarily pull a movie from the store during times the movie is scheduled to be shown on TV or cable TV as the TV network has been granted exclusive access during the period. It will return to the store later.

  • Windows 7 Gadgets slow to respond, 50% CPU utilisation with gadgets that "move"

    I have a fresh installation of Windows 7 RC and everything was fine. I have no idea what may have caused this, but on day 2 of using Windows 7 RC, any desktop gadgets that move (like the CPU meter or the clock with its second hand enabled) cause the sidebar.exe process to go to 50% CPU utilisation (which is 100% of one core on my dual core CPU).
    These gadgets then just become unresponsive and I have to close them. I can only keep the Weather gadget on because it doesn't have any animations. I have all Windows updates and the latest NVIDIA driver from Windows Update and even their own website doesn't help. There is something wrong with my gadgets. I have never installed any extra gadgets.
    What could it be?

    Same issue, but after Vista x64 Home Prem upgrade to Win7 Home Prem x64.  ATI Radeon HD 4850 graphics card, Quad Core & can't even change the settings of the Clock if I set the seconds hand.  The clock takes up a continuous full core (25% of overall CPU) while the seconds hand is running; if the seconds hand is off then CPU utilization is 0% between minute updates.  Other gadgets are similar, but many such as Calendar, Weather, and some non-MS gadgets work perfectly fine.  Must be some kind of javascript issue.  I have Avira Antivir before & after upgrade to Win7, so AVG isn't the issue for me - I even tried with Antivir and Comodo Firewall turned off. UAC on. 
    This machine is FAST & it can't handle a little gadget.  (7.2/7.3 Windows Experience subscores on all but hard disk, which is 5.9)  Didn't have this issue in Vista x64 Home Prem.
    edit:
    Checked the Win7 Resource Monitor CPU tab:
    sidebar.exe - While not under heavy CPU load, "Analyze Wait Chain..." from context menu continually shows "One or more threads of sidebar.exe are waiting to finish network I/O", and indicates thread 4140 which is WinInet.dll (Internet Extensions for Win32 application extension.)  Under heavy CPU load, several other threads starting from sidebar.exe were indicated from the same message from "Analyze Wait Chain..." as well.
    All other non-sidebar processes indicate "running normally" from "Analyze Wait Chain..."
    Another clue:  If I login using the "Administrator" account, there is *** no performance problem ***!  The sidebar.exe shows as "running normally" from "Analyze Wait Chain..." 
    So I also tried:
    - w/UAC turned off on the normal user (administrator rights) account (no fix)
    - tried creating a *new* normal user (administrator rights) account; still sloooowwww (also try this one w/o UAC, still bad)
    -Problem Status:  normal User Accounts have the sidebar performance problem, Administrator account runs fine.
    Edit: 12/31/09
    SOLVED!!!!
    After digging into the sidebar.exe output from Sysinternals Process Monitor, I noticed a peculiar difference between the output for the properly functioning Administrator account & my User accounts.  The admin acct showed the monitor profile for a good number of operations, while the User accts showed the wsRGB.cdmp value for the same operations, which was peculiar because I had my User accounts configured to use the system defaults, the same way I had the admin acct configured.
    Going into the Windows Color Management, Advanced tab, I found that if I chose either of the "virtual device model profile" choices for the "Device Profile" setting, the performance hit was instant.  If I used any of the "normal" icm profiles, performance was good.  So I changed my system default Device Profile from "sRGB virtual device model profile" to the std sRGB.icm profile & everything is working great!
    Note: In addition to the Gadgets, this also impacted the Windows Media Center Internet TV listings performance, which was also back to good performance after this WCM setting change.  I'd expect there are numerous other apps that could be affected by the "virtual device model profile" handling.  Googling "virtual device model profile" seems to bear that out, as I see others who ran into app problems when using that in the WCM applet.

  • I'm retiring my old computer (windows xp) to a new computer (windows 7). How can i easily move my itunes music from the old computer to the new computer? i have my playlists organized in my old computer, i would like it to stay that way in my new computer

    i'm retiring my old computer (with windows xp) and bought a new computer (with windows 7). How can i easily move my itunes music from the old computer to the new computer? i have my playlists organized in my old computer, i would like it to stay that way in my new computer. I also have my ipods, iphone sync'd in the old computer so i want to make sure that things won't get messed up (my apps, playlists, etc) when i move over everything to the new computer and sync all my devices with the new computer.
    Thanks in advance for the tips.

    Make sure the XP box is upgraded to the latest version of itunes. Also make sure it's using the itunes media folder layout as explained here, because that's what the W7 is going to be using.
    http://support.apple.com/kb/HT3847
    Install itunes on the new W7 PC.
    Get these folders from the XP machine
    C:\Documents and Settings\username\My Documents\My Music\iTunes
    C:\Documents and Settings\(username)\Application Data\Apple Computer\MobileSync\Backup\
    And put them here on the W7 machine
    C:\users\username\My Music\iTunes
    C:\Users\(username)\AppData\Roaming\Apple Computer\MobileSync\Backup\

  • I have imovie on the ipad 2. i sent the movie i made on the ipad to itunes. I cant find that movie in itunes were is it?

    i have imovie on the ipad 2. i sent the movie i made on the ipad to itunes. I cant find that movie in itunes were is it?

    I'm not sure about the iPad locations, but normally you should find all your iTunes movies here (unless iTunes is on an external drive):
    User/Music/iTunes/iTunes Music/Movies
    John

  • I have an hd movie on final cut pro x; i want to create an sd disk of that movie. compressor created 2 files: dolby.... and mpeg2. How do I get these files burned to disc to create my sd movie?

    I have an hd movie on final cut pro x; i want to create an sd disk of that movie. compressor created 2 files: dolby.... and mpeg2. How do I get these files burned to disc to create my sd movie?

    These are elementary streams and they would be used by DVD authoring apps that use them for reasons like foreign language capability. Examples would be DVD Studio Pro, Adobe Encore, Toast.
    The most straightforward way to burn your DVD is either to use the Share feature in FCP or the Batch Template feature in Compressor.
    If you can find a boxed copy of iLife (try Amazon), it should have iDVD as part of the suite of apps. iDVD offers far more complete authoring capability than FCP or C4. iDVD  doesn't work with elementary streams; you'd just drag in your HD movie and you'd be good to go.
    Good lluck.
    Russ

  • Setting parental controls in an iTunes movie?

    I know you can set parental controls in the iTunes program generally, but is there a way to tweak an indivusal movie parental controls? Or add parental controls to a single movie or TV show, or music song? I could not find this option when displaying a movies "info". I'd think iTunes would add a parental control settings the user can modify..?

    Try going here and emailing the store about the issue
    http://www.apple.com/support/itunes/musicstore/download/

  • I have an iPhone under my parents account. Now that I have my own, I would like to change the Apple id on the phone to my own (new) account. If I do so, will I lose all of my apps, music, contacts, etc?

    I have an iPhone under my parents account. Now that I have my own, I would like to change the Apple id on the phone to my own (new) account. If I do so, will I lose all of my apps, music, contacts, etc?

    SMinsk wrote:
    Thank you, can I transfer them to my account
    No.

Maybe you are looking for

  • Delivery date should be equal to basline date

    Hi, I have created PO on 2nd and delivery taken place on 5th , IR is taken place on 7th.  Right now i want my baseline date in inoice is should be 5th as delivery date.  please help me in this.

  • Typing information into a pdf document

    adobe reader version 8.1.2 I had an employment application sent to me as a pdf attachment to an email. I can open it with the above adobe reader installed on my laptop, but I want to fill out the application by typing in the blanks provided in it. Ho

  • Blanket PO/invoice

    Hi all , I hv created a blanket PO, Account assignment  K and item category as B. maintained overall limit and expected value in the PO say, 1000 and 900 respectively. Now, when I do miro for the PO,which value should appear? Now it appears 0. why 0

  • I want to switch platforms with Cs6 Master Suite from Mac To PC. Who can help and explain how to get by the rope a dope perpetual circle of support

    I am trying to switch platforms from Mac to PC. I cannot get into support where this is done. Phone calls are a joke, a promise to call back in 12 or 45 minutes never happens. What you need support for seems to not exist. Can someone tell me how to g

  • 3750x stack issue adding additional unit

    I have a 3750X stack with 2 48 port members that have been up and running for over a year without issue. I'm trying to add a new 24 port 3750X. I've made sure the priority is correct, and I've added a provision for the new member in the stack. they a