Partition管理問題集錦

lovehewenyu發表於2013-10-17

Partition管理問題集錦

 

 

ORA-14086: a partitioned index may not be rebuilt as a whole(rebuild index)

ORA-14074: partition bound must collate higher than that of the last partition(add partition)

 

 

ORA-14086: a partitioned index may not be rebuilt as a whole(rebuild index)

 

SQL> alter index DOUDOU_GL_IDX rebuild;

alter index DOUDOU_GL_IDX rebuild

            *

ERROR at line 1:

ORA-14086: a partitioned index may not be rebuilt as a whole

 

SQL> select index_name, partition_name, status from user_ind_partitions where

  2  index_name like 'DOUDOU_GL_IDX';

 

INDEX_NAME                     PARTITION_NAME                 STATUS

------------------------------ ------------------------------ --------

DOUDOU_GL_IDX                  DOUDOU_13                      UNUSABLE

DOUDOU_GL_IDX                  DOUDOU_14                      UNUSABLE

DOUDOU_GL_IDX                  DOUDOU_FE                      UNUSABLE

 

SQL> alter index DOUDOU_GL_IDX rebuild partition DOUDOU_13;

 

Index altered.

SQL> alter index DOUDOU_GL_IDX rebuild partition DOUDOU_14;

 

Index altered.

 

SQL> alter index DOUDOU_GL_IDX rebuild partition DOUDOU_FE;

 

Index altered.

SQL> select index_name, partition_name, status from user_ind_partitions where  index_name like 'DOUDOU_GL_IDX';

 

INDEX_NAME                     PARTITION_NAME                 STATUS

------------------------------ ------------------------------ --------

DOUDOU_GL_IDX                  DOUDOU_13                      USABLE

DOUDOU_GL_IDX                  DOUDOU_14                      USABLE

DOUDOU_GL_IDX                  DOUDOU_FE                      USABLE

 

 

ORA-14074: partition bound must collate higher than that of the last partition(add partition)

 

SQL> create table t01(id number,name varchar2(100))

  2   partition by range(id)

  3   (

  4  partition p1 values less than(100),

  5  partition p2 values less than(200),

  6  partition p3 values less than(300),

  7  partition p4 values less than(maxvalue)

  8  );

 

Table created.

 

SQL> alter table t01 add partition p5 values less than(500);

alter table t01 add partition p5 values less than(500)

                              *

ERROR at line 1:

ORA-14074: partition bound must collate higher than that of the last partition

 

SQL> alter table t01 split partition p4 at (500)

  2   into ( partition p5, partition p4) update indexes;

 

Table altered.

 

SQL> select TABLE_NAME,PARTITION_NAME from user_tab_partitions where table_name='T01';

 

TABLE_NAME                     PARTITION_NAME

------------------------------ ------------------------------

T01                            P1

T01                            P2

T01                            P3

T01                            P5

T01                            P4

 

 

 

未完待續

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26442936/viewspace-774571/,如需轉載,請註明出處,否則將追究法律責任。

相關文章