dbv检查数据文件是否有坏块

 

环境:

OS:Centos 7

DB:11.2.0.4

 

1.ASM磁盘需要带上userid参数

好像这个userid随便填写都可以的

[oracle@rac01 ~]$ dbv file='+DATA/slnngk/datafile/users.259.1146388217' userid=hxl/oracle

DBVERIFY: Release 11.2.0.4.0 - Production on Wed Sep 13 14:49:15 2023

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

DBVERIFY - Verification starting : FILE = +DATA/slnngk/datafile/users.259.1146388217


DBVERIFY - Verification complete

Total Pages Examined         : 640
Total Pages Processed (Data) : 15
Total Pages Failing   (Data) : 0
Total Pages Processed (Index): 2
Total Pages Failing   (Index): 0
Total Pages Processed (Other): 590
Total Pages Processed (Seg)  : 0
Total Pages Failing   (Seg)  : 0
Total Pages Empty            : 33
Total Pages Marked Corrupt   : 0
Total Pages Influx           : 0
Total Pages Encrypted        : 0
Highest block SCN            : 0 (0.0)

 

2.普通文件系统

[oracle@ora11g ~]$ dbv file=/u01/app/oracle/oradata/ora11g/tps_hxl01.dbf

DBVERIFY: Release 11.2.0.4.0 - Production on Wed Sep 13 06:51:37 2023

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

DBVERIFY - Verification starting : FILE = /u01/app/oracle/oradata/ora11g/tps_hxl01.dbf


DBVERIFY - Verification complete

Total Pages Examined         : 177920
Total Pages Processed (Data) : 143365
Total Pages Failing   (Data) : 0
Total Pages Processed (Index): 15260
Total Pages Failing   (Index): 0
Total Pages Processed (Other): 1162
Total Pages Processed (Seg)  : 0
Total Pages Failing   (Seg)  : 0
Total Pages Empty            : 18133
Total Pages Marked Corrupt   : 0
Total Pages Influx           : 0
Total Pages Encrypted        : 0
Highest block SCN            : 2972329 (0.2972329)

 

3.segment_id参数

SQL> select tablespace_id,header_file,header_block 
  2  from sys.sys_dba_segs 
  3  where segment_name='TB_TEST';

TABLESPACE_ID HEADER_FILE HEADER_BLOCK
------------- ----------- ------------
            4           4          170
            
[oracle@rac01 ~]$ dbv userid=hxl/oracle segment_id=4.4.170

DBVERIFY: Release 11.2.0.4.0 - Production on Wed Sep 13 15:36:21 2023

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

DBVERIFY - Verification starting : SEGMENT_ID = 4.4.170


DBVERIFY - Verification complete

Total Pages Examined         : 8
Total Pages Processed (Data) : 0
Total Pages Failing   (Data) : 0
Total Pages Processed (Index): 0
Total Pages Failing   (Index): 0
Total Pages Processed (Other): 0
Total Pages Processed (Seg)  : 0
Total Pages Failing   (Seg)  : 0
Total Pages Empty            : 8
Total Pages Marked Corrupt   : 0
Total Pages Influx           : 0
Total Pages Encrypted        : 0
Highest block SCN            : 0 (0.0)

 

posted @ 2023-09-13 14:53  slnngk  阅读(51)  评论(0编辑  收藏  举报