Subpartition existing range partition in Oracle

I have table xyz with following structure
xyz ( vld_dte date,
prd_typ varchar2(100),
sales number
table XYZ is partitioned by range on field vld_dte and partitions are monthly partitions like JAN-2009 , FEB-2009....DEC-2009 and so on.table is currently loaded with data.
How can I modify existing range partition into composite range-list partition so that every partiton is subpartitioned on prd_typ , basically three sub-partitions for every partition 1- Grocery , 2-Home decoration,3-OTHERS

ORA-14759: SET INTERVAL is not legal on this table.
Cause: ALTER TABLE SET INTERVAL is only legal on a range partitioned table with a single partitioning column. Additionally this table cannot have a maxvalue partition.
Action: Use SET INTERVAL only on a valid table
mark answered post as helpful / correct*

Similar Messages

  • Creating interval parition to existing range partition

    I have a table which has range partition on a number column.
    CREATE TABLE TEST(
    id INT NOT NULL,
    start INT NOT NULL
    PARTITION BY RANGE (start)
         PARTITION old_Data VALUES LESS THAN (1000000) TABLESPACE old,
         PARTITION new_Data VALUES LESS THAN (MAXVALUE) TABLESPACE new
    I would like to create monthly interval partition in old_data partition. Is this possible? Don't see any syntax for supporting this scenario.

    Welcome to the forum!
    Whenever you post provide your 4 digit Oracle version.
    >
    I have a table which has range partition on a number column.
    CREATE TABLE TEST(
    id INT NOT NULL,
    start INT NOT NULL
    PARTITION BY RANGE (start)
    PARTITION old_Data VALUES LESS THAN (1000000) TABLESPACE old,
    PARTITION new_Data VALUES LESS THAN (MAXVALUE) TABLESPACE new
    I would like to create monthly interval partition in old_data partition. Is this possible? Don't see any syntax for supporting this scenario.
    >
    No - it is not possible. There isn't any syntax for supporting that because integers do have have 'months' so how would Oracle partition an integer 'monthly'?
    If those integers are supposed to represent Unix 'epoch' date values then in 11g you can create a virtual column of DATE datatype and partition on that.
    But you will need to either recreate the table or, if you needed to do it online, use the DBMS_REDEFINITION package. Either approach results in a new table with the correct partitioning that includes the existing data.
    Here is a similar table to yours with a VIRTUAL column that is partitioned by day:
    drop table some_table_int
    create table some_table_int (
        column_1 nvarchar2(50),
        start_t number(38,0),
        column_n number,
        start_date DATE GENERATED ALWAYS AS (
        to_timestamp(to_char( to_date('01011970','ddmmyyyy') + 1/24/60/60 * start_t, 'DD-MON-YYYY HH24:MI:SS'),'DD-MON-YYYY HH24:MI:SS')
      ) VIRTUAL
    partition by range (start_date) interval (NUMTODSINTERVAL(7,'day'))
    (partition p_19700105 values less than (to_date('19700105', 'yyyymmdd'))
    /That VIRTUAL column is an ordinary DATE column and your ranges will be dates rather than numbers that have no meaning for anyone.
    The VIRTUAL column is only a data dictionary entry so it won't affect any actual data.

  • Existing Range partition to Interval Partition

    I have an Range and list partition tables on Oracle 11g with some records and have to move the
    range and List partition tables to interval partitions. I tried for the range partition
    table with following query,
    SQL> alter table F_PTP_PAYMENTS set interval (numtoyminterval(3,'MONTH'));
    alter table F_PTP_PAYMENTS set interval (numtoyminterval(3,'MONTH'))
    ERROR at line 1:
    ORA-14759: SET INTERVAL is not legal on this table.
    it doesnt worked out.
    Can you please help me to create the interval partitions.

    ORA-14759: SET INTERVAL is not legal on this table.
    Cause: ALTER TABLE SET INTERVAL is only legal on a range partitioned table with a single partitioning column. Additionally this table cannot have a maxvalue partition.
    Action: Use SET INTERVAL only on a valid table
    mark answered post as helpful / correct*

  • How to see the logic in an existing range partition table of a database.

    Hi I need to see the logic used in a Range partitioned table in a database.
    I need this because i need to create a db similar to this.
    This is a live database.
    Version used :10.2.0.3.0
    How can i seee this
    Cheers,
    Kunwar

    How to get that.
    For example if i want to see the script for a table. I get this eror
    SQL> select dbms_metadata.get_ddl('TABLE','x) from dual;
    ERROR:
    ORA-31603: object "x" of type TABLE not found in schema "SYS"
    ORA-06512: at "SYS.DBMS_METADATA", line 1546
    ORA-06512: at "SYS.DBMS_METADATA", line 1583
    ORA-06512: at "SYS.DBMS_METADATA", line 1901
    ORA-06512: at "SYS.DBMS_METADATA", line 2792
    ORA-06512: at "SYS.DBMS_METADATA", line 4333
    ORA-06512: at line 1
    And i dont know the login details of that user..

  • Alter range partition table to Interval partitioning table.

    Hi DBA's,
    I have a very big range partitioned table.
    Recently we have upgraded our database to 11gR2 which has a feautre called interval partitioning.
    Now i want to modify that existing range partitioned table to Interval Partitioning.
    can we alter the range partitioned table to interval partitioning table?
    I googled for the syntax but i didn't find it, can any one help[ me out on this?
    Thanks.

    If you ignore the "alter session set NLS_CALENDAR=PERSIAN;" during create/alter, everything else seems to work.
    When you set the "alter session..." during inserts, the rows gets inserted into the correct partitions.
    Only thing is when you look at HIGH_VALUE, you need to convert from the default GREGORIAN to PERSIAN.

  • Oracle 11g  List - Range Partition - Help Needed

    Hi All,
    I want to create a composite partition (LIST-RANGE) but RANGE partition should using interval partition
    This is my query .
    CREATE TABLE "DMSDB"."DEVICE_UTILS"
    (     "ULID" VARCHAR2(100 CHAR),
         "IP_ADDRESS" VARCHAR2(24 CHAR),
         "PORT" VARCHAR2(8 CHAR),
         "SHUTDOWN" NUMBER(10,0),
         "LINE_TYPE" NUMBER(10,0) DEFAULT '0',
         "OCCUPIED" NUMBER(10,0),
         "UTILIZATION" NUMBER(10,0),
         "IDLE_TIME" VARCHAR2(32 CHAR),
         "ACTIVATION_TIME" VARCHAR2(32 CHAR),
         "PULLED_DATE" TIMESTAMP (6) DEFAULT SYSDATE,
         "ACCESS_TIME" TIMESTAMP (6) DEFAULT SYSDATE
    PARTITION BY LIST(ULID)
              PARTITION PART_DEVUTILS_ULID VALUES (DEFAULT)
         SUBPARTITION BY RANGE( PULLED_DATE)
         PARTITION PART_DEVUTILS_WEEK INTERVAL (NUMTOYMINTERVAL(1,'WEEK'))
    Somehow its not working. can you please suggest where i am making mistake?

    Interval partitioning is not supported at the subpartition level.
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_7002.htm#BABCDDIA
    Regards
    Girish Sharma

  • Modify HUGE HASH partition table to RANGE partition and HASH subpartition

    I have a table with 130,000,000 rows hash partitioned as below
    ----RANGE PARTITION--
    CREATE TABLE TEST_PART(
    C_NBR CHAR(12),
    YRMO_NBR NUMBER(6),
    LINE_ID CHAR(2))
    PARTITION BY RANGE (YRMO_NBR)(
    PARTITION TEST_PART_200009 VALUES LESS THAN(200009),
    PARTITION TEST_PART_200010 VALUES LESS THAN(200010),
    PARTITION TEST_PART_200011 VALUES LESS THAN(200011),
    PARTITION TEST_PART_MAX VALUES LESS THAN(MAXVALUE)
    CREATE INDEX TEST_PART_IX_001 ON TEST_PART(C_NBR, LINE_ID);
    Data: -
    INSERT INTO TEST_PART
    VALUES ('2000',200001,'CM');
    INSERT INTO TEST_PART
    VALUES ('2000',200009,'CM');
    INSERT INTO TEST_PART
    VALUES ('2000',200010,'CM');
    VALUES ('2006',NULL,'CM');
    COMMIT;
    Now, I need to keep this table from growing by deleting records that fall b/w a specific range of YRMO_NBR. I think it will be easy if I create a range partition on YRMO_NBR field and then create the current hash partition as a sub-partition.
    How do I change the current partition of the table from HASH partition to RANGE partition and a sub-partition (HASH) without losing the data and existing indexes?
    The table after restructuring should look like the one below
    COMPOSIT PARTITION-- RANGE PARTITION & HASH SUBPARTITION --
    CREATE TABLE TEST_PART(
    C_NBR CHAR(12),
    YRMO_NBR NUMBER(6),
    LINE_ID CHAR(2))
    PARTITION BY RANGE (YRMO_NBR)
    SUBPARTITION BY HASH (C_NBR) (
    PARTITION TEST_PART_200009 VALUES LESS THAN(200009) SUBPARTITIONS 2,
    PARTITION TEST_PART_200010 VALUES LESS THAN(200010) SUBPARTITIONS 2,
    PARTITION TEST_PART_200011 VALUES LESS THAN(200011) SUBPARTITIONS 2,
    PARTITION TEST_PART_MAX VALUES LESS THAN(MAXVALUE) SUBPARTITIONS 2
    CREATE INDEX TEST_PART_IX_001 ON TEST_PART(C_NBR,LINE_ID);
    Pls advice
    Thanks in advance

    Sorry for the confusion in the first part where I had given a RANGE PARTITION instead of HASH partition. Pls read as follows;
    I have a table with 130,000,000 rows hash partitioned as below
    ----HASH PARTITION--
    CREATE TABLE TEST_PART(
    C_NBR CHAR(12),
    YRMO_NBR NUMBER(6),
    LINE_ID CHAR(2))
    PARTITION BY HASH (C_NBR)
    PARTITIONS 2
    STORE IN (PCRD_MBR_MR_02, PCRD_MBR_MR_01);
    CREATE INDEX TEST_PART_IX_001 ON TEST_PART(C_NBR,LINE_ID);
    Data: -
    INSERT INTO TEST_PART
    VALUES ('2000',200001,'CM');
    INSERT INTO TEST_PART
    VALUES ('2000',200009,'CM');
    INSERT INTO TEST_PART
    VALUES ('2000',200010,'CM');
    VALUES ('2006',NULL,'CM');
    COMMIT;
    Now, I need to keep this table from growing by deleting records that fall b/w a specific range of YRMO_NBR. I think it will be easy if I create a range partition on YRMO_NBR field and then create the current hash partition as a sub-partition.
    How do I change the current partition of the table from hash partition to range partition and a sub-partition (hash) without losing the data and existing indexes?
    The table after restructuring should look like the one below
    COMPOSIT PARTITION-- RANGE PARTITION & HASH SUBPARTITION --
    CREATE TABLE TEST_PART(
    C_NBR CHAR(12),
    YRMO_NBR NUMBER(6),
    LINE_ID CHAR(2))
    PARTITION BY RANGE (YRMO_NBR)
    SUBPARTITION BY HASH (C_NBR) (
    PARTITION TEST_PART_200009 VALUES LESS THAN(200009) SUBPARTITIONS 2,
    PARTITION TEST_PART_200010 VALUES LESS THAN(200010) SUBPARTITIONS 2,
    PARTITION TEST_PART_200011 VALUES LESS THAN(200011) SUBPARTITIONS 2,
    PARTITION TEST_PART_MAX VALUES LESS THAN(MAXVALUE) SUBPARTITIONS 2
    CREATE INDEX TEST_PART_IX_001 ON TEST_PART(C_NBR,LINE_ID);
    Pls advice
    Thanks in advance

  • Range Partitioning Existing table

    Hi,
    I have a table with numeric field. I want to range partition the existing table. I used the following query
    alter table dept add partition by range(deptno) (
    partition p1 values less than (20),
    partition p1 values less than (40))
    It gives me ORA-00902: invalid datatype.
    What am I doing wrong? Is it possible to partition an existing table?
    Regards,
    Subbu S.

    Hi,
    You cannot partition an existing table with an ALTER TABLE command. There are couple of techinques with which you can partition an existing table, like:
    1) Rename existing table, create a new partitoned table and move data.
    2) Using DBMS_REDEFINITION package.
    Have a look at the following links for details:
    http://www.oracle-base.com/articles/misc/PartitioningAnExistingTable.php
    http://www.dba-oracle.com/oracle_news/2004_3_9_rittman.htm
    Regards
    Asif Momen
    http://momendba.blogspot.com

  • List-range partition and subpartition

    Does anyone know that Oracle 10g support partition by list and subpartition by range? Thanks.

    check the documentation link [http://download.oracle.com/docs/cd/B19306_01/appdev.102/b31695/dialogs.htm#sthref441]
    hope you will find your answer on link page.

  • List-range partition

    Hi Oracle Gurus,
    I have a table with list partition, as the partitions are growing large I need to create subpartitions.
    Is it possible to create a range subpartition under list partition. If yes I need that subpartition to be built on time not on date.
    Is it possible.

    While range-list partitioning exists in 10g, list-range partitioning to the best of my knowledge does not exist. There are some new options in 11g but I can't remember what they are off the top of my head. You can check the on-line documentation to see what your partitioning options are
    Your partitioning options will depend on what version of Oracle you are using. Also remember that you need the licence to use the partitioning feature

  • Create range partition

    hi ,
    Oracle 10.2.0.1.0
    I'm getting error while creating a range partition to already existing table (method employed : partition swap method ) .
    PF screen shot of error
    SQL> ed
    Wrote file afiedt.buf
      1  create table employee_details_temp partition by range (eid) (
      2  partition eid_1r values less than (1000)
      3  partition eid_2r values less than (20000)
      4  partition eid_3r values less than (40000)
      5  partition eid_3r values less than (maxvalue)
      6* )
    SQL> /
    partition eid_2r values less than (20000)
    ERROR at line 3:
    ORA-14020: this physical attribute may not be specified for a table partitionalso ,
    SQL> ed
    Wrote file afiedt.buf
      1  create table employee_details_temp partition by range (eid) (
      2  partition eid_1r values less than (1000)
      3  partition eid_2r values less than (20000)
      4  partition eid_3r values less than (40000)
      5  partition eid_3r values less than (maxvalue)
      6  ) as select * from employee_details where 1=1;
      7* /
    SQL> /
    partition eid_2r values less than (20000)
    ERROR at line 3:
    ORA-14020: this physical attribute may not be specified for a table partition please help .

    answered .

  • Partitioning in Oracle -- Need some clarification

    Hello all,
    While I was reading the document (PDF) on Oracle9i Data Warehousing Guide (Part No: Part No. A90237-01), I found one statement which made me confused.
    The statement is regarding Hash Partitioning:
    "Hash partitioning is a good and easy-to-use alternative
    to range partitioning when data is not historical and there is no obvious column or column list where logical range partition pruning can be advantageous."
    Can anyone suggest me, does this means that Hash Partitioning is not recommended for Data Warehouse type (DSS) applications? If yes, then I will be glad to know Why they are not recomended?
    I would also like to know the practical differences between Range Partition and Hash Partition.

    There are three types of partitioned tables in Oracle 8i: Range, Hash and
    Composite. Range partitioning requires that rows identified by a "partition key"
    fall into a predefined range of values. The value of a columns' "partition key"
    determines the partition to which a row belongs.
    A hash-partitioned table's rows have their physical location determined by
    applying a hash value to the partition key column, providing for deterministic,
    but well distributed physical data spread.
    A composite-partitioned table has a two-part partition key, the leftmost being
    a range-partition key and the rightmost being a hash partition key.
    Composite-partitioned tables make use of subpartitions for their hashed
    components. A composite-partitioned table consists of a set of
    range-partitions, which are each composed of hashed-partitions.
    Oracle9i adds a new partitioning model called list partitioning to the
    set of partition methods already being supported in the Oracle RDBMS.
    The new List method allows explicit control over how rows map to partitions,
    by allowing to specify a list of discrete values for the partitioning column
    in the description of each partition. One should use list partitioning
    when you want to specifically map rows to partitions based on discrete values.
    Hash partitioning is best used when the data does not easily lend itself to range
    partitioning, but you would like to partition for performance reasons. Hash
    partitioning evenly distributes data across a specified number of partitions.
    Rows are mapped into partitions based on a hash value of the partitioning key.
    When creating hash partitions, you must specify the method as "HASH", the
    partitioning column(s) in the HASH, and the number of partitions or individual
    partition descriptions.
    http://asktom.oracle.com/pls/ask/f?p=4950:8:14565727566304844437::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:14188448949723
    Jaffar

  • Best approach to do Range partitioning on Huge tables.

    Hi All,
    I am working on 11gR2 oracle 3node RAC database. below are the db details.
    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 Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    in my environment we have 10 big transaction (10 billion rows) tables and it is growing bigger and bigger. Now the management is planning to do a range partition based on created_dt partition key column.
    We tested this partitioning startegy with few million record in other environment with below steps.
    1. CREATE TABLE TRANSACTION_N
    PARTITION BY RANGE ("CREATED_DT")
    ( PARTITION DATA1 VALUES LESS THAN (TO_DATE(' 2012-08-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS') ) TABLESPACE &&TXN_TAB_PART1,
    PARTITIONDATA2 VALUES LESS THAN (TO_DATE(' 2012-09-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS') ) TABLESPACE &&TXN_TAB_PART2,
    PARTITION DATA3 VALUES LESS THAN (TO_DATE(' 2012-10-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS') ) TABLESPACE &&TXN_TAB_PART3
    as (select * from TRANSACTION where 1=2);
    2. exchange partion for data move to new partition table from old one.
    ALTER TABLE TRANSACTION_N
    EXCHANGE PARTITION DATA1
    WITH TABLE TRANSACTION
    WITHOUT VALIDATION;
    3. create required indexes (took almost 3.5 hrs with parallel 16).
    4. Rename the table names and drop the old tables.
    this took around 8 hrs for one table which has 70 millions of records, then for billions of records it will take more than 8 hrs. But the problem is we get only 2 to 3 hrs of down time in production to implement these change for all tables.
    Can you please suggest the best approach i can do, to copy that much big data from existing table to the newly created partitioned table and create required indexes.
    Thanks,
    Hari

    >
    in my environment we have 10 big transaction (10 billion rows) tables and it is growing bigger and bigger. Now the management is planning to do a range partition based on created_dt partition key column.
    We tested this partitioning startegy with few million record in other environment with below steps.
    1. CREATE TABLE TRANSACTION_N
    PARTITION BY RANGE ("CREATED_DT")
    ( PARTITION DATA1 VALUES LESS THAN (TO_DATE(' 2012-08-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS') ) TABLESPACE &&TXN_TAB_PART1,
    PARTITIONDATA2 VALUES LESS THAN (TO_DATE(' 2012-09-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS') ) TABLESPACE &&TXN_TAB_PART2,
    PARTITION DATA3 VALUES LESS THAN (TO_DATE(' 2012-10-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS') ) TABLESPACE &&TXN_TAB_PART3
    as (select * from TRANSACTION where 1=2);
    2. exchange partion for data move to new partition table from old one.
    ALTER TABLE TRANSACTION_N
    EXCHANGE PARTITION DATA1
    WITH TABLE TRANSACTION
    WITHOUT VALIDATION;
    3. create required indexes (took almost 3.5 hrs with parallel 16).
    4. Rename the table names and drop the old tables.
    this took around 8 hrs for one table which has 70 millions of records, then for billions of records it will take more than 8 hrs. But the problem is we get only 2 to 3 hrs of down time in production to implement these change for all tables.
    Can you please suggest the best approach i can do, to copy that much big data from existing table to the newly created partitioned table and create required indexes.
    >
    Sorry to tell you but that test and partitioning strategy is essentially useless and won't work for you entire table anyway. One reasone is that if you use the WITHOUT VALIDATION clause you must ensure that the data being exchanged actually belongs to the partition you are putting it in. If it doesn't you won't be able to reenable or rebuild any primary key or unique constraints that exist on the table.
    See Exchanging Partitions in the VLDB and Partitioning doc
    http://docs.oracle.com/cd/E18283_01/server.112/e16541/part_admin002.htm#i1107555
    >
    When you specify WITHOUT VALIDATION for the exchange partition operation, this is normally a fast operation because it involves only data dictionary updates. However, if the table or partitioned table involved in the exchange operation has a primary key or unique constraint enabled, then the exchange operation is performed as if WITH VALIDATION were specified to maintain the integrity of the constraints.
    If you specify WITHOUT VALIDATION, then you must ensure that the data to be exchanged belongs in the partition you exchange.
    >
    Comments below are limited to working with ONE table only.
    ISSUE #1 - ALL data will have to be moved regardless of the approach used. This should be obvious since your current data is all in one segment but each partition of a partitioned table requires its own segment. So the nut of partitioning is splitting the existing data into multiple segments almost as if you were splitting it up and inserting it into multiple tables, one table for each partition.
    ISSUE#2 - You likely cannot move that much data in the 2 to 3 hours window that you have available for down time even if all you had to do was copy the existing datafiles.
    ISSUE#3 - Even if you can avoid issue #2 you likely cannot rebuild ALL of the required indexes in whatever remains of the outage windows after moving the data itself.
    ISSUE#4 - Unless you have conducted full volume performance testing in another environment prior to doing this in production you are taking on a tremendous amount of risk.
    ISSUE#5 - Unless you have fully documented the current, actual execution plans for your most critical queries in your existing system you will have great difficulty overcoming issue #4 since you won't have the requisite plan baseline to know if the new partitioning and indexing strategies are giving you the equivalent, or better, performance.
    ISSUE#6 - Things can, and will, go wrong and cause delays no matter which approach you take.
    So assuming you plan to take care of issues #4 and #5 you will probably have three viable alternatives:
    1. use DBMS_REDEFINITION to do the partitioning on-line. See the Oracle docs and this example from oracle-base for more info.
    Redefining Tables Online - http://docs.oracle.com/cd/B28359_01/server.111/b28310/tables007.htm
    Partitioning an Existing Table using DBMS_REDEFINITION
    http://www.oracle-base.com/articles/misc/partitioning-an-existing-table.php
    2. do the partitioning offline and hope that you don't exceed your outage window. Recover by continuing to use the existing table.
    3. do the partitioning offline but remove the oldest data to minimize the amount of data that has to be worked with.
    You should review all of the tables to see if you can remove older data from the current system. If you can you could use online redefinition that ignores older data. Then afterwards you can extract this old data from the old table for archiving.
    If the amount of old data is substantial you can extract the new data to a new partitioned table in parallel and not deal with the old data at all.

  • Subpartition by range?

    Hello,
    I created the following partitioned table, using Oracle 11g R2 interval partitioning:
    CREATE TABLE ACCOUNTS_IMPORT (
    SIGNING_ACCOUNT VARCHAR2(16 CHAR),
    REPORT_MM DATE,
    IMPORT_ID INTEGER -- this is a unique number incremented by 1 (1, 2, 3,....etc)
    PARTITION BY RANGE (REPORT_MM)
    INTERVAL( NUMTOYMINTERVAL(1,'MONTH'))
    (PARTITION p_first VALUES LESS THAN ('01-JAN-2006'));
    Works correctly; every time I insert data for a new month, Oracle automatically creates a new partition.
    For example: for the month of July I add 3 batches of records identified by IMPORT_ID 11, 12 and 13 and they all go into the same partition. This is exactly what I want.
    But I also want that any record batch identified by the unique IMPORT_ID to go into a new subpartition. How can I achieve that?
    Because IMPORT_ID keeps incrementing I cannot create from the beginning the subpartitions using something like:
    PARTITION BY RANGE (REPORT_MM) INTERVAL( NUMTOYMINTERVAL(1,'MONTH'))
    SUBPARTITION BY RANGE(IMPORT_ID)
    SUBPARTITION TEMPLATE(
    SUBPARTITION sp_11 VALUES(11),
    SUBPARTITION sp_12 VALUES(12) ,
    SUBPARTITION sp_13 VALUES(13))
    Would be possible to add subpartitions on the fly or maybe get Oracle to create them automatically?
    Thanks,
    M.R.

    user7047382 wrote:
    Hello,
    I created the following partitioned table, using Oracle 11g R2 interval partitioning:
    CREATE TABLE ACCOUNTS_IMPORT (
    SIGNING_ACCOUNT VARCHAR2(16 CHAR),
    REPORT_MM DATE,
    IMPORT_ID INTEGER -- this is a unique number incremented by 1 (1, 2, 3,....etc)
    PARTITION BY RANGE (REPORT_MM)
    INTERVAL( NUMTOYMINTERVAL(1,'MONTH'))
    (PARTITION p_first VALUES LESS THAN ('01-JAN-2006'));
    Works correctly; every time I insert data for a new month, Oracle automatically creates a new partition.
    For example: for the month of July I add 3 batches of records identified by IMPORT_ID 11, 12 and 13 and they all go into the same partition. This is exactly what I want.
    But I also want that any record batch identified by the unique IMPORT_ID to go into a new subpartition. How can I achieve that?
    Because IMPORT_ID keeps incrementing I cannot create from the beginning the subpartitions using something like:
    PARTITION BY RANGE (REPORT_MM) INTERVAL( NUMTOYMINTERVAL(1,'MONTH'))
    SUBPARTITION BY RANGE(IMPORT_ID)
    SUBPARTITION TEMPLATE(
    SUBPARTITION sp_11 VALUES(11),
    SUBPARTITION sp_12 VALUES(12) ,
    SUBPARTITION sp_13 VALUES(13))
    Would be possible to add subpartitions on the fly or maybe get Oracle to create them automatically?NO!

  • Create list-range partition table

    Database version: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    I am trying to create a partition table with LIST-Range, and I am getting this following error, is oracle 10.2.0.4 database supports to create list-range partition(composite)
    SQL> CREATE TABLE tbp_list_range
    REPORT_DATE DATE,
    member_id_01 varchar2(2),
    DATE_SERVICE date,
    member_id varchar2(15)
    PARTITION BY LIST(member_id_01)
    SUBPARTITION BY RANGE (DATE_SERVICE)
    PARTITION SPTYR04M01_C VALUES('AA','aa')
    NOLOGGING
    COMPRESS (
    SUBPARTITION PTYR12M011 VALUES LESS THAN (TO_DATE(' 2012-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    SUBPARTITION PTYR12M021 VALUES LESS THAN (TO_DATE(' 2012-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    SUBPARTITION recent1 VALUES LESS THAN (MAXVALUE)
    PARTITION SPTYR04M01_Yo VALUES('BJ','bj')
    NOLOGGING
    COMPRESS (
    SUBPARTITION PTYR12M01 VALUES LESS THAN (TO_DATE(' 2012-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    SUBPARTITION PTYR12M02 VALUES LESS THAN (TO_DATE(' 2012-02-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
    SUBPARTITION recent2 VALUES LESS THAN (MAXVALUE)
    SUBPARTITION BY RANGE (DATE_SERVICE)
    ERROR at line 9:
    ORA-00922: missing or invalid option
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE 10.2.0.4.0 Production
    TNS for Linux: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    Any help would be greatly appreciated.
    Thanks,

    any possible work around for this scenario on 10.2.0.4
    --thanks                                                                                                                                                                                               

Maybe you are looking for

  • What is invocation  target exception?

    I get the following error when trying to launch my app: Any help appreciated! George An error occurred while launching/running the application. Title: MyApp Vendor: Blah Blah Inc Category: Unexpected Error Unexpected exception: java.lang.reflect.Invo

  • How does a JSP page remember a user and prints in every page name of user?

    Hello, i'm working with JSPs and mysql. I have a Login page where sm inserts data in the two fields: name, username. i check if that user exists in the database. if the user exists i would like in every jsp page to mention/appear his name. As happens

  • Round to first non-zero digit

    I am looking for a way to round floating point values the first n'th non-zero digit to the right of the decimal point. for example if n = 1 then round 0.01111 to 0.01 round 0.001111 to 0.001 round 0.0001111 to 0.0001 If I use the round argument then

  • My original URLs won't ping

    When I originally put my podcasts on iTunes, Apple gave me the following URLs http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=210064273 http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=210065679 Recently while trying

  • Why Can't I Transfer Folders with Files

    I was hoping to use my new Ipad as a reader for a research library of over 5,000+ pdf documents that I have accumulated for my research into the Camp Lejeune drinking water contamination. Sadly, I found I could transfer files but not folders in which