Validating Tables, Indexes, Clusters, and Materialized Views
使用ANALYZE VALIDATE STRUCTURE验证 表、索引、群集、物化视图结构的完整性。如果对象的结构有效，则会顺利验证通过，反之则会报错。（如：表异常的ORA-01498，索引的ORA-01499）
To verify the integrity of the structure of a table, index, cluster, or materialized view, use the ANALYZE statement with the VALIDATE STRUCTURE option. If the structure is valid, no error is returned. However, if the structure is corrupt, you receive an error message.
例如：在极少情况下，硬件或系统出现异常时，索引可能会出现损坏且不能被正常使用。 当Validating验证索引时，会逐条的检查索引条目与关联表对应记录的准确性。 如果发现索引出现异常，可删除它重建。
For example, in rare cases such as hardware or other system failures, an index can become corrupted and not perform correctly. When validating the index, you can confirm that every entry in the index points to the correct row of the associated table. If the index is corrupt, you can drop and re-create it.
If a table, index, or cluster is corrupt, you should drop it and re-create it. If a materialized view is corrupt, perform a complete refresh and ensure that you have remedied the problem. If the problem is not corrected, drop and re-create the materialized view.
The following statement analyzes the emp table:
ANALYZE TABLE emp VALIDATE STRUCTURE;
You can validate an object and all related objects (for example, indexes) by including the CASCADE option. The following statement validates the emptable and all associated indexes:
ANALYZE TABLE emp VALIDATE STRUCTURE CASCADE;
ou can specify that you want to perform structure validation online while DML is occurring against the object being validated. There can be a slight performance impact when validating with ongoing DML affecting the object, but this is offset by the flexibility of being able to perform ANALYZE online. The following statement validates the emp table and all associated indexes online:
ANALYZE TABLE emp VALIDATE STRUCTURE CASCADE ONLINE;
来自 “ ITPUB博客 ” ，链接：http://blog.itpub.net/17086096/viewspace-1973745/，如需转载，请注明出处，否则将追究法律责任。