Oracle tool: DBV

Source: Internet
Author: User

 

1 Definition

 

Oracle Bad blocks can be divided into physical and logical Bad blocks. The damaged block information is similar:
ORA-01578: Oracle data block upted (file #6, block #11)
ORA-01110: data file 6: '/u01/APP/Oracle/oradata/orcl/tbs01.dbf'
The main purpose of the dbverify tool is to check the physical structure of data files and control files, including whether the data files are damaged, whether logical Bad blocks exist, and what types of data contained in the data files. Whether the database is opened or not, you can access the data file, that is, whether it is online or offline. In UNIX systems: $ ORACLE_HOME/bin/DBV.

 

2 command

C: \ Users \ Administrator> dbvdbverify: Release 10.2.0.1.0-production on Thursday September 20 01:24:37 2012 copyright (c) 1982,200 5, Oracle. all rights reserved. keyword description (default) ---------------------------------------------------- file to be verified (none) start block (the first block of the file) end block (the last block of the 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) the highest block SCN to be verified by high_scn (none) (scn_wrap.scn_base or SCN)

 

Note:
① If feedback = 1000, verify that one of the 1000 blocks is displayed.
② Userid -- when verifying the ASM file, specify
③ File -- the User specifies the data file name to be verified
④ Blocksize -- specifies the size of the data file. The default value is 8192. A DBV-00103 error will be received for non-8192 blocks.
⑤ Parfile -- some options can be placed in the parameter file like expdp/impdp.
⑥ Segment_id -- Verification segment. The tablespace ID, Data File ID, and segment header ID are required.

 

3 restrictions

 

① DBV is subject to version restrictions. a later version can automatically identify a lower-version database. For example, if a database of 11 Gbit/s accesses a database of 9i, an error is returned when a later version of DBV accesses a later version.
② Online log files, archived logs, and RMAN backup set verification are not supported

③ In many UNIX platforms, DBV requires that data files have extensions. If no extensions are available, you can establish a soft connection:

Ln-S/dev/rdsk/mydevice/tmp/mydevice. DBF

 

4 cases

Case 1)

C: \ Users \ Administrator> DBV file = D: \ oracle \ product \ 10.2.0 \ oradata \ orcl \ datafile \ o1_mf_users_7tqztyto_.dbfdbverify: Release 10.2.0.1.0-production on Thursday 01:04:07 2012 Copyright) 1982,200 5, Oracle. all rights reserved. dbverify-Start verification: file = D: \ oracle \ product \ 10.2.0 \ oradata \ orcl \ datafile \ o1_mf_users_7tqztyto_.dbfdbverify-Total number of pages for verification completion check: 42560 -- total number of pages for verification, A page is the total number of pages processed by a data block (data): 40681 total number of failed pages (data): 0 total number of pages processed (INDEX): 97 total number of failed pages (INDEX): 0 total number of pages processed (other): 592 total number of pages processed (segment): 0 total number of failed pages (segment): 0 total number of blank pages: 1190 total number of pages marked as damaged: 0 inbound page count: 0 maximum block SCN: 4772756 (0.4772756)

We can see that the result of dbverify includes the number of blocks included in the data file, including how many data blocks, how many index blocks, and how many empty blocks, number of blocks marked as bad blocks and number of Bad blocks. Note: If the total pages influx value is greater than zero and no bad blocks exist, it is because the DBV program runs on open files and encounters a data block currently being written by the dbwn process.

 

Case 2)

The DBV tool is also used when the database is opened to verify the usage of the specified segment.

01:18:15 sys @ orcl (^ ω ^) Select tablespace_id, header_file, header_block01: 19: 27 2 from sys_dba_segs01: 19: 27 3 where segment_name ='s _ EMP '01: 19: 29 4/tablespace_id header_file header_block ------------- ----------- ------------ 4 4 603c: \ Users \ Administrator> DBV userid = HR/hr segment_id = 4.4.603dbverify: release 10.2.0.1.0-production on Thursday September 20 01:22:04 2012 copyright (c) 1982,200 5, Oracle. all rights reserved. dbverify-Start verification: segment_id = 4.4.603dbverify-Total number of pages after verification completion check: 8 Total number of pages processed (data): 5 total number of failed pages (data ): total number of pages processed by 0 (INDEX): Total number of failed pages (INDEX): Total number of pages processed by 0 (other): 2 total number of pages processed (segment ): 1 Total number of failed pages (segment): 0 total number of blank pages: 0 total number of pages marked as damaged: 0 total number of inbound pages: 0 maximum block SCN: 4689412 (0.4689412)

 

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.