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