Data Warehousing Community Forum

Databases => Oracle => Topic started by: Arvind on May 24, 2008, 10:59:49 pm



Title: Partition error using Alter
Post by: Arvind on May 24, 2008, 10:59:49 pm
Trying to parttion the table "employee" after every 2000 rows -
I am using the following for partioning by range sytax and getting the error -

ALTER TABLE employee
ADD PARTITION BY RANGE (empno)
(
PARTITION emp_2000 VALUES LESS THAN (2001)
TABLESPACE tsp_1
);


Donot suggest to recreate the table by partioning at the early stage as the data volume of my original table is very huge...!

Help is appreciated...!



Title: Re: Partition error using Alter
Post by: samishta on May 29, 2008, 12:54:26 am
Your syntax looks okay,.... what is the exact error you are encountering?

I have seen range partitions put up mostly on date fields.

Nevertheless consider the following to add partitions on your table,


To change an unpartitioned table to a range-partitioned table with three partitions, say, each of which is on a different segment:

alter table sample_tab partition by range (empno)
    (smallempno values <= (2000) on seg1,
    mediumempno values <= (4000) on seg2,
    bigempno values <= (6000) on seg3)

To add yet another range partition to the table:

alter table sample_tab add partition
    (vbigempno values <= (8000) on seg4)