Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: dynamically add partition

Re: dynamically add partition

From: Dmitry Loginov <lde_at_mpsb.ru>
Date: Tue, 14 Feb 2006 14:45:47 +0300
Message-ID: <dssfth$6va$1@news.caravan.ru>

"o" <new2unix_at_gmail.com> wrote in message news:1139915190.907954.135140_at_g43g2000cwa.googlegroups.com...
>
>
> i have a similar problem
>
> my first partition name is
>
> PARTITION HWCDR450_20050917 VALUES LESS THAN (TO_DATE(' 2005-09-18
> 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
>
>
> now i want to add partition automatically everyday which will be
> smaller than sysdate that is (sysdate -1)

First, it's a bad idea to split "maxvalue" partition after it will popullated with data for sysdate. Seems much better to prepare empty partitions for the next day (some days) before inserting data for that day (days).

You can write procedure which will create partitions using dynamic sql (execute immediate) and submit one as a job with DBMS_JOB package.

>
> what will be tha code for this?
>
> thanx
>
>
> o schrieb:
>
>> if I have a table and partitioned based it on date. Then how can I
>> extend the partitions
>> dynamically ! That is I want to generate a partition everyday !
>> As the data is very large ! So help me out !
>

Dmitry Received on Tue Feb 14 2006 - 05:45:47 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US