Oracle 11g 通过 RMAN 检查数据文件、控制文件、参数文件的状态和是否存在坏块...

1、验证整个数据库的数据文件和控制文件、参数文件

[oracle@DB1 bk]$ rman target /


Recovery Manager: Release 12.1.0.2.0 - Production on Thu Dec 10 16:53:08 2015


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


connected to target database: SITE (DBID=4224792395)


RMAN> validate database;


Starting validate at 10-DEC-15
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=2193 device type=DISK
channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
input datafile file number=00005 name=/oradata/oradata/site/site/ts_site_data01.dbf
input datafile file number=00006 name=/oradata/oradata/site/site/ts_site_index01.dbf
input datafile file number=00003 name=/oradata/oradata/site/site/undotbs01.dbf
input datafile file number=00002 name=/oradata/oradata/site/site/sysaux01.dbf
input datafile file number=00001 name=/oradata/oradata/site/site/system01.dbf
input datafile file number=00004 name=/oradata/oradata/site/site/users01.dbf
channel ORA_DISK_1: validation complete, elapsed time: 00:01:25
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
1    OK     0              16928        101120          10310730  
  File Name: /oradata/oradata/site/site/system01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              66094           
  Index      0              14016           
  Other      0              4082            


File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
2    OK     0              29630        135680          10312535  
  File Name: /oradata/oradata/site/site/sysaux01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              33036           
  Index      0              28516           
  Other      0              44498           


File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
3    OK     0              327          168320          10316052  
  File Name: /oradata/oradata/site/site/undotbs01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              0               
  Index      0              0               
  Other      0              167993          


File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
4    OK     0              477          640             378531    
  File Name: /oradata/oradata/site/site/users01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              15              
  Index      0              3               
  Other      0              145             


File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
5    OK     0              4190015      4193280         10316052  
  File Name: /oradata/oradata/site/site/ts_site_data01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              2149            
  Index      0              851             
  Other      0              265             


File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
6    OK     0              4193153      4193280         758918    
  File Name: /oradata/oradata/site/site/ts_site_index01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              0               
  Index      0              0               
  Other      0              127             


channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
including current control file for validation
including current SPFILE in backup set
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
List of Control File and SPFILE
===============================
File Type    Status Blocks Failing Blocks Examined
------------ ------ -------------- ---------------
SPFILE       OK     0              2               
Control File OK     0              1106            
Finished validate at 10-DEC-15

2、验证某个数据块

RMAN> VALIDATE DATAFILE 1 BLOCK 10;


Starting validate at 2015-12-10 17:19:08
using channel ORA_DISK_1
channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
input datafile file number=00001 name=/ORADATA/oradata/fire/system01.dbf
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
1    OK     0              0            1               24        
  File Name: /ORADATA/oradata/fire/system01.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              0               
  Index      0              0               
  Other      0              1               


Finished validate at 2015-12-10 17:19:09


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26506993/viewspace-1869875/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26506993/viewspace-1869875/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值