可以使用validate命令验证物理坏块和逻辑坏块
RMAN> validate database include current controlfile plus archivelog;
Starting validate at 01-MAY-18
using channel ORA_DISK_1
specification does not match any archived log in the repository
validate cancelled because there are no files to validate
Finished validate at 01-MAY-18
Starting validate at 01-MAY-18
using channel ORA_DISK_1
file 12 is excluded from whole database backup
channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
input datafile file number=00010 name=/u01/app/oracle/oradata/test/pdb1/sysaux01.dbf
input datafile file number=00009 name=/u01/app/oracle/oradata/test/pdb1/system01.dbf
input datafile file number=00011 name=/u01/app/oracle/oradata/test/pdb1/undotbs01.dbf
channel ORA_DISK_1: validation complete, elapsed time: 00:00:03
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
9 OK 0 7204 33280 2368794
File Name: /u01/app/oracle/oradata/test/pdb1/system01.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 16140
Index 0 8547
Other 0 1389
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
10 OK 0 10752 47360 2362905
File Name: /u01/app/oracle/oradata/test/pdb1/sysaux01.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 3964
Index 0 2369
Other 0 30275
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
11 OK 0 4065 12800 2368794
File Name: /u01/app/oracle/oradata/test/pdb1/undotbs01.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 0
Index 0 0
Other 0 8735
Finished validate at 01-MAY-18
RMAN>
RMAN> validate check logical database include current controlfile plus archivelog;
Starting validate at 01-MAY-18
using channel ORA_DISK_1
specification does not match any archived log in the repository
validate cancelled because there are no files to validate
Finished validate at 01-MAY-18
Starting validate at 01-MAY-18
using channel ORA_DISK_1
file 12 is excluded from whole database backup
channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
input datafile file number=00010 name=/u01/app/oracle/oradata/test/pdb1/sysaux01.dbf
input datafile file number=00009 name=/u01/app/oracle/oradata/test/pdb1/system01.dbf
input datafile file number=00011 name=/u01/app/oracle/oradata/test/pdb1/undotbs01.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
---- ------ -------------- ------------ --------------- ----------
9 OK 0 7204 33280 2368794
File Name: /u01/app/oracle/oradata/test/pdb1/system01.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 16140
Index 0 8547
Other 0 1389
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
10 OK 0 10752 47360 2362905
File Name: /u01/app/oracle/oradata/test/pdb1/sysaux01.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 3964
Index 0 2369
Other 0 30275
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
11 OK 0 4065 12800 2368794
File Name: /u01/app/oracle/oradata/test/pdb1/undotbs01.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 0
Index 0 0
Other 0 8735
Finished validate at 01-MAY-18
RMAN>
检查容器数据库中指定的数据库
RMAN> validate pluggable database pdb1;
Starting validate at 2018-05-01 19:35:09
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=66 device type=DISK
file 12 is excluded from whole database backup
channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
input datafile file number=00010 name=/u01/app/oracle/oradata/test/pdb1/sysaux01.dbf
input datafile file number=00009 name=/u01/app/oracle/oradata/test/pdb1/system01.dbf
input datafile file number=00011 name=/u01/app/oracle/oradata/test/pdb1/undotbs01.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
---- ------ -------------- ------------ --------------- ----------
9 OK 0 7204 33280 2368794
File Name: /u01/app/oracle/oradata/test/pdb1/system01.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 16140
Index 0 8547
Other 0 1389
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
10 OK 0 10752 47360 2362905
File Name: /u01/app/oracle/oradata/test/pdb1/sysaux01.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 3964
Index 0 2369
Other 0 30275
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
11 OK 0 4065 12800 2368794
File Name: /u01/app/oracle/oradata/test/pdb1/undotbs01.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 0
Index 0 0
Other 0 8735
Finished validate at 2018-05-01 19:35:10
RMAN>
检查数据文件是否可用以及数据文件中是否有坏块
RMAN> backup validate database;
Starting backup at 2018-05-01 19:42:36
using channel ORA_DISK_1
file 7 is excluded from whole database backup
file 12 is excluded from whole database backup
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/test/system01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/test/sysaux01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/test/undotbs01.dbf
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
1 OK 0 17851 104961 2370998
File Name: /u01/app/oracle/oradata/test/system01.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 69507
Index 0 13131
Other 0 4471
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
3 OK 0 19156 80675 2371434
File Name: /u01/app/oracle/oradata/test/sysaux01.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 10816
Index 0 11453
Other 0 39215
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
4 OK 0 249 8960 2371434
File Name: /u01/app/oracle/oradata/test/undotbs01.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 0
Index 0 0
Other 0 8711
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00010 name=/u01/app/oracle/oradata/test/pdb1/sysaux01.dbf
input datafile file number=00009 name=/u01/app/oracle/oradata/test/pdb1/system01.dbf
input datafile file number=00011 name=/u01/app/oracle/oradata/test/pdb1/undotbs01.dbf
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
9 OK 0 7204 33280 2371349
File Name: /u01/app/oracle/oradata/test/pdb1/system01.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 16140
Index 0 8547
Other 0 1389
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
10 OK 0 10752 47360 2371350
File Name: /u01/app/oracle/oradata/test/pdb1/sysaux01.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 3964
Index 0 2369
Other 0 30275
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
11 OK 0 4065 12800 2371350
File Name: /u01/app/oracle/oradata/test/pdb1/undotbs01.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 0
Index 0 0
Other 0 8735
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00014 name=/u01/app/oracle/oradata/test/pdb2/sysaux01.dbf
input datafile file number=00013 name=/u01/app/oracle/oradata/test/pdb2/system01.dbf
input datafile file number=00015 name=/u01/app/oracle/oradata/test/pdb2/undotbs01.dbf
input datafile file number=00016 name=/u01/app/oracle/oradata/test/pdb2/users01.dbf
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
13 OK 0 7301 32000 1721715
File Name: /u01/app/oracle/oradata/test/pdb2/system01.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 15079
Index 0 8239
Other 0 1381
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
14 OK 0 7768 42240 1477258
File Name: /u01/app/oracle/oradata/test/pdb2/sysaux01.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 3528
Index 0 1939
Other 0 29005
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
15 OK 0 7866 12800 1478542
File Name: /u01/app/oracle/oradata/test/pdb2/undotbs01.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 0
Index 0 0
Other 0 4934
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
16 OK 0 513 640 1445660
File Name: /u01/app/oracle/oradata/test/pdb2/users01.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 0
Index 0 0
Other 0 127
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00006 name=/u01/app/oracle/oradata/test/pdbseed/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/test/pdbseed/system01.dbf
input datafile file number=00008 name=/u01/app/oracle/oradata/test/pdbseed/undotbs01.dbf
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
5 OK 0 7316 32000 1441911
File Name: /u01/app/oracle/oradata/test/pdbseed/system01.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 15068
Index 0 8237
Other 0 1379
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
6 OK 0 7902 42240 1441629
File Name: /u01/app/oracle/oradata/test/pdbseed/sysaux01.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 3483
Index 0 1929
Other 0 28926
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
8 OK 0 7983 12800 1441909
File Name: /u01/app/oracle/oradata/test/pdbseed/undotbs01.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 0
Index 0 0
Other 0 4817
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: backup set 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 1160
Finished backup at 2018-05-01 19:43:56
RMAN>
检查是否有逻辑坏块
backup validate check logical database;
RMAN> backup validate check logical database;
Starting backup at 2018-05-01 19:43:24
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=72 device type=DISK
file 12 is excluded from whole database backup
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00010 name=/u01/app/oracle/oradata/test/pdb1/sysaux01.dbf
input datafile file number=00009 name=/u01/app/oracle/oradata/test/pdb1/system01.dbf
input datafile file number=00011 name=/u01/app/oracle/oradata/test/pdb1/undotbs01.dbf
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
9 OK 0 7204 33280 2371349
File Name: /u01/app/oracle/oradata/test/pdb1/system01.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 16140
Index 0 8547
Other 0 1389
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
10 OK 0 10752 47360 2371350
File Name: /u01/app/oracle/oradata/test/pdb1/sysaux01.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 3964
Index 0 2369
Other 0 30275
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
11 OK 0 4065 12800 2371350
File Name: /u01/app/oracle/oradata/test/pdb1/undotbs01.dbf
Block Type Blocks Failing Blocks Processed
---------- -------------- ----------------
Data 0 0
Index 0 0
Other 0 8735
Finished backup at 2018-05-01 19:43:25
END。。