Oracle's DBV tool usage instructions

Source: Internet
Author: User
Tags wrapper

First, DBV description

DBV is a commonly used tool, Oraclemos has an article on Dbv:[id 35512.1].

The main purpose of the Dbverify tool is to check the physical structure of the data file, including whether the data file is corrupted, whether there are logical bad blocks, and what type of data is contained in the data file.

DBV checks oracledatafiles to ensure:

(1) The datafile has a valid header

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

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

(4) 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 this a datafile is free fromcorruption. It opens files in a read only mode, and so cannot, change thecontents of the file being checked.

The Dbverify tool can validate online or offline data files. Data files can be accessed regardless of whether the database is open.

Attention:

(1) For the Dbverify tool, the high version can automatically identify the lower version of the database, such as 11g DBV access to 9i database, but the lower version of DBV access to the high version will be reported as follows error:

dbverify-authentication is starting: FILE =e:/oracle/oradata/dave/test01.dbf

Import Page 1-may be media corrupted

More Wonderful content: http://www.bianceng.cn/database/Oracle/

(2) Check the data file number and block number of bad block data can be a full table scan of the table, such as:

Select COUNT (*) from TableName;

If you have a bad block, you will get an error when you scan it.

Second, the DBV command parameters

C:/>dbv help=y

Dbverify:release 11.1.0.7.0-productionon Tuesday December 15 23:35:24 2009

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

Keyword description (default value)

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

File to validate (none)

Start Block (first block of file)

End Block (last block of file)

BLOCKSIZE Logical block Size (8192)

LOGFILE output log (none)

FEEDBACK Display Progress (0)

Parfile parameter file (none)

USERID username/password (none)

SEGMENT_ID segment ID (Tsn.relfile.block) (none)

HIGH_SCN the highest block SCN (none) to verify

(Scn_wrap.scn_base or SCN)

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

(2) Start (Start block): This is the the "DataBlock" to check in the file. This is defaults to the "in" and need only is specifiedif you want to check just a portion of a given Fil E.

(3) End blocks: This is the last datablock to check in the file. Thisdefaults to the last blocks of the filebut may need specifying for RAW devices ("limitations" below) BLOCKSIZE L Ogical Block Size This is the database blocksize of the datafile for you wish to scan. The value defaults to "2048". Thisparameter must is set to the db_block_size of the datafile to be scanned.

(4) LOGFILE (Output Log): This is the name of a file to outputthe results to. The default is ' NONE ' and output is sent to terminal.

(5) FEEDBACK (Display Progress): If set to a value above 0 (the default) then dbvoutputs a "." For every N pages of the DataFile checked. This isuseful to the ile of the DBV is working through.

(6) Parfile (Parameter file): Parameters can is specified in a parameterfile and parfile used to cause the filecontents to B E used as input parameters. The parfile can contain any of the theabove options.

(7) HIGH_SCN (SCN): Highest block SCN to Verify (scn_wrap.scn_base OR SCN) Find theblocks exceeding the SCN. Available in version 9.2.0.6 and above.

(8) USERID (Username/password): If The file you are verifying Isan Automatic Storage Management (ASM) file, you must supply A USERID. This is Isbecause dbverify needs to connect to a Oracle instance to access ASM files.

(9) segment_id (ts#. file#.  block#): Specifies the segment that youwant to verify. For more info, review note:139962.1

Iii. DBV Restrictions

3.1 As DBV performs checks at a block Levelit cannot detect problems such as INDEX versus TABLE mismatches which can Bedet Ected by the ' ANALYZE TABLE VALIDATE STRUCTURE CASCADE ' command.

3.2 This utility can is used against datafiles. It cannot be used to verify Redolog files or control files.

3.3 can use DBV to verify a automaticstorage Management (ASM) file.

However, the database must is opened and the option USERID has to beused

EXAMPLE:DBV file=+dg1/orcl/datafile/system01.dbf Userid=system/sys

DBV checks the Userid/password for ASM managed files, which was notpossible when database is not open.

3.4 On most releases on Unix DBV expects Afilename.

This means that DBV cannot is used against datafiles with no filenamesuffix, or against RAW devices. --DBV requires datafile to have an extension

The workaround is to create a symbolic link to the raw device where Thelink name must have a extension.

Eg:ln-s/dev/rdsk/mydevice/tmp/mydevice.dbf

Now use DBV against/tmp/mydevice.dbf

-If the bare device does not have an extension, you can create a link and then perform a DBV check.

3.5 for RAW devices your should use the Endparameter to avoid running off the ' end of the ' Oracle file space.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.