DBVerify
is a simplistic external command line utility
which performs a very critical task: it does
either an offline or online check or
verification as to the validity of data files.
The two basic modes of operation it offers are
file level and segment level. The offline check
is quicker when referential integrity checks are
involved. Here are the table level verification
mode’s parameters:
|
USERID
|
Username/Password
|
|
FILE
|
File Name
|
|
START
|
Block Address
|
|
END
|
Block Address
|
|
BLOCKSIZE
|
Integer
|
|
Feedback
|
Integer
|
|
PARFILE
|
File Name
|
Table 6.127:
Table Level Verification Mode Parameters
And here is a simple check of the USERS
tablespace’s data file.
C:\Temp> dbv userid=bert/bert
file=C:\Oracle\oradata\ORDB1\USERS.DBF
blocksize=4096
DBVERIFY: Release
11.1.0.6.0 - Production on Tue Jul 8
15:13:42 2008
Copyright (c) 1982, 2007,
Oracle.
All rights reserved.
DBVERIFY - Verification
starting : FILE = C:\Oracle\oradata\ORDB1\USERS.DBF
DBVERIFY - Verification
complete
Total Pages Examined
: 51200
Total Pages Processed
(Data) : 610
Total Pages Failing
(Data) : 0
Total Pages Processed
(Index): 815
Total Pages Failing
(Index): 0
Total Pages Processed
(Other): 362
Total Pages Processed (Seg)
: 52
Total Pages Failing
(Seg)
: 0
Total Pages Empty
: 49361
Total Pages Marked
Corrupt
: 0
Total Pages Influx
: 0
Total Pages Encrypted
: 0
Highest block SCN
: 1466473 (0.1466473)
The segment level check
has fewer parameters, but the
segment_id parameter is a little
more complex, meaning it requires a three-part
value to be specified which requires a data
dictionary query to resolve. Here are its
parameters.
|
USERID
|
Username/Password
|
|
FILE
|
File
Name
|
|
SEGMENT_ID
|
Tablespace Name.Segment File.Segment
Block
|
|
Feedback
|
Integer
|
|
PARFILE
|
File
Name
|
Table 6.128:
Segment_id Parameters
The
segment_id requires a simple query
as shown here followed by the call to invoke
DBVERIFY for those values. Note that this
verification mode requires SYSDBA privileges:
SQL> select
tablespace_name, segment_name,
TABLESPACE_ID, HEADER_FILE, HEADER_BLOCK
from sys.sys_user_segs
where tablespace_name='USERS'
and SEGMENT_NAME like 'JUNK%';
TABLESPACE_NAME
SEGMENT_NAME
TABLESPACE_ID HEADER_FILE
HEADER_BLOCK
----------------
---------------- ------------- -----------
------------
USERS
JUNK
4
1024
10278
USERS
JUNK2
4
1024
10534
C:\Temp> dbv userid=bert/bert
segment_id=4.1024.10278
DBVERIFY: Release
11.1.0.6.0 - Production on Tue Jul 8
15:13:42 2008
Copyright (c) 1982, 2007,
Oracle.
All rights reserved.
DBVERIFY - Verification
starting : SEGMENT_ID = 4.1024.10278
DBVERIFY - Verification
complete
Total Pages Examined
: 32
Total Pages Processed
(Data) : 28
Total Pages Failing
(Data) : 0
Total Pages Processed
(Index): 0
Total Pages Failing
(Index): 0
Total Pages Processed
(Other): 0
Total Pages Processed (Seg)
: 3
Total Pages Failing
(Seg)
: 1
Total Pages Empty
: 0
Total Pages Marked
Corrupt
: 0
Total Pages Influx
: 0
Total Pages Encrypted
: 0
Highest block SCN
: 1466473 (0.1466473)