oracle dbv验证,Oracle DBV工具说明

DBV是Oracle提供的一款用于验证数据文件物理结构的工具,确保数据文件无损坏和逻辑坏块。它可以用于在线或离线数据文件的验证,但不能检测INDEX与TABLE的不匹配问题。DBV支持多种命令参数,如指定验证的文件、起始和结束块等。需要注意的是,DBV不能用于验证redo log文件和control文件,也不能在RAW设备上直接使用,除非创建带有扩展名的符号链接。此外,DBV在特定平台和版本上可能会报告错误,如针对大于2GB文件的问题。本文详细介绍了DBV的使用方法和限制。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、DBV 说明

DBV是一个常用的工具,OracleMOS上有一篇文章介绍DBV:[ID 35512.1]。

dbverify工具的主要目的是为了检查数据文件的物理结构,包括数据文件是否损坏,是否存在逻辑坏块,以及数据文件中包含何种类型的数据。

DBV checks Oracledatafiles to ensure that:

(1)The datafile has a valid header

(2)Each datablock in the file has aspecial "wrapper" which identifies the block - this"wrapper" is checked for correctness

(3)DATA (TABLE) and INDEX blocks areinternally consistent

(4)From 8.1.6 onwards: That variousother block types are internally           consistent (such as rollback segmentblocks)

The tool can be used to give some degree of confidence that a datafile is free fromcorruption. It opens files in a read only mode and so cannot change thecontents of the file being checked.

DBVERIFY工具可以验证ONLINE或OFFLINE的数据文件。不管数据库是否打开,都可以访问数据文件。

注意:

(1)对于DBVERIFY工具,高版本可以自动识别低版本数据库,比如11g的dbv访问9i的数据库,但是低版本的dbv访问高版本会报如下之类的错误:

DBVERIFY-验证正在开始: FILE =e:/oracle/oradata/Dave/test01.dbf

汇入的页1 -可能是介质损坏

(2)查看数据坏块所在数据文件号及块号可以对表进行一次全表扫描,如:

select count(*) from tablename;

如果有坏块, 在扫描的时候就会报错。

二、DBV 的命令参数

C:/>dbv help=y

DBVERIFY: Release 11.1.0.7.0 - Productionon 星期二 12月 15 23:35:24 2009

Copyright (c) 1982, 2007, Oracle. Allrights reserved.

关键字 说明 (默认值)

----------------------------------------------------

FILE 要验证的文件 (无)

START 起始块 (文件的第一个块)

END 结束块 (文件的最后一个块)

BLOCKSIZE 逻辑块大小 (8192)

LOGFILE 输出日志 (无)

FEEDBACK 显示进度 (0)

PARFILE 参数文件 (无)

USERID 用户名/口令 (无)

SEGMENT_ID 段 ID (tsn.relfile.block) (无)

HIGH_SCN 要验证的最高块 SCN (无)

(scn_wrap.scn_base 或 scn)

(1)FILE(File to Verify):This is the name of the file to verify.    See"Limitations" below if your datafile name has no suffix.

(2)START(Start Block):This is the first datablock to check in   the file.This defaults to the first block in the file and need only be  specifiedif you want to check just a portion of a given file.

(3)END(End Block):This is the last datablock to check in the  file. Thisdefaults to the last block of  the filebut may need specifying for RAW  devi

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值