Oracle 视图 DBA_REPAIR_TABLE 官方解释,作用,如何使用详细说明
本站中文解释
Oracle视图DBA_REPAIR_TABLE存储了有关需要修复的表格或分区的信息。该视图只在11g及以上版本中可用。
用途:
DBA_REPAIR_TABLE视图可用于检查需要修复的表格或分区,这些表格或分区可能出现数据不一致等状况。当检测到情况时,常规的导出导入方法将无法解决数据不一致的问题,所以可以使用 DBA_REPAIR_TABLE 视图和 DBMS_REPAIR 包来解决该问题。
使用方法:
1、查询带有异常表信息的视图:SELECT * FROM DBA_REPAIR_TABLE;
2、将 ID 选项传递给DBMS_REPAIR.FIX_CORRUPT_BLOCKS,如下所示:
DBMS_REPAIR.FIX_CORRUPT_BLOCKS(ID=>101);
3、在结束DBMS_REPAIR.FIX_CORRUPT_BLOCKS操作时,再次查询DBA_REPAIR_TABLE视图,如果当前ID字段为NULL,则表示修复操作已经成功完成。
官方英文解释
DBA_REPAIR_TABLE
describes any corruptions found by the DBMS_REPAIR
.CHECK_OBJECT
procedure.
This information is used by the DBMS_REPAIR
.FIX_CORRUPT_BLOCKS
procedure on execution. To create this view, first run the DBMS_REPAIR
.ADMIN_TABLES
procedure. To populate the resulting repair table for an object, run the DBMS_REPAIR
.CHECK_OBJECT
procedure on the object.
Note:
The table created by the DBMS_REPAIR.ADMIN_TABLES
procedure is called REPAIR TABLE
by default. If you specify a different name, this view will have the name you specify, preceded by “DBA_REPAIR_
“.
Column | Datatype | NULL | Description |
---|---|---|---|
|
|
|
Dictionary object number of the object with the corruption |
|
|
|
Tablespace number of the corrupt object |
|
|
|
Relative file number of the corrupt object |
|
|
|
Block number of the corruption |
|
|
|
Type of corruption encountered |
|
|
|
Schema of the corrupt object |
|
|
|
Name of the corrupt object |
|
|
|
If the object is an index, the name of its base table |
|
|
|
Partition or subpartition name, if applicable |
|
|
|
Description of corruption |
|
|
|
Description of repair action |
|
|
|
Whether the block is marked corrupt ( |
|
|
|
Date and time when this row was inserted into the repair table |
|
|
|
Date and time when the block was modified by the |
|
|
|
Reserved for future use |
See Also:
Oracle Database PL/SQL
Packages and Types Reference for more information about the DBMS_REPAIR
package