其他分享
首页 > 其他分享> > DBVERIFY: Offline Database Verification Utility

DBVERIFY: Offline Database Verification Utility

作者:互联网

DBVERIFY is an external command-line utility that performs a physical data structure integrity check. DBVERIFY can be used on offline or online databases, as well on backup files.Because DBVERIFY can be run against an offline database, integrity checks are significantly faster.

DBVERIFY checks are limited to cache-managed blocks (that is, data blocks). Because DBVERIFY is only for use with data files, it does not work against control files or redo logs.

  1. Using DBVERIFY to Validate Disk Blocks of a Single Data File


USERID: Specifies your username and password. This parameter is only necessary when the files being verified are Oracle ASM files. 用于连接ASM实例

FILE: The name of the database file to verify.

START: The starting block address to verify. Specify block addresses in Oracle blocks (as opposed to operating system blocks). If you do not specify START, then DBVERIFY defaults to the first block in the file.

END:The ending block address to verify. If you do not specify END, then DBVERIFY defaults to the last block in the file.

BLOCKSIZE: BLOCKSIZE is required only if the file to be verified does not have a block size of 2 KB.

HIGH_SCN:When a value is specified for HIGH_SCN, DBVERIFY writes diagnostic messages for each block whose block-level SCN exceeds the value specified.

LOGFILE:Specifies the file to which logging information should be written. The default sends output to the terminal display.

FEEDBACK: Causes DBVERIFY to send a progress display to the terminal in the form of a single period (.) for n number of pages verified during the DBVERIFY run. If n = 0, then there is no progress display.

PARFILE: Specifies the name of the parameter file to use.

Example:

$ dbv FILE=t_db1.dbf FEEDBACK=100

.

.

.

DBVERIFY - Verification starting : FILE = t_db1.dbf

................................................................................

DBVERIFY - Verification complete

 

Total Pages Examined         : 9216

Total Pages Processed (Data) : 2044

Total Pages Failing   (Data) : 0

Total Pages Processed (Index): 733

Total Pages Failing   (Index): 0

Total Pages Empty            : 5686

Total Pages Marked Corrupt   : 0

Total Pages Influx           : 0

Notes:

Pages = Blocks

Total Pages Examined = number of blocks in the file

Total Pages Processed = number of blocks that were verified (formatted blocks)

Total Pages Failing (Data) = number of blocks that failed the data block checking routine

Total Pages Failing (Index) = number of blocks that failed the index block checking routine

Total Pages Marked Corrupt = number of blocks for which the cache header is invalid, thereby making it impossible for DBVERIFY to identify the block type

Total Pages Influx = number of blocks that are being read and written to at the same time. If the database is open when DBVERIFY is run, then DBVERIFY reads blocks multiple times to get a consistent image. But because the database is open, there may be blocks that are being read and written to at the same time (INFLUX). DBVERIFY cannot get a consistent image of pages that are in flux.

  1. Using DBVERIFY to Validate a Segment

In this mode, DBVERIFY enables you to specify a table segment or index segment for verification. It checks to ensure that a row chain pointer is within the segment being verified.

It requires that you log on to the database with SYSDBA privileges, because information about the segment must be retrieved from the database.

During this mode, the segment is locked. If the specified segment is an index, then the parent table is locked. Note that some indexes, such as IOTs, do not have parent tables.

USERID:Specifies your username and password. If you are connecting to a container database (CDB), you would enter:username@cdbname/password.

SEGMENT_ID:Specifies the segment to verify. It is composed of the tablespace ID number (tsn), segment header file number (segfile), and segment header block number (segblock). You can get this information from SYS_USER_SEGS. The relevant columns are TABLESPACE_IDHEADER_FILE, and HEADER_BLOCK. You must have SYSDBA privileges to query SYS_USER_SEGS.

Example

select TABLESPACE_ID,HEADER_FILE,HEADER_BLOCK from SYS_USER_SEGS where SEGMENT_NAME='T1';

TABLESPACE_ID HEADER_FILE HEADER_BLOCK

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

            0           1       110696

$ dbv userid=system/oracle segment_id=0.1.110696

The following is a sample of the output that would be shown for a DBVERIFY operation to validate SEGMENT_ID 1.2.67.

DBVERIFY - Verification starting : SEGMENT_ID = 1.2.67

 

DBVERIFY - Verification complete

 

Total Pages Examined         : 8

Total Pages Processed (Data) : 0

Total Pages Failing   (Data) : 0

Total Pages Processed (Index): 1

Total Pages Failing   (Index): 0

Total Pages Processed (Other): 2

Total Pages Processed (Seg)  : 1

Total Pages Failing   (Seg)  : 0

Total Pages Empty            : 4

Total Pages Marked Corrupt   : 0

Total Pages Influx           : 0

Highest block SCN            : 7358 (0.7358)

标签:blocks,number,DBVERIFY,Offline,Total,Pages,block,Utility
来源: https://blog.csdn.net/linsuhangoracle/article/details/119107937