Validating Tables, Indexes, Clusters, and Materialized Views
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.
如果表、索引、群集驗證是損壞的,可以刪除,重建。如果是物化檢視,可以使用complete refresh來修復該問題,如果仍然有誤,則需要重建。
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:
下面是檢驗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:
可以使用cascade選項,檢驗與表相關聯的物件(如:所有索引)
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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle - Tables/IndexesOracleIndex
- [20121101]物化檢視與表(Materialized Views and Tables).txtZedView
- Overview of Materialized Views (184)ViewZed
- Refresh Materialized Views (189)ZedView
- Views and Base Tables (243)View
- Listing Chained Rows of Tables and ClustersAI
- [DW]An article about Materialized Views(zz)ZedView
- Extents in Materialized Views and Their Logs (18)ZedView
- Materialized Views in data warehouse environment (185)ZedView
- Bitmap Indexes on Partitioned Tables (225)Index
- Materialized Views in data distributed environment (186)ZedView
- Creating Compressed Tables and IndexesIndex
- Allocation of Temporary Segments for Temporary Tables and Indexes (28)Index
- Oracle Materialized Views Containing Joins OnlyOracleZedViewAI
- Materialized Views in mobile computing environment (187)ZedView
- Use of Indexes Against Views (179)IndexAIView
- Bitmap Indexes on Index-Organized Tables (232)IndexZed
- Oracle 19c Concepts(02):Tables and Table ClustersOracle
- Miscellaneous Information about Creating Indexes on Partitioned TablesORMIndex
- Secondary Indexes on Index-Organized Tables (231)IndexZed
- How To Use DBMS_ADVISOR.TUNE_MVIEW Tuning Materialized ViewsViewZed
- Use the following approach to create tables with constraints and indexes:APPAIIndex
- Oracle 19c Concepts(03):Indexes and Index-Organized TablesOracleIndexZed
- 關於分割槽表和分割槽索引(About Partitioned Tables and Indexes)索引Index
- ORA-02030: can only select from fixed tables/viewsView
- Oracle 12C新特性-資料泵新引數(VIEWS_AS_TABLES)OracleView
- Oracle:ORA-01219:database not open:queries allowed on fixed tables/views onlyOracleDatabaseView
- B-tree Indexes on UROWID Columns for Heap- and Index-Organized Tables (235)IndexZed
- [20130812]12c Partial Indexes For Partitioned Tables Part I.txtIndex
- [20130812]12c Partial Indexes For Partitioned Tables Part II.txtIndex
- Materialized ViewZedView
- Overview of Clusters (238)View
- Overview of Hash Clusters (239)View
- DML ViewsView
- Rebuild IndexesRebuildIndex
- ORACLE INDEXESOracleIndex
- dba_tables,dba_all_tables,user_tables,all_tables有什麼區別
- drop materialized view hung !!!ZedView