what is RMAN validate command

In Oracle RMAN there are three different ways to check Data files, Tablespaces, Archive redo logs, control files, SPFILE, Backup set pieces or even an entire pluggable database for corruption like Missing files or even for any physical or logical corruption.

These three different ways are –

  1. RMAN Validate command
  2. RMAN Backup…Validate command, and
  3. RMAN Restore…Validate command

In this tutorial we will focus on RMAN validate command and in the next tutorial we will explore the remaining commands.

VALIDATE command

VALIDATE command checks the SPFILE, CONTROL FILE, Data File, Archive Redo logs and backup set pieces for corruptions like missing file or any physical corruption.

#Connect with your target database using RMAN 
C> RMAN Target /

Validate the database

RMAN>VALIDATE database;

This command will validate all the data files of your database, Including data files of container database as well as all the pluggable databases. This will also validate the current control file and SPFILE.

VALIDATE control files

Let’s say you just want to validate the control files of your database. You can do so like this –

RMAN> VALIDATE current controlfile;

VALIDATE archive logs

Similar to control file you can validate archive logs as well-

RMAN> VALIDATE archivelog all;

This command will validate all the archive redo log files.

You can combine all these three commands into one and check your database, control file and archive redo logs just by issuing only one command like this –

RMAN>VAlIDATE database INCLUDE current controlfile PLUS archivelog;

This command will run all the integrity checks at once.

CHECK LOGICAL clause

So far the command that I have showed will only check for corruptions like Missing file or Physical corruption. What if we want to check our database or control file against logical corruption. We can do that by simply including “check logical” clause with our validate command like this –

Let’s say you want to check your database for Physical as well as logical corruption. You can do that like so-

RMAN>VALIDATE CHECK LOGICAL database;

This command will check the database for missing files as well as Physical and Logical corruptions.

Similarly you can take this command

RMAN>VAlIDATE database INCLUDE current controlfile PLUS archivelog;

And put “check logical” clause in it. After that it will also validate all the the mentioned components against missing file, physical corruption as well as logical corruption.

Few More VALIDATE commands

You can validate the copy of the database like this

RMAN> validate copy of database;

You can also VALIDATE a tablespace

RMAN> validate tablespace system;

Also VALIDATE the SPFILE like this

RMAN> validate spfile;

That’s a detailed tutorial on VALIDATE command. Hope you liked it.

Thanks and have a great day