ITPub博客

首页 > Linux操作系统 > Linux操作系统 > alter session set SKIP_UNUSABLE_INDEXES = true

alter session set SKIP_UNUSABLE_INDEXES = true

原创 Linux操作系统 作者:howard_zhang 时间:2008-03-12 19:17:56 0 删除 编辑
In 9i and above - ALTER INDEX UNUSABLE;

In 9i it has serious side effect which is cured by setting

of SKIP_UNUSABLE_INDEXES:

In 10G this setting is TRUE by default, so no default side effect
SQL> create table t (id number);

Table created.

SQL> create index idx01 on t(id);

Index created.

SQL> insert into t values(1);

1 row created.

SQL> alter index idx01 unusable;

Index altered.

SQL> insert into t values(1);
insert into t values(1)
*
ERROR at line 1:
ORA-01502: index 'RE_BUILD65.IDX01' or partition of such index is in unusable
state


SQL> alter session set SKIP_UNUSABLE_INDEXES = true;

Session altered.

SQL> insert into t values(1);

1 row created.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/7882490/viewspace-206027/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: ORACLE TEXT(转载)
请登录后发表评论 登录
全部评论

注册时间:2008-01-22

  • 博文量
    42
  • 访问量
    142754