Databases Reference
In-Depth Information
RMAN> validate spfile;
RMAN> validate backupset <primary_key_value>;
RMAN> validate recovery area;
If you're using the Oracle Database 12c pluggable database feature, you can validate specific databases within the
container. While connected as
SYS
to the root container, validate any associated pluggable databases:
RMAN> validate pluggable database salespdb;
If RMAN detects any corrupt blocks, the
V$DATABASE_BLOCK_CORRUPTION
is populated. This view contains
information on the file number, block number, and number of blocks affected. You can use this information to
perform a block-level recovery (see Chapter 19 for more details).
■
physical corruption is a change to a block, such that its contents don't match the physical format that Oracle
expects. By default, rMaN checks for physical corruption when backing up, restoring, and validating data files. With
logical corruption, a block is in the correct format, but the contents aren't consistent with what Oracle expects, such as
in a row piece or an index entry.
Note
Using BACKUP…VALIDATE
The
BACKUP...VALIDATE
command is very similar to the
VALIDATE
command, in that it can check to see if data files are
available and if the data files contain any corrupt blocks; for example,
RMAN> backup validate database;
This command doesn't actually create any backup files; it only reads the data files and checks for corruption.
Like the
VALIDATE
command,
BACKUP VALIDATE
, by default, only checks for physical corruption. You can instruct it to
check as well for logical corruption, as shown:
RMAN> backup validate check logical database;
Here are some variations of the
BACKUP...VALIDATE
command:
RMAN> backup validate database current controlfile;
RMAN> backup validate check logical database current controlfile plus archivelog;
Also like the
VALIDATE
command,
BACKUP...VALIDATE
will populate
V$DATABASE_BLOCK_CORRUPTION
if it detects
any corrupt blocks. The information in this view can be used to determine which blocks can potentially be restored by
block-level recovery (see Chapter 19 for more details.
Using RESTORE…VALIDATE
The
RESTORE...VALIDATE
command is used to verify backup files that would be used in a restore operation. This
command validates backup sets, data file copies, and archive redo log files:
RMAN> restore validate database;
No actual files are restored when using
RESTORE...VALIDATE
. This means that you can run the command while
the database is online and available.