Using INTERVAL partition with Informatica

Curious to know if anyone has attempted using Oracle's INTERVAL partitioning method in conjunction with Informatica. My attempts have all resulted in an ORA-14400 error. However, slightly modifying the source qualifier SQL and executing in SQLPlus dynamically creates the partitions as expected. When standard RANGE partitions are created (without the INTERVAL option), Informatica will load the target table as expected.

Hence you just want to add a number of hours to a date?
select LOCATION_DATE + LOCATION_TIMEZONE/24 NEW_TIME from tablexMax
http://oracleitalia.wordpress.com
Edited by: Massimo Ruocchio on Feb 19, 2010 12:21 AM

Similar Messages

  • How to use Oracle partitioning with JPA @OneToOne reference?

    Hi!
    A little bit late in the project we have realized that we need to use Oracle partitioning both for performance and admin of the data. (Partitioning by range (month) and after a year we will move the oldest month of data to an archive db)
    We have an object model with an main/root entity "Trans" with @OneToMany and @OneToOne relationships.
    How do we use Oracle partitioning on the @OneToOne relationships?
    (We'd rather not change the model as we already have millions of rows in the db.)
    On the main entity "Trans" we use: partition by range (month) on a date column.
    And on all @OneToMany we use: partition by reference (as they have a primary-foreign key relationship).
    But for the @OneToOne key for the referenced object, the key is placed in the main/source object as the example below:
    @Entity
    public class Employee {
    @Id
    @Column(name="EMP_ID")
    private long id;
    @OneToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="ADDRESS_ID")
    private Address address;
    EMPLOYEE (table)
    EMP_ID FIRSTNAME LASTNAME SALARY ADDRESS_ID
    1 Bob Way 50000 6
    2 Sarah Smith 60000 7
    ADDRESS (table)
    ADDRESS_ID STREET CITY PROVINCE COUNTRY P_CODE
    6 17 Bank St Ottawa ON Canada K2H7Z5
    7 22 Main St Toronto ON Canada     L5H2D5
    From the Oracle documentation: "Reference partitioning allows the partitioning of two tables related to one another by referential constraints. The partitioning key is resolved through an existing parent-child relationship, enforced by enabled and active primary key and foreign key constraints."
    How can we use "partition by reference" on @OneToOne relationsships or are there other solutions?
    Thanks for any advice.
    /Mats

    Crospost! How to use Oracle partitioning with JPA @OneToOne reference?

  • Range interval partitioning with null value

    Hello,
    I have question, how can I create table with partition and after that I will insert null value in the partition key like this kind of
    range interval partitioning with null value.
    I have Oracle 11g.
    Thanks
    Mohammed

    user13777053 wrote:
    Thank you, but my question is about range interval not for range?http://docs.oracle.com/cd/E11882_01/server.112/e25523/partition.htm#VLDBG00220
    A MAXVALUE literal can be defined for the highest partition. MAXVALUE represents a virtual infinite value that sorts higher than any other possible value for the partitioning key, *including the NULL value.*
    So since you're trying to partition by interval (which doesn't support a MAXVALUE clause) you're out of luck.
    There's probably fancy hacks and what not you could try to implement, but i'm not about to recommend any of those here :)
    Cheers,

  • Range partiotion using interval partitioning

    Hi all,
    I am trying to create a partitioned table so that a number (which date converted to number ) partition is created on inserting a new row for release_date column.
    But please note that release_date column is having number data type (as per design) and people want to create an interval based partition on this.
    Any work around for this?
    They want data type NOT to be altered.
    create table product(
    prod_id number,
    prod_code varchar2(3),
    release_date number)
    partition by range(release_date)
    interval(NUMTOYMINTERVAL (1,'MONTH'))
    (partition p0 values less than (20120101))
    Thanks in advance

    >
    I am trying to create a partitioned table so that a number (which date converted to number ) partition is created on inserting a new row for release_date column.
    But please note that release_date column is having number data type (as per design) and people want to create an interval based partition on this.
    >
    You can't use interval partitioning on the NUMBER column but you can add a VIRTUAL column based on it that uses DATE datatype.
    create table product(
    prod_id number,
    prod_code varchar2(3),
    release_date number,
    rel_date DATE as (to_date(to_char(release_date), 'yyyymmdd')) VIRTUAL
    partition by range(rel_date)
    interval(NUMTOYMINTERVAL (1,'MONTH'))
       partition p0 values less than (to_date('20120101', 'yyyymmdd'))
    )The virtual column is a metadata only column (i.e. no data is stored for it).
    NOTE: you will need to modify your queries to use the 'REL_DATE' column in order to get partition pruning:
    insert into product (prod_id, prod_code, release_date) values (1,'abc', 20110502)
    insert into product (prod_id, prod_code, release_date) values (1,'abc', 20120502)
    -- this query does NOT prune
    select * from product where release_date < 20120101
    |   0 | SELECT STATEMENT    |         |     1 |    38 |     4   (0)| 00:00:01 |       |       |
    |   1 |  PARTITION RANGE ALL|         |     1 |    38 |     4   (0)| 00:00:01 |    1 |1048575|
    |*  2 |   TABLE ACCESS FULL | PRODUCT |     1 |    38 |     4   (0)| 00:00:01 |    1 |1048575|
    -- this query DOES prune
    select * from product where rel_date < to_date('20120101', 'yyyymmdd')
    |   0 | SELECT STATEMENT       |         |     1 |    38 |     3   (0)| 00:00:01 |       |       |
    |   1 |  PARTITION RANGE SINGLE|         |     1 |    38 |     3   (0)| 00:00:01 |     1 |     1 |
    |*  2 |   TABLE ACCESS FULL    | PRODUCT |     1 |    38 |     3   (0)| 00:00:01 |     1 |     1 |

  • Possible to use interval partitions to drop old partitions?

    Interval partitions can add new partitions and I can do a range by date. This is helpful. However, lets say I have alot of tables in my database and I need to keep data for different lengths of time in different tables. Can I set something in the intervals to drop older partitions?
    I don't think I can, but I thought I would ask. I can do this with code. However, if oracle does it for me, I don't want to do it myself.

    Can not be done but you can use the HIGH_VALUE column, or the PARTITION_POSITION columns to make decisions.
    Just remember that you can never drop the root partition so build the initial partition such that it is very small and not used.

  • How to Implement 30 days Range Partitioning with Date column. Not Interval

    Hi,
    I am using the db:
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit
    Current table structure is:
    CREATE TABLE A
    a NUMBER,
    CreationDate DATE
    PARTITION BY RANGE (CreationDate)
    INTERVAL ( NUMTODSINTERVAL (30, 'DAY') )
    (PARTITION P_FIRST
    VALUES LESS THAN (TIMESTAMP ' 2001-01-01 00:00:00'))
    How can I define virtual column based partitioning with RANGE partitioning without using INTERVAL partitioning.
    And that is with Intervals of 30 days.
    For monthly I am trying as
    CREATE TABLE A
    a NUMBER,
    CreationDate DATE,
    monthly_interval date as (to_char(CreationDate,'MM-YYYY')) VIRTUAL
    PARTITION BY RANGE (monthly_interval)
    partition p_AUG12 values less than (to_date('08-2012','mm-yyyy')),
    partition p_SEP12 values less than (to_date('09-2012','mm-yyyy')),
    partition p_OCT12 values less than (to_date('10-2012','mm-yyyy'))
    Enable ROw Movement
    BUT CAN'T INSERT the data even for that:
    Insert into a (a, CreationDate)
    Values (1, '12-10-2012')
    Insert into a (a, CreationDate)
    Values (1, '12-10-2012')
    Please suggest..

    Hi rp,
    Interval Partitioned to Range. Created Daily Partitions from Monthly Part. got complicated so I am posting here.
    Basically,
    I know Interval Partitioning is a kind of Range partitioning. But explicitly for Interval Partitioned tables XML Indexes are not allowed as discussed here:
    XMLIndexes on an Interval Partitioned Table??
    I can do monthly partitions as :
    CREATE TABLE A
    a NUMBER,
    CreationDate DATE,
    monthly_interval varchar2(8) as (to_char(CreationDate,'MM-YYYY')) VIRTUAL
    PARTITION BY RANGE (monthly_interval)
    partition p_AUG12 values less than ('09-2012'),
    partition p_SEP12 values less than ('10-2012'),
    partition p_OCT12 values less than ('11-2012')
    ) Enable ROw Movement
    Insert into a (a, CreationDate)
    Values (1, '12-SEP-2012')
    Insert into a (a, CreationDate)
    Values (1, '14-SEP-2012')
    Select * from A partition (p_SEP12)
    Select * from A partition (p_AUG12)
    Select * from A partition (p_OCT12)
    Can we do it for 30 days partitions, instead of the monthly partitions. ANY suggestions..
    Thanks..

  • Use securefile for new partitions made by interval partitioning

    I am using Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production.
    I have a range partitioned table having lobs as basicfile. Due to storage issue and other business constraints , it is determined not to change existing lobs to securefile.
    However ,we want new lobs to be in securefile and alter table to have  interval partition+.
    While researching, I found sql to change lob in range partition to securefile by using
    alter table t1 add partition t1_p2 value less than (10000) lob (col3) store as securefile (tablespace tbs_sf1)Please advise me to do similar  in case of interval partition.
    Many thanks for assistance.

    >
    Can we modify default attribute of lob to store as securefile for partition table.
    >
    Yes - that is what I meant in my reply. But it seems I may have been wrong since after further testing I was able to find syntax that would appear to work for you. Please test this and post the results.
    The line
    LOB(CLOB_DATA) store as securefileshould store intervals as securefile. But it accepted syntax to store the predefined partitions as basicfile
      PARTITION P0 VALUES LESS THAN
      (TO_DATE(' 2008-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
      LOB(CLOB_DATA) store as basicfile,I don't have time to test with data until next week. But if this works you could predefine all of your partitions that you want to use basicfile for and then use interval partitions for the ones you want securefile for. That sounded like what you were trying to do.
    DROP TABLE INTERVAL_SALES1 CASCADE CONSTRAINTS;
    CREATE TABLE INTERVAL_SALES1
      PROD_ID        NUMBER(6),
      CUST_ID        NUMBER,
      TIME_ID        DATE,
      CHANNEL_ID     CHAR(1 BYTE),
      PROMO_ID       NUMBER(6),
      QUANTITY_SOLD  NUMBER(3),
      AMOUNT_SOLD    NUMBER(10,2),
      CLOB_DATA      CLOB
    LOB(CLOB_DATA) store as securefile
    PARTITION BY RANGE (TIME_ID)
    INTERVAL( NUMTOYMINTERVAL(1,'MONTH'))
      PARTITION P0 VALUES LESS THAN
      (TO_DATE(' 2008-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
      LOB(CLOB_DATA) store as basicfile,
      PARTITION P1 VALUES LESS THAN (TO_DATE(' 2009-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')), 
      PARTITION P2 VALUES LESS THAN (TO_DATE(' 2009-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
      PARTITION P3 VALUES LESS THAN (TO_DATE(' 2010-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
    )Post the results of any testing you do.

  • Interval Partition naming Issue (Oracle 11g R2 )

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

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

  • Interval Partitioning

    Hi everyone,
    I've got a question about interval partitioning. I've got a fact table, W_GL_BALANCE_F that is fairly massive and I want to use interval partitioning on the BALANCE_DT_WID field. The values in the field are of the form YYYYMMDD || '000', i.e. 20100820000 would be today, 20100821000 would be tomorrow, etc.
    I create the table with interval partitioning with an interval of 1000, and then when I go to insert the data, I get the error "Partition does not exist". I was a little confused because I thought interval partitions created partitions for any new value.
    I ran some tests on a test table part_test(part_key number) partition range interval (1) ( partition "zero" less than 1). Then I inserted a few test records
    INSERT INTO part_test (part_key) values (1);
    INSERT INTO part_test (part_key) values (2);
    INSERT INTO part_test (part_key) values (10);
    INSERT INTO part_test (part_key) values (1000000); --- This causes error "Partition does not exist"
    Obviously there are some additional rules to go along with using the intervals. I was under the impression that it would just create a range for any new value but it seems more complicated than that.
    Can someone explain to me why the final record isn't able to have a new partition created for it?
    I apologize if this is a dumb question, but I'm a little new to the different partitioning options.
    Best regards and thanks for the help!
    -Joe

    Joe Bertram wrote:
    Hi Tubby,
    Just to give you a little more background, I am working with the Oracle BI Applications prepackaged data warehouse and ETLs. Because it's all prepackaged ETLs, I don't have too much flexibility to change the data being loaded, otherwise, I totally agree that using this date format is kind of strange. Thanks for the information, helps to know :)
    Joe Bertram wrote:
    I looked at other fields on the table for a potential partition key, and this field was the only one that was remotely uniformly distributed. That really isn't the first consideration you should have for partitioning. What are you trying to accomplish with partitioning? Are you looking to make data archival easier (dropping old partitions is the easiest way to go), or are you looking to enhance querying? Partitioning is a tool you implement for a given purpose ... so what's yours?
    Joe Bertram wrote:>
    You are correct, my test case was a little simplistic. I went back to the data the see why your case succeeded and mine failed. It turns out I missed one part in the date format. In addition to the date format as I laid it out, they also append the calendar ID which refers to the fiscal calender to which the date belongs. the actual format is <4-digit-cal_id>YYYYMMDD<000> i.e. 100120100820000 is today on calendar 1001, but there could also be a calendar 1007 which could have today's date i.e. 100720100820000.
    drop table part_test;
    create table part_test
    part_key number
    partition by range (part_key)
    interval (1000)
    partition zero_1 values less than (100120100820000)
    INSERT INTO part_test (part_key) values (100120100820000);
    INSERT INTO part_test (part_key) values (100720100820000); -- same day on calendar 1007, causes an errorIt pretty much seems to me that there would be too many potential partitions, so the DB gives up. Is that correct?That indeed seems to be the case, you could perhaps raise a service request with Oracle, but i'm not sure how eager they'd be to enhance the interval partitioning for this case. This data doesn't seem like it would be a good candidate for range partitioning. Again, we need to know what you're goal is from partitioning.
    If housekeeping is paramount (keeping X days of data and purging old data) then i would suggest the following.
    create table part_test
       part_key       number,
       magic_column   generated always as ( to_date(substr (part_key, 5, 8), 'yyyymmdd') ) virtual
       partition by range (magic_column)
       INTERVAL ( INTERVAL '1' DAY)
       partition zero_1 values less than ( to_date('20100820', 'yyyymmdd') )
    );Partitioning by a virtual column, the date in this case.
    It's possibly you have a more logical key to partition off of, but a RANGE partition scheme on your part_key doesn't sound good at all.

  • Creating DOMAIN INDEX on INTERVAL PARTITIONING

    Hi !
    I hava a problem, and I hope someone can help me!
    Two questions are asked below:
    1. Main question: HOW CAN I SOLVE THIS PROBLEM, ARE THERE OTHER WAYS DOING THE SAME JOB (MAYBE FASTER) ?
    2. Additionally: Is there a way to accelerate the deletion process
    Step 1: Creating the table* For Information how I create the table:
    CREATE TABLE LOC_EXAMPLE
    COLUMN1 NUMBER
    COLUMN2 NUMBER
    COLUMN3 NUMBER
    COLUMN4 NUMBER
    START_TIME TIMESTAMP
    GEOLOC MDSYS.SDO_GEOMETRY,
    TABLESPACE DB_DATA
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOLOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING
    PARTITION BY RANGE (START_TIME)
    INTERVAL (NUMTODSINTERVAL(1,'DAY'))
         PARTITION PART_LOC_EXAMPLE VALUES LESS THAN (TO_DATE('01-01-2008','dd-MM-yyyy'))
    ALTER TABLE LOC_EXAMPLE
    ADD CONSTRAINT PK_LOC_EXAMPLE PRIMARY KEY (COLUMN2,COLUMN4)
    DELETE FROM USER_SDO_GEOM_METADATA VALUE WHERE TABLE_NAME = 'LOC_EXAMPLE'
    INSERT INTO USER_SDO_GEOM_METADATA VALUES ('LOC_EXAMPLE','GEOLOC', MDSYS.SDO_DIM_ARRAY( MDSYS.SDO_DIM_ELEMENT('X',-180,180,0.001111949), MDSYS.SDO_DIM_ELEMENT('Y',-90,90,0.001111949) ), 8307)
    STEP 2: I TRY TO CREATE SPATIAL INDEX (ITS A DOMAIN INDEX IF I'M NOT WRONG) ON PARTITIONED TABLE*
    (PARTITIONED TABLE is an extension of range partitioning)
    CREATE INDEX LOC_EXAMPLE_idx ON LOC_EXAMPLE'(GEOLOC)
    INDEXTYPE IS MDSYS.SPATIAL_INDEX LOCAL;
    THE SECOND STEP IS NOT POSSIBLE AS THE ORACLE DOCUMENTATION SAYS:
    When using interval partitioning, consider the following restrictions:
    -You can only specify one partitioning key column, and it must be of NUMBER or DATE type.
    -Interval partitioning is not supported for index-organized tables.
    -You cannot create a domain index on an interval-partitioned table.
    1) I THINK IT IS IMPOSSIBLE FOR ME TO PASS ON INTERVAL PARTITIONING (AMOUNT OF DATA IS REALY BIG).
    This partitioning is also used to delete datas from database once a mounth (scheduled on the basis of the partitions).
    Is there a way to accelerate the deletion process?
    2) I NEED A SPATIAL INDEX! NO WAY TO PASS ON IT!
    HOW CAN I SOLVE THIS PROBLEM, ARE THERE OTHER WAYS DOING THE SAME JOB (MAYBE FASTER) ?
    Why is it not possible to create a domain index on interval partitioning, any reason?
    Will this be possible anytime?
    I would be grateful to read any advise ...!
    Thanking you in anticipation,
    Ali

    There is a forum here at OTN for spatial. Please delete the contents of this post and ask your question there. Thanks.

  • Creating DOMAIN INDEX (SPATIAL) on INTERVAL PARTITIONING

    Hi !
    I hava a problem, and I hope someone can help me!
    Two questions are asked below:
    1. Main question: HOW CAN I SOLVE THIS PROBLEM, ARE THERE OTHER WAYS DOING THE SAME JOB (MAYBE FASTER) ?
    2. Additionally: Is there a way to accelerate the deletion process
    Step 1: Creating the table For Information how I create the table:
    CREATE TABLE LOC_EXAMPLE
    COLUMN1 NUMBER
    COLUMN2 NUMBER
    COLUMN3 NUMBER
    COLUMN4 NUMBER
    START_TIME TIMESTAMP
    GEOLOC MDSYS.SDO_GEOMETRY,
    TABLESPACE DB_DATA
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOLOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING
    PARTITION BY RANGE (START_TIME)
    INTERVAL (NUMTODSINTERVAL(1,'DAY'))
    PARTITION PART_LOC_EXAMPLE VALUES LESS THAN (TO_DATE('01-01-2008','dd-MM-yyyy'))
    ALTER TABLE LOC_EXAMPLE
    ADD CONSTRAINT PK_LOC_EXAMPLE PRIMARY KEY (COLUMN2,COLUMN4)
    DELETE FROM USER_SDO_GEOM_METADATA VALUE WHERE TABLE_NAME = 'LOC_EXAMPLE'
    INSERT INTO USER_SDO_GEOM_METADATA VALUES ('LOC_EXAMPLE','GEOLOC', MDSYS.SDO_DIM_ARRAY( MDSYS.SDO_DIM_ELEMENT('X',-180,180,0.001111949), MDSYS.SDO_DIM_ELEMENT('Y',-90,90,0.001111949) ), 8307)
    STEP 2: I TRY TO CREATE SPATIAL INDEX (ITS A DOMAIN INDEX IF I'M NOT WRONG) ON PARTITIONED TABLE
    (PARTITIONED TABLE is an extension of range partitioning)
    CREATE INDEX LOC_EXAMPLE_idx ON LOC_EXAMPLE'(GEOLOC)
    INDEXTYPE IS MDSYS.SPATIAL_INDEX LOCAL;
    THE SECOND STEP IS NOT POSSIBLE AS THE ORACLE DOCUMENTATION SAYS:
    When using interval partitioning, consider the following restrictions:
    -You can only specify one partitioning key column, and it must be of NUMBER or DATE type.
    -Interval partitioning is not supported for index-organized tables.
    -You cannot create a domain index on an interval-partitioned table.
    1) I THINK IT IS IMPOSSIBLE FOR ME TO PASS ON INTERVAL PARTITIONING (AMOUNT OF DATA IS REALY BIG).
    This partitioning is also used to delete datas from database once a mounth (scheduled on the basis of the partitions).
    Is there a way to accelerate the deletion process?
    2) I NEED A SPATIAL INDEX! NO WAY TO PASS ON IT!
    HOW CAN I SOLVE THIS PROBLEM, ARE THERE OTHER WAYS DOING THE SAME JOB (MAYBE FASTER) ?
    Why is it not possible to create a domain index on interval partitioning, any reason?
    Will this be possible anytime?
    I would be grateful to read any advise ...!
    Thanking you in anticipation,
    Ali

    Is it possible to just use a normal range-partitioned table?
    CREATE TABLE LOC_EXAMPLE
    START_TIME TIMESTAMP
    GEOLOC MDSYS.SDO_GEOMETRY,
    PARTITION BY RANGE (START_TIME)
    PARTITION P1 VALUES LESS THAN (TO_DATE('01-01-2008','dd-MM-yyyy'))
    alter table loc_example add partition p2 VALUES LESS THAN (TO_DATE('02-01-2008','dd-MM-yyyy'));
    alter table loc_example drop partition p1;
    I understand it is not as perfect as interval partitioning, since
    you have to drop an old partition/add a new one either manually
    or by some script. But you should be able to create a spatial domain index
    on it.

  • Oracle 11g interval partitioning - meaningfull partition-names

    Hello,
    On 11g, when creating interval partitions, the partitions get automatically created just fine. Very nice feature. But is it possible to supply meaningfull names to them?
    Now they get names SYS_nnn, but I would like to name them for instance SALES_2007.
    Here is one example on how to use interval partitioning:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b32024/part_admin.htm#BAJHFFBE
    And here is the syntax guide:
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_7002.htm#sthref7644
    I don't see how to accomplish meaningfull names (automatically!). Do you?

    No I don't think it is possible. This is what is written in Oracle documentation..
    http://download.oracle.com/docs/cd/B28359_01/server.111/b32024/partition.htm#CACHFHHF
    >
    The range partitioning key value determines the high value of the range partitions, which is called the transition point, and the database creates interval partitions for data beyond that transition point.
    >

  • 11g interval partitioning and global index maintenance

    hi gurus,
    in 11g interval partitioning system can automatically manage the creation of new partitions based on data.
    in this case do we need to manage global indexes?
    in earlier versions, we have to update global indexes whenever there is a partition maintenance operation.
    please suggest.
    thanks,
    charles

    user570138 wrote:
    in earlier versions, we have to update global indexes whenever there is a partition maintenance operation.In 10gR2 you don't need to update/rebuild a global index after adding a partition to the base table.
    So it should be the same when using interval partitioning.
    Regards
    Maurice

  • Range - Interval Partition and List Subpartition.

    Hi
    I am trying to create the Range(Interval) Partition with List Sub partition (dynamically). Here the LOCATION_CD List is Dynamic. Basically Location_CD is Country name. e.g USA, IND,GER.....
    Below Works good...
    CREATE TABLE TEMP
    SEQUENCE_ID NUMBER,
    RESERVATION_DATE TIMESTAMP,
    LOCATION_CD VARCHAR2(5)
    PARTITION BY RANGE (RESERVATION_DATE)
    INTERVAL (NUMTOYMINTERVAL(1,'MONTH'))
    SUBPARTITION BY LIST(LOCATION_CD)
    SUBPARTITION TEMPLATE
    ( SUBPARTITION CD_01 VALUES ('USA'),
    SUBPARTITION CD_02 VALUES ('IND'),
    SUBPARTITION CD_03 VALUES ('GER')
    PARTITION TEMP values LESS THAN (TO_DATE('01-JAN-2000','DD-MON-YYYY'))
    Today there are 3 Countries but going forward it can be more or less.
    I like the Interval Range Partition concept, where the new partition is automatically gets added.
    But at the same time can the new list sub partition be added ? If this doesn't work...can we have another alternative approach or partition technique ?
    Please suggest.
    Thanks
    Jitesh R.

    Why didn't you just perform two inserts and answer the question yourself?
    orabase> CREATE TABLE T (
      2  SEQUENCE_ID      NUMBER,
      3  RESERVATION_DATE TIMESTAMP,
      4  LOCATION_CD      VARCHAR2(5))
      5  PARTITION BY RANGE (RESERVATION_DATE)
      6  INTERVAL (NUMTOYMINTERVAL(1,'MONTH'))
      7  SUBPARTITION BY LIST(LOCATION_CD)
      8  SUBPARTITION TEMPLATE (
      9  SUBPARTITION CD_01 VALUES ('USA'),
    10  SUBPARTITION CD_02 VALUES ('IND'),
    11  SUBPARTITION CD_03 VALUES ('GER')) (
    12  PARTITION root values LESS THAN (TO_DATE('01-JAN-2000','DD-MON-YYYY')));
    Table created.
    orabase> insert into t values (1, TO_DATE('02-JAN-2000'), 'USA');
    1 row created.
    orabase> select partition_name, subpartition_name
      2  from user_tab_subpartitions
      3  where table_name = 'T';
    PARTITION_NAME                 SUBPARTITION_NAME
    ROOT                           ROOT_CD_03
    ROOT                           ROOT_CD_02
    ROOT                           ROOT_CD_01
    SYS_P84                        SYS_SUBP83
    SYS_P84                        SYS_SUBP82
    SYS_P84                        SYS_SUBP81
    6 rows selected.
    orabase>  insert into t values (1, TO_DATE('02-JAN-2000')+400, 'USA');
    1 row created.
    orabase> select partition_name, subpartition_name
      2  from user_tab_subpartitions
      3  where table_name = 'T';
    PARTITION_NAME                 SUBPARTITION_NAME
    SYS_P88                        SYS_SUBP85
    SYS_P88                        SYS_SUBP86
    SYS_P88                        SYS_SUBP87
    SYS_P84                        SYS_SUBP81
    SYS_P84                        SYS_SUBP82
    SYS_P84                        SYS_SUBP83
    ROOT                           ROOT_CD_01
    ROOT                           ROOT_CD_02
    ROOT                           ROOT_CD_03
    9 rows selected.

  • Partitions with Epoch

    10gR2 on Solaris10
    Hi,
    I'd like to partition by month tables that contain time as UTC (EPOCH)
    STARTTIME ---NUMBER(19,0) -like 1349952216835
    PARTITION BY RANGE ("STARTTIME")
    PARTITION "OCT2012" VALUES LESS THAN (TO_DATE(' 2012-11-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'))
    PARTITION "NOV2012" VALUES LESS THAN (TO_DATE(' 2012-12-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'))
    PARTITION "DEC2012" VALUES LESS THAN (TO_DATE(' 2013-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS'))
    What are my options here?
    Thx,

    >
    I'd like to partition by month tables that contain time as UTC (EPOCH)
    What are my options here?
    >
    Your only option is to specify the epoch values manually in the partition clauses.
    The bound elements must be: string, datetime or interval literal, number, or MAXVALUE. There is no Oracle function to convert a date to epoch and you can't use a function of your own.
    You also can't use interval partitioning since the number of seconds per month are not the same.

Maybe you are looking for

  • How do I get my Mac back to OSX?

    Hi, My sister was using my computer and wanted to use Windows XP Professional Service Pack 2 in VMWare so booted a CD of Windows on my machine. There was a part that said you could put XP on the partition available so when she hit Enter it said that

  • MP4 H.264 video won't play in Flash Player

    I am using a Mac Book, OS X 10.8.5; FireFox 32.0.1; Flash Player 16.0.0.305.  I am trying to play video (MP4 H.264 format) that works on VLC, Quicktime Player & Real Player but won't play through Flash Player.  Why?

  • Where do I put my Action Script?

    So, I created a small Flash site with no loading of external swfs. I am strictly using the timeline using labels. I have a layer for my main buttons (home, portfolio and timeline). I have selected AS3 for the file and I have those buttons working fin

  • I just started up itunes and all my apps are gone, how do I get them back?

    All my apps on my ipod are fine, but when I connected my ipod to my computer, opened up itunes to look at my old apps that were on my computer, they were all gone... How do I get them back?

  • The computer at my vacation home is missing emails from may to late august

    email from early May 2014 to late August 2014 did not download when I tried to download my email at my second home. I had not logged on the 2nd computer after early may until yesterday. How can I get the missing email to download? Thanks, Rob