ITPub博客

首页 > 数据库 > Oracle > 043-8 dealing With Database corruption

043-8 dealing With Database corruption

原创 Oracle 作者:zuiai510416 时间:2014-04-22 10:45:00 0 删除 编辑

--参考 RMAN的增量备份
--1.analyze --检查有效性结构
Analyze Table A.T Validate STRUCTUER;

--2.DBV
C:\>dbv     --检查文件中的块坏语句

DBVERIFY: Release 10.2.0.1.0 - Production on Wed Mar 5 13:45:05 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Keyword     Description                    (Default)
----------------------------------------------------
FILE        File to Verify                 (NONE)                       --指定需要检查的语句
START       Start Block                    (First Block of File)       
END         End Block                      (Last Block of File)        
BLOCKSIZE   Logical Block Size             (8192)                       --指定文件的逻辑数据块大小
LOGFILE     Output Log                     (NONE)                       --将日志输出到文件
FEEDBACK    Display Progress               (0)                          --反馈进度
PARFILE     Parameter File                 (NONE)                       --创建属性文件,将dbv后面的属性参数写入文件后调用
USERID      Username/Password              (NONE)                      
SEGMENT_ID  Segment ID (tsn.relfile.block) (NONE)                       --直接检查段,如一个大表横跨很多个文件,直接输入段ID,不用一个一个文件去检查(tsn.relfile.block)(表空间编号.段头文件编号.段头块编号)
HIGH_SCN    Highest Block SCN To Verify    (NONE)
            (scn_wrap.scn_base OR scn)

--SEGMENT_ID  Segment ID (tsn.relfile.block)(表空间编号.段头文件编号.段头块编号)
Select * From sys_dba_segs Where segment_name = 'T'   --表空间编号TABLESPACE_ID=5;段头文件编号 HEADER_FILE=5;段头块编号 HEADER_BLOCK=27;
C:\dbv userid=Sys/oracle segment_id=5.5.27
--3.DB_BLOCK_CHECKING
SQL> show parameter db_block_checking
NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ---------------
db_block_checking                    string                            False
Select * From v$parameter_valid_values Where Name = 'db_block_checking';    --FALSE,OFF,LOW,MEDIUM,TRUE,FULL
/*DB_BLOCK_CHECKING is set to true,the oracle database performs block checking for all data blocks.*/
--OFF: No block checking is performed in any tablespaces except for SYSTEM.
--LOW: Basic block header checks are performed after block contents change in memory (for example, after UPDATE or INSERT statements, and on-disk reads).
--MEDIUM: All LOW checks, as well as block checking for all non-index-organized table blocks, are performed.
--FULL: All LOW and MEDIUM checks, as well as checks on index blocks, are performed.

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

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

注册时间:2011-07-19

  • 博文量
    53
  • 访问量
    132059