dbms_repair(修复)
2016-11-28 21:03
369 查看
dbms_repair包:
检查,修复在表和索引上损坏的数据块;
–1,admin_tables
/*
该过程提供了管理 修复表 和 孤表 的功能
table_name –{加前缀ORPHAN,REPAIR }
table_type –{dbms_repair.ORPHAN_TABLE ,dbms_repair.REPAIR_TABLE}
action – {dbms_repair.CREATE_ACTION;
dbms_repair.PURGE_ACTION;
dbms_repair.DROP_ACTION;}
tablespace –表所在的空间
*/
dbms_repair.admin_tables(
table_name => ,
table_type => ,
action => ,
tablespace =>
);
–建立了REPAIR_TABLE表(修复表)
begin
dbms_repair.admin_tables(
‘REPAIR_TABLE’,
dbms_repair.REPAIR_TABLE,
dbms_repair.CREATE_ACTION,
‘SYSTEM’);
end;
select * from REPAIR_TABLE;
–2,check_object
/*
该过程检查特定的对象,并将损坏信息写到修复表中去;
*/
dbms_repair.check_object(
schema_name => ,
object_name => ,
partition_name => ,
object_type => ,
repair_table_name =>
);
–3,dump_orphan_keys
/*
该过程用于报告指南损坏数据块的 索引入口,
并会将相应的索引入口消息写到孤表中去;
key_count –返回索引入口的个数
*/
dbms_repair.dump_orphan_keys(
);
–4,fix_corrupt_blocks
/*
该过程用于修复数据块;这些数据块是在 check_object之后生成的;
fix_count –修复数据块的个数
*/
dbms_repair.fix_corrupt_blocks(
schema_name => ,
object_name => ,
partition_name => ,
object_type => ,
repair_table_name => ,
fix_count => out
);
–5,rebuild_freelists
/*
用于重建指定对象的空闲空间
*/
dbms_repair.rebuild_freelists(
schema_name => ,
object_name => ,
partition_name => ,
object_type =>
);
–6,skip_corrupt_blocks
/*
用于指定在扫描对象时跳过损坏块
flag –{
dbms_repair.SKIP_FLAG;
dbms_repair.NOSKIP_FLAG;
}
*/
dbms_repair.skip_corrupt_blocks(
schema_name => ,
object_name => ,
object_type => ,
flags =>
);
–7,segment_fix_status
/*
修复 位图入口的损坏;
*/
dbms_repair.segment_fix_status(
,segment_owner => ,
segment_name => ,
segment_type => ,
file_number => ,
block_number => ,
partition_name => –指定分区名
);
检查,修复在表和索引上损坏的数据块;
–1,admin_tables
/*
该过程提供了管理 修复表 和 孤表 的功能
table_name –{加前缀ORPHAN,REPAIR }
table_type –{dbms_repair.ORPHAN_TABLE ,dbms_repair.REPAIR_TABLE}
action – {dbms_repair.CREATE_ACTION;
dbms_repair.PURGE_ACTION;
dbms_repair.DROP_ACTION;}
tablespace –表所在的空间
*/
dbms_repair.admin_tables(
table_name => ,
table_type => ,
action => ,
tablespace =>
);
–建立了REPAIR_TABLE表(修复表)
begin
dbms_repair.admin_tables(
‘REPAIR_TABLE’,
dbms_repair.REPAIR_TABLE,
dbms_repair.CREATE_ACTION,
‘SYSTEM’);
end;
select * from REPAIR_TABLE;
–2,check_object
/*
该过程检查特定的对象,并将损坏信息写到修复表中去;
*/
dbms_repair.check_object(
schema_name => ,
object_name => ,
partition_name => ,
object_type => ,
repair_table_name =>
);
–3,dump_orphan_keys
/*
该过程用于报告指南损坏数据块的 索引入口,
并会将相应的索引入口消息写到孤表中去;
key_count –返回索引入口的个数
*/
dbms_repair.dump_orphan_keys(
schema_name => , object_name => , partition_name => , object_type => , orphan_table_name =>, key_count => out
);
–4,fix_corrupt_blocks
/*
该过程用于修复数据块;这些数据块是在 check_object之后生成的;
fix_count –修复数据块的个数
*/
dbms_repair.fix_corrupt_blocks(
schema_name => ,
object_name => ,
partition_name => ,
object_type => ,
repair_table_name => ,
fix_count => out
);
–5,rebuild_freelists
/*
用于重建指定对象的空闲空间
*/
dbms_repair.rebuild_freelists(
schema_name => ,
object_name => ,
partition_name => ,
object_type =>
);
–6,skip_corrupt_blocks
/*
用于指定在扫描对象时跳过损坏块
flag –{
dbms_repair.SKIP_FLAG;
dbms_repair.NOSKIP_FLAG;
}
*/
dbms_repair.skip_corrupt_blocks(
schema_name => ,
object_name => ,
object_type => ,
flags =>
);
–7,segment_fix_status
/*
修复 位图入口的损坏;
*/
dbms_repair.segment_fix_status(
,segment_owner => ,
segment_name => ,
segment_type => ,
file_number => ,
block_number => ,
partition_name => –指定分区名
);
相关文章推荐
- dbms_repair包修复坏块
- sqlserver和Oracle内部的错误数据修复(DBCC、DBMS_REPAIR)
- 使用 DBMS_REPAIR 修复坏块
- 实验进阶OCP #3 DBMS _REPAIR修复块损坏
- dbms_repair包修复损坏的数据块
- 使用 DBMS_REPAIR 修复坏块
- DBMS_REPAIR包修复损坏数据块
- 使用 DBMS_REPAIR 修复坏块
- 使用dbms_repair修复坏块
- 使用dbms_repair修复受损数据块
- DBMS_REPAIR包修复损坏数据块
- dbms_repair包使用详解
- boot-repair修复UFBI UBUNTU 12.04
- 文件恢复:Docrepair-MS Word文档修复软件
- ERP中某单据无法添加,一直报“超时”错误修复方法(dbcc checkdb('AErp_HC', repair_allow_data_loss))
- repair table `site_user`,#1194 – Table is marked as crashed and should be repaired错误修复
- linux设置存储自动挂载后系统无法登录即repair filesystem模式修复方法
- DBMS_REPAIR 工具包的使用
- Evaluate the Costs and Benefits of Using DBMS_REPAIR【每日一译】--2012-10-26
- Boot Repair Tool: 可以修复与启动相关的大部分问题