ITPub博客

首页 > 数据库 > Oracle > Partition管理问题集锦

Partition管理问题集锦

原创 Oracle 作者:lovehewenyu 时间:2013-10-17 17:22:35 0 删除 编辑

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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
10年老鸟,Oracle,Mysql,EMC 存储,NBU备份

注册时间:2012-02-03

  • 博文量
    268
  • 访问量
    1299102