PARTITIONED TABLE IN ORACLE 11G
ALTER INDEX index_name REBUILD
alter table TEMP add
PARTITION BY RANGE(ID)
(
PARTITION PERIOD VALUES LESS THAN (maxvalue)
);
drop table temp;
CREATE TABLE TEMP (ID NUMBER(10),NAME VARCHAR2(30))
PARTITION BY RANGE (id)
(
PARTITION ID_test VALUES LESS THAN (MAXVALUE)
)
/
ALTER TABLE ORIGINAL_TABLE
EXCHANGE PARTITION TEMP_TABLE_PARTITION_NAME
WITH TABLE TEMP_TABLE
WITHOUT VALIDATION UPDATE GLOBAL INDEXES;
ALTER TABLE ERR_TAB
ADD PARTITION MYPART01 VALUES LESS THAN (TO_DATE('01-APR-2007'),'DD-MON-YYYY')
STORAGE (INITIAL 20K NEXT 20K) TABLESPACE DWUSER;
ALTER TABLE CALL
EXCHANGE PARTITION call_partition WITH TABLE call_temp
INCLUDING INDEXES
WITHOUT VALIDATION;
ALTER INDEX index_name REBUILD
alter table TEMP add
PARTITION BY RANGE(ID)
(
PARTITION PERIOD VALUES LESS THAN (maxvalue)
);
drop table temp;
CREATE TABLE TEMP (ID NUMBER(10),NAME VARCHAR2(30))
PARTITION BY RANGE (id)
(
PARTITION ID_test VALUES LESS THAN (MAXVALUE)
)
/
ALTER TABLE ORIGINAL_TABLE
EXCHANGE PARTITION TEMP_TABLE_PARTITION_NAME
WITH TABLE TEMP_TABLE
WITHOUT VALIDATION UPDATE GLOBAL INDEXES;
ALTER TABLE ERR_TAB
ADD PARTITION MYPART01 VALUES LESS THAN (TO_DATE('01-APR-2007'),'DD-MON-YYYY')
STORAGE (INITIAL 20K NEXT 20K) TABLESPACE DWUSER;
ALTER TABLE CALL
EXCHANGE PARTITION call_partition WITH TABLE call_temp
INCLUDING INDEXES
WITHOUT VALIDATION;
No comments:
Post a Comment