ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 第7章 处理块损坏

第7章 处理块损坏

原创 Linux操作系统 作者:zhengbao_jun 时间:2009-02-18 15:25:54 0 删除 编辑

第7章 处理块损坏
使用ANALYZE命令
sql>analyze table test.t3 validate structure;
sql>analyze table test.t3 validate structure;

使用DBVERIFY命令
command>dbv blocksize=2048 file=users01.dbf
command>dbv blocksize=8192 file=users01.dbf
command>dbv blocksize=8192 file=users01.dbf logfile=c:\temp\users01.log

使用DB_BLOCK_CHECKING
command>edit initora101.ora
db_block_checking=true

使用DBMS_REPAIR程序包
1.
sql>connect / as sysdba
sql>analyze table test.t3 validate structure;
2.
3.
sql>host repair_tab.sql
sql>@repair_tab
4.
sql>host edit check_obj.sql
sql>@check_obj.sql
5.
sql>select object_name,block_id,corrupt_type,marked_corrupt,
corrupt_description,repair_description from repair_table;
sql>select object_name,corrupt_description from repair_table;
sql>select object_name,repair_desription from repair_table;
6.
sql>connect test/test
sql>create table t3_bak as
select * from t3
where dbms_rowid.rowid_blokc_number(rowid) = 5
and dbms_rowid.rowid_to_absolute_fno(rowid,'TEST','T3')=4;
sql>select c1 from t3_bak;
7.
sql>host edit fixblocks.sql
sql>@fix_blocks
sql>select object_name,block_id,marked_corrupt from repair_table;
sql>select * from test.t3;
8.
sql>host more orphan.sql
sql>host more orphan_dump.sql
sql>@orphan_dump
sql>select index_name,count(*) from orphan_key_table group by index_name;
10.
sql>host more corrupt_block_skip.sql
11.
sql>host more rebuild_freelists.sql
sql>@rebuild_freelists
12.
sql>drop index t3_pk;
sql>create index t3_pk on t3(c1);

块媒介恢复
command>rman
rman>connect target
rman>blockrecover datafile 5 block 6;

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/235507/viewspace-555224/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-08-08

  • 博文量
    209
  • 访问量
    878656