ORA-02243: ALTER INDEX 或 ALTER MATERIALIZED VIEW 选项无效
来源:互联网 发布:网络构建师 编辑:程序博客网 时间:2024/06/05 22:52
早上论坛里一个朋友在想使索引无效的时候遇到了如下错误:
ORA-02243: ALTER INDEX 或 ALTER MATERIALIZED VIEW 选项无效
他使用的语句如下:
ALTER INDEX index_name DISABLE;
刚看到的时候我以为是由于约束存在,所以无法DISABLE索引,因为记得以前学习主键的过程中有个印象,删除唯一索引时,若存在对应的主键约束,则不能删除。相关的学习贴如下
http://blog.csdn.net/wh62592855/archive/2009/10/24/4724232.aspx
可是后来看了其他朋友的回答,去翻了翻文档,好像并不是由于这个原因。下面从文档中摘录一段内容:
ENABLE Clause
ENABLE
applies only to a function-based index that has been disabled because a user-defined function used by the index was dropped or replaced. This clause enables such an index if these conditions are true:
The function is currently valid
The signature of the current function matches the signature of the function when the index was created
The function is currently marked as
DETERMINISTIC
Restriction on Enabling Function-based Indexes You cannot specify any other clauses of ALTER
INDEX
in the same statement with ENABLE
.
DISABLE Clause
DISABLE
applies only to a function-based index. This clause lets you disable the use of a function-based index. You might want to do so, for example, while working on the body of the function. Afterward you can either rebuild the index or specify another ALTER
INDEX
statement with the ENABLE
keyword.
UNUSABLE Clause
Specify UNUSABLE
to mark the index or index partition(s) or index subpartition(s) UNUSABLE
. An unusable index must be rebuilt, or dropped and re-created, before it can be used. While one partition is marked UNUSABLE
, the other partitions of the index are still valid. You can execute statements that require the index if the statements do not access the unusable partition. You can also split or rename the unusable partition before rebuilding it.
Restriction on Marking Indexes Unusable You cannot specify this clause for an index on a temporary table.
可以看到,DISABLE和ENABLE只针对函数索引有效,对于其他索引不行的。你可以选择使用UNUSABLE。
下面做点实验来看看
- ORA-02243: ALTER INDEX 或 ALTER MATERIALIZED VIEW 选项无效
- ORA-01735: 无效的 ALTER TABLE 选项
- alter index
- alter index
- alter index rebuild & alter index rebuild online
- alter index rebuild & alter index rebuild online
- Oracle alter index rebuild 与 ORA-08104 说明
- alter
- alter
- alter
- alter
- alter
- alter
- Alter或ActionSheet
- cassandra materialized view And index
- alter index coalesce和alter index rebuild的区别
- alter index coalesce和alter index rebuild的区别
- alter index rebuild与alter index rebuild online的区别
- Madwifi无线发送数据过程
- 李现路:在DSP6000中怎样编写您的第一个程序(二)
- 李现路:MTK开发中怎么建立一个独立的模块
- 李现路:DSP6000中C/C++语言和汇编语言的混合编程的方法
- usaco Chapter 3 section 3.1 Humble Numbers
- ORA-02243: ALTER INDEX 或 ALTER MATERIALIZED VIEW 选项无效
- 李现路:在DSP6000中怎样编写您的第一个程序(1)
- java生成doc html
- MySQL最多能装多少记录
- Opencv之PCA篇
- usaco Chapter 3 section 3.1 Score Inflation
- 个人职业提升需要跨越性思维
- 短信 男人女人
- 无线接入点(AP)