Category - RMAN

RMAN Practices - PART 6- Back to Basics

RMAN Practices - PART 5- Back to Basics

Validating Database Files and Backups
Below article  explains how to check the integrity of database files and backups.

Purpose of RMAN Validation

The main purpose of RMAN validation is to check for corrupt blocks and missing files and whether backups can be restored.

You can use the following RMAN commands to perform validation:

VALIDATE    
To validate all underline objects of database.                          

BACKUP ... VALIDATE  
To validate al datafile and archivelogs before taking Backup.

RESTORE ... VALIDATE
To validate Backupset,Piece before restoring datafiles and archivelogs.

About Checksums and Corrupt Blocks
=======================

A corrupt block is a block that has been changed so that it differs from what Oracle Database expects to find.

DB_BLOCK_CHECKSUM is a database initialization parameter that controls the writing of checksums for the blocks in data files and online redo log files in the database (not backups).
If DB_BLOCK_CHECKSUM is typical, then the database computes a checksum for each block during normal operations and stores it in the header of the block before writing it to disk.
When the database reads the block from disk later, it recomputes the checksum and compares it to the stored value. If the values do not match, then the block is corrupt.

By default, the BACKUP command computes a checksum for each block and stores it in the backup.
The BACKUP command ignores the values of DB_BLOCK_CHECKSUM because this initialization parameter applies to data files in the database, not backups.

About Physical and Logical Block Corruption
=========================

In a physical corruption, which is also called a media corruption, the database does not recognize the block at all: the checksum is invalid,
the block contains all zeros, or the header and footer of the block do not match.

Note:

By default, the BACKUP command computes a checksum for each block and stores it in the backup.
If you specify the NOCHECKSUM option, then RMAN does not perform a checksum of the blocks when creating the backup.

In a logical corruption, the contents of the block are logically inconsistent. Examples of logical corruption include corruption of a row piece or index entry.
If RMAN detects logical corruption, then it logs the block in the alert log and server session trace file.

By default, RMAN does not check for logical corruption.
If you specify CHECK LOGICAL on the BACKUP command, however, then RMAN tests data and index blocks for logical corruption,
such as corruption of a row piece or index entry, and log them in the alert log located in the Automatic Diagnostic Repository (ADR).
If you use RMAN with the following configuration when backing up or restoring files, then it detects all types of block corruption that are possible to detect:

In the initialization parameter file of a database,
set DB_BLOCK_CHECKSUM=typical so that the database calculates data file checksums automatically (not for backups, but for data files in use by the database)
Do not precede the BACKUP command with SET MAXCORRUPT so that RMAN does not tolerate any unmarked block corruptions.
In a BACKUP command, do not specify the NOCHECKSUM option so that RMAN calculates a checksum when writing backups
In BACKUP and RESTORE commands, specify the CHECK LOGICAL option so that RMAN checks for logical and physical corruption

About Limits for Corrupt Blocks in RMAN Backups
==============================

You can use the SET MAXCORRUPT command to set the total number of unmarked corruptions permitted in a file for RMAN backups.
The default is zero, meaning that RMAN does not tolerate unmarked corrupt blocks of any kind.

If the MAXCORRUPT limit is exceeded when RMAN encounters an unmarked corrupt block during a backup, then RMAN terminates the backup.
Otherwise, RMAN writes the newly detected corrupt block to the backup with a special header indicating that the block is marked corrupt.
You can use the VALIDATE command to determine which blocks are marked as corrupt and to find any unmarked corrupt blocks.

Because RMAN allows marked corrupt blocks in a backup, and because RMAN can be instructed to allow unmarked corrupt blocks to be marked as corrupt in the backup (when MAXCORRUPT is used),
it is possible to restore a data file that has several blocks marked as corrupt.
If you backup this restored data file (assuming no new corruptions have happened), even without MAXCORRUPT setting, the backup succeeds.
This is because the previously marked corruptions do not stop RMAN from completing the backup.

About Detecting Block Corruption
====================

Oracle Database supports different techniques for detecting, repairing, and monitoring block corruption.

The technique depends on whether the corruption is interblock corruption or intrablock corruption.
In intrablock corruption, the corruption occurs within the block itself. This corruption can be either physical or logical.
In an interblock corruption, the corruption occurs between blocks and can only be logical.

For example, the V$DATABASE_BLOCK_CORRUPTION view records intrablock corruptions, while the Automatic Diagnostic Repository (ADR) tracks all types of corruptions.



Checking for Block Corruption with the VALIDATE Command
====================================

You can use the VALIDATE command to manually check for physical and logical corruptions in database files.

This command performs the same types of checks as BACKUP VALIDATE, but VALIDATE can check a larger selection of objects.
For example, you can validate individual blocks with the VALIDATE DATAFILE ... BLOCK command.

To specify a copy number for the backup piece being validated, run the VALIDATE FROM COPY NUMBER command.

When validating whole files, RMAN checks every block of the input files.
If the backup validation discovers previously unmarked corrupt blocks, then RMAN updates the V$DATABASE_BLOCK_CORRUPTION view with rows describing the corruptions.

Use VALIDATE BACKUPSET when you suspect that one or more backup pieces in a backup set are missing or have been damaged.
This command checks every block in a backup set to ensure that the backup can be restored. If RMAN finds block corruption, then it issues an error and terminates the validation.
The command VALIDATE BACKUPSET enables you to choose which backups to check, whereas the VALIDATE option of the RESTORE command lets RMAN choose.

Validating Database Files with BACKUP VALIDATE
===================================

You can also use the BACKUP VALIDATE command to perform validation.

This command can perform the following tasks:

1=> Check data files for physical and logical block corruption
2=> Confirm that all database files exist and are in the correct locations

When you run BACKUP VALIDATE, RMAN reads the files to be backed up in their entirety, as it does during a real backup.
RMAN does not, however, actually produce any backup sets or image copies.

You cannot use the BACKUPSET, MAXCORRUPT, or PROXY parameters with BACKUP VALIDATE.
To validate specific backup sets, run the VALIDATE command.

Validating Backups Before Restoring Them
===================================

You can run RESTORE...VALIDATE to test whether RMAN can restore a specific file or set of files from a backup.
RMAN chooses which backups to use.

The database must be mounted or open for this command.
You do not have to take data files offline when validating the restore of data files, 
because validation of backups of the data files only reads the backups and does not affect the production data files.

When validating files on disk or tape, RMAN reads all blocks in the backup piece or image copy. RMAN also validates offsite backups.
The validation is identical to a real restore operation except that RMAN does not write output files.

VALIDATE

Purpose

Use the VALIDATE command to check for corrupt blocks and missing files, or to determine whether a backup set can be restored.

If VALIDATE detects a problem during validation, then RMAN displays it and triggers execution of a failure assessment.
If a failure is detected, then RMAN logs it into the Automated Diagnostic Repository. You can use LIST FAILURE to view the failures.

Usage Notes
By default, the VALIDATE command checks for physical corruption only. You can specify CHECK LOGICAL to check for logical corruption as well.
RMAN populates the V$DATABASE_BLOCK_CORRUPTION view with its findings.
The VALIDATE command checks for intrablock corruptions only.

[oracle@racsetn1 ~]$ rman target 

connected to target database: TNT (DBID=1427195521)

RMAN> validate database plus archivelog;

Starting validate at 25-OCT-22
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=287 instance=TNT1 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=37 instance=TNT1 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=164 instance=TNT1 device type=DISK
channel ORA_DISK_1: starting validation of archived log
channel ORA_DISK_1: specifying archived log(s) for validation
input archived log thread=1 sequence=23 RECID=38 STAMP=1117471381
input archived log thread=2 sequence=20 RECID=39 STAMP=1117471387
channel ORA_DISK_2: starting validation of archived log
channel ORA_DISK_2: specifying archived log(s) for validation
....
.....
channel ORA_DISK_1: validation complete, elapsed time: 00:00:02
List of Archived Logs
=====================
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
1    23      OK     0              57068           +FRA/TNT/ARCHIVELOG/2022_10_07/thread_1_seq_23.754.1117471379
2    20      OK     0              33798           +FRA/TNT/ARCHIVELOG/2022_10_07/thread_2_seq_20.764.1117471387
channel ORA_DISK_1: starting validation of archived log
channel ORA_DISK_1: specifying archived log(s) for validation
input archived log thread=1 sequence=27 RECID=46 STAMP=1119022696
channel ORA_DISK_2: validation complete, elapsed time: 00:00:01
List of Archived Logs
=====================
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
....
....
=====================
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
2    23      OK     0              18057           +FRA/TNT/ARCHIVELOG/2022_10_25/thread_2_seq_23.751.1119022689
1    25      OK     0              1               +FRA/TNT/ARCHIVELOG/2022_10_22/thread_1_seq_25.742.1118785859
1    26      OK     0              12241           +FRA/TNT/ARCHIVELOG/2022_10_25/thread_1_seq_26.763.1119022693
Finished validate at 25-OCT-22

Starting validate at 25-OCT-22
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
input datafile file number=00004 name=+DATA/TNT/DATAFILE/undotbs1.284.1115903031
input datafile file number=00002 name=+DATA/TNT/DATAFILE/ro_ts.294.1117385373
input datafile file number=00008 name=+DATA/TNT/DATAFILE/ts_nolog.295.1117461389
channel ORA_DISK_2: starting validation of datafile
channel ORA_DISK_2: specifying datafile(s) for validation
input datafile file number=00003 name=+DATA/TNT/DATAFILE/sysaux.283.1115903017
.....
.....
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
2    OK     0              12665        12800           2639753   
  File Name: +DATA/TNT/DATAFILE/ro_ts.294.1117385373
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              5               
  Index      0              0               
  Other      0              130             

.....
....

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
8    OK     0              9779         12800           2650290   
  File Name: +DATA/TNT/DATAFILE/ts_nolog.295.1117461389
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              2824            
  Index      0              0               
  Other      0              197             

channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
including current SPFILE in backup set
channel ORA_DISK_3: validation complete, elapsed time: 00:00:03
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
1    OK     0              17222        117770          2998220   
  File Name: +DATA/TNT/DATAFILE/system.282.1115902991
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              82135           
  Index      0              13309           
  Other      0              5094            

channel ORA_DISK_3: starting validation of datafile
channel ORA_DISK_3: specifying datafile(s) for validation
channel ORA_DISK_1: validation complete, elapsed time: 00:00:00
List of Control File and SPFILE
===============================
File Type    Status Blocks Failing Blocks Examined
------------ ------ -------------- ---------------
SPFILE       OK     0              2               
channel ORA_DISK_2: validation complete, elapsed time: 00:00:04
List of Datafiles
=================
.......
including current control file for validation
channel ORA_DISK_3: validation complete, elapsed time: 00:00:01
List of Control File and SPFILE
===============================
File Type    Status Blocks Failing Blocks Examined
------------ ------ -------------- ---------------
Control File OK     0              674             
Finished validate at 25-OCT-22

RMAN> exit


Recovery Manager complete.
[oracle@racsetn1 ~]$ 

[oracle@racsetn1 ~]$ sqlplus "/as sysdba"

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> select count(*) from V$DATABASE_BLOCK_CORRUPTION;
  COUNT(*)
----------
	 0

SQL>  exit

[oracle@racsetn1 ~]$ rman target /

RMAN> validate CHECK LOGICAL database plus archivelog;

Starting validate at 25-OCT-22
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=291 instance=TNT1 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=37 instance=TNT1 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=165 instance=TNT1 device type=DISK
channel ORA_DISK_1: starting validation of archived log
channel ORA_DISK_1: specifying archived log(s) for validation
input archived log thread=1 sequence=23 RECID=38 STAMP=1117471381
input archived log thread=2 sequence=20 RECID=39 STAMP=1117471387
channel ORA_DISK_2: starting validation of archived log
channel ORA_DISK_2: specifying archived log(s) for validation
...
.....
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
List of Archived Logs
=====================
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
1    23      OK     0              57068           +FRA/TNT/ARCHIVELOG/2022_10_07/thread_1_seq_23.754.1117471379
2    20      OK     0              33798           +FRA/TNT/ARCHIVELOG/2022_10_07/thread_2_seq_20.764.1117471387
channel ORA_DISK_1: starting validation of archived log
channel ORA_DISK_1: specifying archived log(s) for validation
input archived log thread=1 sequence=27 RECID=46 STAMP=1119022696
channel ORA_DISK_2: validation complete, elapsed time: 00:00:01
.....
.....
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
1    27      OK     0              1               +FRA/TNT/ARCHIVELOG/2022_10_25/thread_1_seq_27.744.1119022695
channel ORA_DISK_3: validation complete, elapsed time: 00:00:00
List of Archived Logs
=====================
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
2    23      OK     0              18057           +FRA/TNT/ARCHIVELOG/2022_10_25/thread_2_seq_23.751.1119022689
1    25      OK     0              1               +FRA/TNT/ARCHIVELOG/2022_10_22/thread_1_seq_25.742.1118785859
1    26      OK     0              12241           +FRA/TNT/ARCHIVELOG/2022_10_25/thread_1_seq_26.763.1119022693
Finished validate at 25-OCT-22

Starting validate at 25-OCT-22
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
input datafile file number=00004 name=+DATA/TNT/DATAFILE/undotbs1.284.1115903031
input datafile file number=00002 name=+DATA/TNT/DATAFILE/ro_ts.294.1117385373
input datafile file number=00008 name=+DATA/TNT/DATAFILE/ts_nolog.295.1117461389
channel ORA_DISK_2: starting validation of datafile
channel ORA_DISK_2: specifying datafile(s) for validation
...
...

List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
2    OK     0              12665        12800           2639753   
  File Name: +DATA/TNT/DATAFILE/ro_ts.294.1117385373
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              5               
  Index      0              0               
  Other      0              130             

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
4    OK     0              271          42880           2999023   
  File Name: +DATA/TNT/DATAFILE/undotbs1.284.1115903031
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              0               
  Index      0              0               
  Other      0              42609           
....
....

List of Control File and SPFILE
===============================
File Type    Status Blocks Failing Blocks Examined
------------ ------ -------------- ---------------
SPFILE       OK     0              2               
including current control file for validation
channel ORA_DISK_2: validation complete, elapsed time: 00:00:01
List of Control File and SPFILE
===============================
File Type    Status Blocks Failing Blocks Examined
------------ ------ -------------- ---------------
Control File OK     0              674             
Finished validate at 25-OCT-22

RMAN> exit
Recovery Manager complete.

[oracle@racsetn1 ~]$ rman target /

connected to target database: TNT (DBID=1427195521)


RMAN> validate datafile 5;

Starting validate at 25-OCT-22
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
input datafile file number=00005 name=+DATA/TNT/DATAFILE/undotbs2.290.1115904057
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
5    OK     0              513          6400            2994200   
  File Name: +DATA/TNT/DATAFILE/undotbs2.290.1115904057
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              0               
  Index      0              0               
  Other      0              5887            

Finished validate at 25-OCT-22

RMAN> validate archivelog all;

Starting validate at 25-OCT-22
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
channel ORA_DISK_1: starting validation of archived log
channel ORA_DISK_1: specifying archived log(s) for validation
input archived log thread=1 sequence=23 RECID=38 STAMP=1117471381
input archived log thread=2 sequence=20 RECID=39 STAMP=1117471387
channel ORA_DISK_2: starting validation of archived log
channel ORA_DISK_2: specifying archived log(s) for validation
input archived log thread=2 sequence=21 RECID=40 STAMP=1117471389
input archived log thread=1 sequence=24 RECID=42 STAMP=1118785857
input archived log thread=2 sequence=22 RECID=41 STAMP=1118785853
...
...
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
List of Archived Logs
=====================
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
1    23      OK     0              57068           +FRA/TNT/ARCHIVELOG/2022_10_07/thread_1_seq_23.754.1117471379
2    20      OK     0              33798           +FRA/TNT/ARCHIVELOG/2022_10_07/thread_2_seq_20.764.1117471387
channel ORA_DISK_1: starting validation of archived log
channel ORA_DISK_1: specifying archived log(s) for validation
input archived log thread=1 sequence=27 RECID=46 STAMP=1119022696
channel ORA_DISK_2: validation complete, elapsed time: 00:00:01
List of Archived Logs
=====================
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
1    24      OK     0              41382           +FRA/TNT/ARCHIVELOG/2022_10_22/thread_1_seq_24.759.1118785855
2    21      OK     0              1               +FRA/TNT/ARCHIVELOG/2022_10_07/thread_2_seq_21.757.1117471389
2    22      OK     0              40927           +FRA/TNT/ARCHIVELOG/2022_10_22/thread_2_seq_22.769.1118785851
channel ORA_DISK_3: validation complete, elapsed time: 00:00:01
...
....
List of Archived Logs
=====================
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
1    27      OK     0              1               +FRA/TNT/ARCHIVELOG/2022_10_25/thread_1_seq_27.744.1119022695
Finished validate at 25-OCT-22


RMAN>  validate archivelog from sequence 20  until sequence 30 thread 1;

Starting validate at 25-OCT-22
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
channel ORA_DISK_1: starting validation of archived log
channel ORA_DISK_1: specifying archived log(s) for validation
input archived log thread=1 sequence=23 RECID=38 STAMP=1117471381
channel ORA_DISK_2: starting validation of archived log
channel ORA_DISK_2: specifying archived log(s) for validation
input archived log thread=1 sequence=24 RECID=42 STAMP=1118785857
channel ORA_DISK_3: starting validation of archived log
channel ORA_DISK_3: specifying archived log(s) for validation
input archived log thread=1 sequence=25 RECID=43 STAMP=1118785858
input archived log thread=1 sequence=26 RECID=45 STAMP=1119022693
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
List of Archived Logs
=====================
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
1    23      OK     0              57068           +FRA/TNT/ARCHIVELOG/2022_10_07/thread_1_seq_23.754.1117471379
channel ORA_DISK_1: starting validation of archived log
channel ORA_DISK_1: specifying archived log(s) for validation
input archived log thread=1 sequence=27 RECID=46 STAMP=1119022696
channel ORA_DISK_2: validation complete, elapsed time: 00:00:01
List of Archived Logs
=====================
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
1    24      OK     0              41382           +FRA/TNT/ARCHIVELOG/2022_10_22/thread_1_seq_24.759.1118785855
channel ORA_DISK_3: validation complete, elapsed time: 00:00:00
List of Archived Logs
=====================
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
1    25      OK     0              1               +FRA/TNT/ARCHIVELOG/2022_10_22/thread_1_seq_25.742.1118785859
1    26      OK     0              12241           +FRA/TNT/ARCHIVELOG/2022_10_25/thread_1_seq_26.763.1119022693
channel ORA_DISK_1: validation complete, elapsed time: 00:00:00
List of Archived Logs
=====================
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
1    27      OK     0              1               +FRA/TNT/ARCHIVELOG/2022_10_25/thread_1_seq_27.744.1119022695
Finished validate at 25-OCT-22

RMAN> list backupset;
List of Backup Sets
===================
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
237     Full    10.64M     DISK        00:00:01     07-OCT-22      
        BP Key: 292   Status: AVAILABLE  Compressed: NO  Tag: TAG20221007T142733
        Piece Name: +FRA/TNT/AUTOBACKUP/2022_10_07/s_1117463254.750.1117463255
  SPFILE Included: Modification time: 07-OCT-22
  SPFILE db_unique_name: TNT
  Control File Included: Ckp SCN: 2648164      Ckp time: 07-OCT-22

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
240     Full    23.69M     DISK        00:00:01     07-OCT-22      
        BP Key: 295   Status: EXPIRED  Compressed: NO  Tag: TAG20221007T150728
        Piece Name: /ora_home/bkp/file_8_TNT9319mb1g291
  List of Datafiles in backup set 240
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  8       Full 2652077    07-OCT-22              NO    +DATA/TNT/DATAFILE/ts_nolog.295.1117461389

RMAN> validate backupset 237;

Starting validate at 25-OCT-22
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
channel ORA_DISK_1: starting validation of datafile backup set
channel ORA_DISK_1: reading from backup piece +FRA/TNT/AUTOBACKUP/2022_10_07/s_1117463254.750.1117463255
channel ORA_DISK_1: piece handle=+FRA/TNT/AUTOBACKUP/2022_10_07/s_1117463254.750.1117463255 tag=TAG20221007T142733
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
Finished validate at 25-OCT-22

RMAN> validate backupset 240;

Starting validate at 25-OCT-22
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of validate command at 10/25/2022 15:49:42
RMAN-06160: no backup pieces found for backup set key: 240


RMAN> validate CURRENT CONTROLFILE;

Starting validate at 25-OCT-22
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
including current control file for validation
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
List of Control File and SPFILE
===============================
File Type    Status Blocks Failing Blocks Examined
------------ ------ -------------- ---------------
Control File OK     0              674             
Finished validate at 25-OCT-22

RMAN> 

RMAN> list copy;

specification does not match any control file copy in the repository
List of Datafile Copies
=======================

Key     File S Completion Time Ckp SCN    Ckp Time        Sparse
------- ---- - --------------- ---------- --------------- ------
13      4    A 25-OCT-22       3002896    25-OCT-22       NO    
        Name: +FRA/TNT/DATAFILE/undotbs1.768.1119023467
        Tag: TAG20221025T155105

List of Archived Log Copies for database with db_unique_name TNT
=====================================================================

Key     Thrd Seq     S Low Time 
------- ---- ------- - ---------
38      1    23      A 07-OCT-22
        Name: +FRA/TNT/ARCHIVELOG/2022_10_07/thread_1_seq_23.754.1117471379
...
...

RMAN> validate datafilecopy all;

Starting validate at 25-OCT-22
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: including datafile copy of datafile 00004 in backup set
input file name=+FRA/TNT/DATAFILE/undotbs1.768.1119023467
channel ORA_DISK_1: validation complete, elapsed time: 00:00:03
List of Datafile Copies
=======================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
4    OK     0              270          42880           3001997   
  File Name: +FRA/TNT/DATAFILE/undotbs1.768.1119023467
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              0               
  Index      0              0               
  Other      0              42610           

Finished validate at 25-OCT-22

RMAN> validate RECOVERY AREA;

Starting validate at 25-OCT-22
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
RMAN-06917: skipping backup sets; RECOVERY FILES, RECOVERY AREA or DB_RECOVERY_FILE_DEST option cannot validate backup set
channel ORA_DISK_1: starting validation of archived log
channel ORA_DISK_1: specifying archived log(s) for validation
input archived log thread=1 sequence=23 RECID=38 STAMP=1117471381
input archived log thread=2 sequence=20 RECID=39 STAMP=1117471387
channel ORA_DISK_2: starting validation of archived log
channel ORA_DISK_2: specifying archived log(s) for validation
....
....
List of Archived Logs
=====================
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
1    23      OK     0              57068           +FRA/TNT/ARCHIVELOG/2022_10_07/thread_1_seq_23.754.1117471379
2    20      OK     0              33798           +FRA/TNT/ARCHIVELOG/2022_10_07/thread_2_seq_20.764.1117471387
channel ORA_DISK_1: starting validation of archived log
channel ORA_DISK_1: specifying archived log(s) for validation
input archived log thread=1 sequence=27 RECID=46 STAMP=1119022696
channel ORA_DISK_2: validation complete, elapsed time: 00:00:01
..
...
channel ORA_DISK_2: validation complete, elapsed time: 00:00:04
List of Datafile Copies
=======================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
4    OK     0              270          42880           3001997   
  File Name: +FRA/TNT/DATAFILE/undotbs1.768.1119023467
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              0               
  Index      0              0               
  Other      0              42610           

Finished validate at 25-OCT-22

RMAN> validate RECOVERY FILES;

Starting validate at 25-OCT-22
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
RMAN-06917: skipping backup sets; RECOVERY FILES, RECOVERY AREA or DB_RECOVERY_FILE_DEST option cannot validate backup set
channel ORA_DISK_1: starting validation of archived log
channel ORA_DISK_1: specifying archived log(s) for validation
input archived log thread=1 sequence=23 RECID=38 STAMP=1117471381
input archived log thread=2 sequence=20 RECID=39 STAMP=1117471387
channel ORA_DISK_2: starting validation of archived log
channel ORA_DISK_2: specifying archived log(s) for validation
...
....

List of Archived Logs
=====================
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
1    23      OK     0              57068           +FRA/TNT/ARCHIVELOG/2022_10_07/thread_1_seq_23.754.1117471379
2    20      OK     0              33798           +FRA/TNT/ARCHIVELOG/2022_10_07/thread_2_seq_20.764.1117471387
channel ORA_DISK_1: starting validation of archived log
channel ORA_DISK_1: specifying archived log(s) for validation
input archived log thread=1 sequence=27 RECID=46 STAMP=1119022696
channel ORA_DISK_2: validation complete, elapsed time: 00:00:01
List of Archived Logs
=====================
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
1    24      OK     0              41382           +FRA/TNT/ARCHIVELOG/2022_10_22/thread_1_seq_24.759.1118785855
2    21      OK     0              1               +FRA/TNT/ARCHIVELOG/2022_10_07/thread_2_seq_21.757.1117471389
2    22      OK     0              40927           +FRA/TNT/ARCHIVELOG/2022_10_22/thread_2_seq_22.769.1118785851
channel ORA_DISK_2: starting validation of datafile
channel ORA_DISK_2: including datafile copy of datafile 00004 in backup set
input file name=+FRA/TNT/DATAFILE/undotbs1.768.1119023467
channel ORA_DISK_3: validation complete, elapsed time: 00:00:01
...
...
List of Archived Logs
=====================
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
1    27      OK     0              1               +FRA/TNT/ARCHIVELOG/2022_10_25/thread_1_seq_27.744.1119022695
channel ORA_DISK_2: validation complete, elapsed time: 00:00:03
List of Datafile Copies
=======================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
4    OK     0              270          42880           3001997   
  File Name: +FRA/TNT/DATAFILE/undotbs1.768.1119023467
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              0               
  Index      0              0               
  Other      0              42610           

Finished validate at 25-OCT-22



RMAN> report schema;                               
Report of database schema for database with db_unique_name TNT

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    920      SYSTEM               YES     +DATA/TNT/DATAFILE/system.282.1115902991
2    100      RO_TS                NO      +DATA/TNT/DATAFILE/ro_ts.294.1117385373
3    630      SYSAUX               NO      +DATA/TNT/DATAFILE/sysaux.283.1115903017
4    335      UNDOTBS1             YES     +DATA/TNT/DATAFILE/undotbs1.284.1115903031
5    50       UNDOTBS2             YES     +DATA/TNT/DATAFILE/undotbs2.290.1115904057
7    16       USERS                NO      +DATA/TNT/DATAFILE/users.285.1115903033
8    100      TS_NOLOG             NO      +DATA/TNT/DATAFILE/ts_nolog.295.1117461389

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    35       TEMP                 32767       +DATA/TNT/TEMPFILE/temp.289.1115903147

RMAN> validate tablespace TS_NOLOG;

Starting validate at 25-OCT-22
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
input datafile file number=00008 name=+DATA/TNT/DATAFILE/ts_nolog.295.1117461389
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
8    OK     0              9779         12800           2650290   
  File Name: +DATA/TNT/DATAFILE/ts_nolog.295.1117461389
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              2824            
  Index      0              0               
  Other      0              197             

Finished validate at 25-OCT-22

RMAN> validate SPFILE;

Starting validate at 25-OCT-22
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
including current SPFILE in backup set
channel ORA_DISK_1: validation complete, elapsed time: 00:00:00
List of Control File and SPFILE
===============================
File Type    Status Blocks Failing Blocks Examined
------------ ------ -------------- ---------------
SPFILE       OK     0              2               
Finished validate at 25-OCT-22
RMAN> 

BACKUP ... VALIDATE

This command is used to validate content of database before taking backup.By default only Physical check will happen . 
For Logical we need to add LOGICAL clause.

RMAN> backup validate database;

Starting backup at 26-OCT-22
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
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=+DATA/TNT/DATAFILE/system.282.1115902991
channel ORA_DISK_2: starting full datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
input datafile file number=00003 name=+DATA/TNT/DATAFILE/sysaux.283.1115903017
...
...
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
1    OK     0              17217        117770          3116098   
  File Name: +DATA/TNT/DATAFILE/system.282.1115902991
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              82137           
  Index      0              13312           
  Other      0              5094            

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
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:06
List of Datafiles
=================
....
....
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:00
List of Control File and SPFILE
===============================
File Type    Status Blocks Failing Blocks Examined
------------ ------ -------------- ---------------
Control File OK     0              674             
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:00
List of Control File and SPFILE
===============================
File Type    Status Blocks Failing Blocks Examined
------------ ------ -------------- ---------------
SPFILE       OK     0              2               
Finished backup at 26-OCT-22

RMAN> backup validate copy of database;

Starting backup at 26-OCT-22
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
no copy of datafile 1 found
no copy of datafile 2 found
no copy of datafile 3 found
no copy of datafile 5 found
no copy of datafile 7 found
no copy of datafile 8 found
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: including datafile copy of datafile 00004 in backup set
input file name=+FRA/TNT/DATAFILE/undotbs1.768.1119023467
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
List of Datafile Copies
=======================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
4    OK     0              270          42880           3001997   
  File Name: +FRA/TNT/DATAFILE/undotbs1.768.1119023467
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              0               
  Index      0              0               
  Other      0              42610           

Finished backup at 26-OCT-22

RMAN> backup validate datafile 7;

Starting backup at 26-OCT-22
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00007 name=+DATA/TNT/DATAFILE/users.285.1115903033
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
---- ------ -------------- ------------ --------------- ----------
7    OK     0              318          2081            2644740   
  File Name: +DATA/TNT/DATAFILE/users.285.1115903033
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              1472            
  Index      0              15              
  Other      0              275             

Finished backup at 26-OCT-22

RMAN> backup validate database plus archivelog;

Starting backup at 26-OCT-22
current log archived
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=23 RECID=38 STAMP=1117471381
input archived log thread=2 sequence=20 RECID=39 STAMP=1117471387
input archived log thread=2 sequence=21 RECID=40 STAMP=1117471389
input archived log thread=1 sequence=24 RECID=42 STAMP=1118785857
...
....
input archived log thread=2 sequence=24 RECID=47 STAMP=1119108405
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
List of Archived Logs
=====================
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
1    23      OK     0              57068           +FRA/TNT/ARCHIVELOG/2022_10_07/thread_1_seq_23.754.1117471379
1    24      OK     0              41382           +FRA/TNT/ARCHIVELOG/2022_10_22/thread_1_seq_24.759.1118785855
2    20      OK     0              33798           +FRA/TNT/ARCHIVELOG/2022_10_07/thread_2_seq_20.764.1117471387
2    21      OK     0              1               +FRA/TNT/ARCHIVELOG/2022_10_07/thread_2_seq_21.757.1117471389
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:02
...
...
List of Archived Logs
=====================
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
2    22      OK     0              40927           +FRA/TNT/ARCHIVELOG/2022_10_22/thread_2_seq_22.769.1118785851
2    23      OK     0              18057           +FRA/TNT/ARCHIVELOG/2022_10_25/thread_2_seq_23.751.1119022689
1    25      OK     0              1               +FRA/TNT/ARCHIVELOG/2022_10_22/thread_1_seq_25.742.1118785859
1    26      OK     0              12241           +FRA/TNT/ARCHIVELOG/2022_10_25/thread_1_seq_26.763.1119022693
2    24      OK     0              12171           +FRA/TNT/ARCHIVELOG/2022_10_26/thread_2_seq_24.746.1119108405
1    27      OK     0              1               +FRA/TNT/ARCHIVELOG/2022_10_25/thread_1_seq_27.744.1119022695
Finished backup at 26-OCT-22

Starting backup at 26-OCT-22
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
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=+DATA/TNT/DATAFILE/system.282.1115902991
channel ORA_DISK_2: starting full datafile backup set
...
...
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
1    OK     0              17217        117770          3116301   
  File Name: +DATA/TNT/DATAFILE/system.282.1115902991
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              82137           
  Index      0              13312           
  Other      0              5094            

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
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:06
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
3    OK     0              21510        81921           3116302   
  File Name: +DATA/TNT/DATAFILE/sysaux.283.1115903017
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              11316           
  Index      0              7924            
  Other      0              41170           

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
5    OK     0              513          6400            3116302   
  File Name: +DATA/TNT/DATAFILE/undotbs2.290.1115904057
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              0               
  Index      0              0               
  Other      0              5887            

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
7    OK     0              318          2081            2644740   
  File Name: +DATA/TNT/DATAFILE/users.285.1115903033
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              1472            
  Index      0              15              
  Other      0              275             

...
...
List of Control File and SPFILE
===============================
File Type    Status Blocks Failing Blocks Examined
------------ ------ -------------- ---------------
Control File OK     0              674             
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:00
List of Control File and SPFILE
===============================
File Type    Status Blocks Failing Blocks Examined
------------ ------ -------------- ---------------
SPFILE       OK     0              2               
Finished backup at 26-OCT-22

Starting backup at 26-OCT-22
current log archived
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=2 sequence=27 RECID=54 STAMP=1119109346
channel ORA_DISK_2: starting archived log backup set
channel ORA_DISK_2: specifying archived log(s) in backup set
input archived log thread=1 sequence=32 RECID=55 STAMP=1119109347
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:00
List of Archived Logs
=====================
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
2    27      OK     0              4               +FRA/TNT/ARCHIVELOG/2022_10_26/thread_2_seq_27.775.1119109345
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:00
List of Archived Logs
=====================
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
1    32      OK     0              4               +FRA/TNT/ARCHIVELOG/2022_10_26/thread_1_seq_32.781.1119109347
Finished backup at 26-OCT-22

Starting Control File and SPFILE Autobackup at 26-OCT-22
piece handle=+FRA/TNT/AUTOBACKUP/2022_10_26/s_1119109349.778.1119109351 comment=NONE
Finished Control File and SPFILE Autobackup at 26-OCT-22


RMAN> BACKUP VALIDATE CHECK LOGICAL DATABASE ARCHIVELOG ALL;

Starting backup at 26-OCT-22
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=23 RECID=38 STAMP=1117471381
input archived log thread=2 sequence=20 RECID=39 STAMP=1117471387
input archived log thread=2 sequence=21 RECID=40 STAMP=1117471389
input archived log thread=1 sequence=24 RECID=42 STAMP=1118785857
..
...
List of Archived Logs
=====================
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
1    23      OK     0              57068           +FRA/TNT/ARCHIVELOG/2022_10_07/thread_1_seq_23.754.1117471379
1    24      OK     0              41382           +FRA/TNT/ARCHIVELOG/2022_10_22/thread_1_seq_24.759.1118785855
2    20      OK     0              33798           +FRA/TNT/ARCHIVELOG/2022_10_07/thread_2_seq_20.764.1117471387
2    21      OK     0              1               +FRA/TNT/ARCHIVELOG/2022_10_07/thread_2_seq_21.757.1117471389
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00003 name=+DATA/TNT/DATAFILE/sysaux.283.1115903017
input datafile file number=00005 name=+DATA/TNT/DATAFILE/undotbs2.290.1115904057
input datafile file number=00007 name=+DATA/TNT/DATAFILE/users.285.1115903033
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:01
...
..
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
1    OK     0              17217        117770          3116816   
  File Name: +DATA/TNT/DATAFILE/system.282.1115902991
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              82137           
  Index      0              13312           
  Other      0              5094            

channel ORA_DISK_2: starting full datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
input datafile file number=00004 name=+DATA/TNT/DATAFILE/undotbs1.284.1115903031
input datafile file number=00002 name=+DATA/TNT/DATAFILE/ro_ts.294.1117385373
input datafile file number=00008 name=+DATA/TNT/DATAFILE/ts_nolog.295.1117461389
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:01
List of Archived Logs
=====================
Thrd Seq     Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
2    22      OK     0              40927           +FRA/TNT/ARCHIVELOG/2022_10_22/thread_2_seq_22.769.1118785851
2    23      OK     0              18057           +FRA/TNT/ARCHIVELOG/2022_10_25/thread_2_seq_23.751.1119022689
1    25      OK     0              1               +FRA/TNT/ARCHIVELOG/2022_10_22/thread_1_seq_25.742.1118785859
1    26      OK     0              12241           +FRA/TNT/ARCHIVELOG/2022_10_25/thread_1_seq_26.763.1119022693
2    24      OK     0              12171           +FRA/TNT/ARCHIVELOG/2022_10_26/thread_2_seq_24.746.1119108405
1    27      OK     0              1               +FRA/TNT/ARCHIVELOG/2022_10_25/thread_1_seq_27.744.1119022695
channel ORA_DISK_3: starting full datafile backup set
channel ORA_DISK_3: specifying datafile(s) in backup set
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:05
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
3    OK     0              21502        81921           3116913   
  File Name: +DATA/TNT/DATAFILE/sysaux.283.1115903017
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              11323           
  Index      0              7924            
  Other      0              41171           

...
...
List of Control File and SPFILE
===============================
File Type    Status Blocks Failing Blocks Examined
------------ ------ -------------- ---------------
SPFILE       OK     0              2               
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:00
List of Control File and SPFILE
===============================
File Type    Status Blocks Failing Blocks Examined
------------ ------ -------------- ---------------
Control File OK     0              674             
Finished backup at 26-OCT-22

RMAN> 

RESTORE....VALIDATE

To test whether RMAN can restore a specific file or set of files from a backup. RMAN chooses which backups to use.

RMAN> RESTORE DATABASE VALIDATE;

Starting restore at 26-OCT-22
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3

channel ORA_DISK_2: starting validation of datafile backup set
channel ORA_DISK_3: starting validation of datafile backup set
channel ORA_DISK_2: reading from backup piece +FRA/TNT/BACKUPSET/2022_10_07/nnndf0_tag20221007t142652_0.774.1117463219
channel ORA_DISK_3: reading from backup piece +FRA/TNT/BACKUPSET/2022_10_07/nnndf0_tag20221007t142652_0.773.1117463213
channel ORA_DISK_1: scanning datafile copy +FRA/TNT/DATAFILE/undotbs1.768.1119023467
channel ORA_DISK_2: piece handle=+FRA/TNT/BACKUPSET/2022_10_07/nnndf0_tag20221007t142652_0.774.1117463219 tag=TAG20221007T142652
channel ORA_DISK_2: restored backup piece 1
channel ORA_DISK_2: validation complete, elapsed time: 00:00:00
channel ORA_DISK_2: starting validation of datafile backup set
channel ORA_DISK_2: reading from backup piece +FRA/TNT/BACKUPSET/2022_10_07/nnndf0_tag20221007t142652_0.752.1117463215
channel ORA_DISK_1: starting validation of datafile backup set
channel ORA_DISK_2: piece handle=+FRA/TNT/BACKUPSET/2022_10_07/nnndf0_tag20221007t142652_0.752.1117463215 tag=TAG20221007T142652
channel ORA_DISK_2: restored backup piece 1
channel ORA_DISK_2: validation complete, elapsed time: 00:00:15
channel ORA_DISK_3: piece handle=+FRA/TNT/BACKUPSET/2022_10_07/nnndf0_tag20221007t142652_0.773.1117463213 tag=TAG20221007T142652
channel ORA_DISK_3: restored backup piece 1
channel ORA_DISK_3: validation complete, elapsed time: 00:00:15
channel ORA_DISK_1: reading from backup piece +FRA/TNT/BACKUPSET/2022_10_07/nnndf0_tag20221007t150649_0.741.1117465611
channel ORA_DISK_1: piece handle=+FRA/TNT/BACKUPSET/2022_10_07/nnndf0_tag20221007t150649_0.741.1117465611 tag=TAG20221007T150649
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
Finished restore at 26-OCT-22

RMAN> RESTORE ARCHIVELOG ALL VALIDATE;

Starting restore at 26-OCT-22
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 10/26/2022 15:54:39
RMAN-06026: some targets not found - aborting restore
RMAN-06025: no backup of archived log for thread 2 with sequence 19 and starting SCN of 2624940 found to restore
RMAN-06025: no backup of archived log for thread 2 with sequence 18 and starting SCN of 2518656 found to restore
RMAN-06025: no backup of archived log for thread 2 with sequence 17 and starting SCN of 2518496 found to restore
RMAN-06025: no backup of archived log for thread 2 with sequence 16 and starting SCN of 2518424 found to restore
RMAN-06025: no backup of archived log for thread 2 with sequence 15 and starting SCN of 2485194 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 22 and starting SCN of 2518659 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 21 and starting SCN of 2518549 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 20 and starting SCN of 2518420 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 19 and starting SCN of 2486446 found to restore
RMAN-06025: no backup of archived log for thread 1 with sequence 18 and starting SCN of 2485193 found to restore

RMAN> LIST BACKUP OF ARCHIVELOG FROM SEQUENCE 19 UNTIL SEQUENCE 23 THREAD 2;

specification does not match any backup in the repository


RMAN> RESTORE DATAFILE 4 VALIDATE;

Starting restore at 26-OCT-22
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3

channel ORA_DISK_1: scanning datafile copy +FRA/TNT/DATAFILE/undotbs1.768.1119023467
Finished restore at 26-OCT-22

RMAN> REPORT SCHEMA;

Report of database schema for database with db_unique_name TNT

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    920      SYSTEM               YES     +DATA/TNT/DATAFILE/system.282.1115902991
2    100      RO_TS                NO      +DATA/TNT/DATAFILE/ro_ts.294.1117385373
3    640      SYSAUX               NO      +DATA/TNT/DATAFILE/sysaux.283.1115903017
4    335      UNDOTBS1             YES     +DATA/TNT/DATAFILE/undotbs1.284.1115903031
5    50       UNDOTBS2             YES     +DATA/TNT/DATAFILE/undotbs2.290.1115904057
7    16       USERS                NO      +DATA/TNT/DATAFILE/users.285.1115903033
8    100      TS_NOLOG             NO      +DATA/TNT/DATAFILE/ts_nolog.295.1117461389

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    35       TEMP                 32767       +DATA/TNT/TEMPFILE/temp.289.1115903147

RMAN> RESTORE VALIDATE TABLESPACE TS_NOLOG;

Starting restore at 26-OCT-22
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3

channel ORA_DISK_1: starting validation of datafile backup set
channel ORA_DISK_1: reading from backup piece +FRA/TNT/BACKUPSET/2022_10_07/nnndf0_tag20221007t150649_0.741.1117465611
channel ORA_DISK_1: piece handle=+FRA/TNT/BACKUPSET/2022_10_07/nnndf0_tag20221007t150649_0.741.1117465611 tag=TAG20221007T150649
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
Finished restore at 26-OCT-22

RMAN> RESTORE DATABASE VALIDATE PREVIEW;

Starting restore at 26-OCT-22
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3


List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
235     Full    801.11M    DISK        00:00:32     07-OCT-22      
        BP Key: 290   Status: AVAILABLE  Compressed: NO  Tag: TAG20221007T142652
        Piece Name: +FRA/TNT/BACKUPSET/2022_10_07/nnndf0_tag20221007t142652_0.773.1117463213
  List of Datafiles in backup set 235
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  1       Full 2648115    07-OCT-22              NO    +DATA/TNT/DATAFILE/system.282.1115902991

..
...
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  8       Full 2652011    07-OCT-22              NO    +DATA/TNT/DATAFILE/ts_nolog.295.1117461389
List of Datafile Copies
=======================

Key     File S Completion Time Ckp SCN    Ckp Time        Sparse
------- ---- - --------------- ---------- --------------- ------
13      4    A 25-OCT-22       3002896    25-OCT-22       NO    
        Name: +FRA/TNT/DATAFILE/undotbs1.768.1119023467
        Tag: TAG20221025T155105


List of Archived Log Copies for database with db_unique_name TNT
=====================================================================

Key     Thrd Seq     S Low Time 
------- ---- ------- - ---------
38      1    23      A 07-OCT-22
        Name: +FRA/TNT/ARCHIVELOG/2022_10_07/thread_1_seq_23.754.1117471379

42      1    24      A 07-OCT-22
        Name: +FRA/TNT/ARCHIVELOG/2022_10_22/thread_1_seq_24.759.1118785855

43      1    25      A 22-OCT-22
        Name: +FRA/TNT/ARCHIVELOG/2022_10_22/thread_1_seq_25.742.1118785859

45      1    26      A 22-OCT-22
        Name: +FRA/TNT/ARCHIVELOG/2022_10_25/thread_1_seq_26.763.1119022693
..
..
51      2    25      A 26-OCT-22
        Name: +FRA/TNT/ARCHIVELOG/2022_10_26/thread_2_seq_25.776.1119108953

52      2    26      A 26-OCT-22
        Name: +FRA/TNT/ARCHIVELOG/2022_10_26/thread_2_seq_26.747.1119109325

54      2    27      A 26-OCT-22
        Name: +FRA/TNT/ARCHIVELOG/2022_10_26/thread_2_seq_27.775.1119109345

recovery will be done up to SCN 2648115
Media recovery start SCN is 2648115
Recovery must be done beyond SCN 3002896 to clear datafile fuzziness

channel ORA_DISK_2: starting validation of datafile backup set
channel ORA_DISK_3: starting validation of datafile backup set
channel ORA_DISK_2: reading from backup piece +FRA/TNT/BACKUPSET/2022_10_07/nnndf0_tag20221007t142652_0.774.1117463219
channel ORA_DISK_3: reading from backup piece +FRA/TNT/BACKUPSET/2022_10_07/nnndf0_tag20221007t142652_0.773.1117463213
..
...
channel ORA_DISK_1: piece handle=+FRA/TNT/BACKUPSET/2022_10_07/nnndf0_tag20221007t150649_0.741.1117465611 tag=TAG20221007T150649
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3

channel ORA_DISK_1: scanning archived log +FRA/TNT/ARCHIVELOG/2022_10_07/thread_1_seq_23.754.1117471379
channel ORA_DISK_2: scanning archived log +FRA/TNT/ARCHIVELOG/2022_10_22/thread_1_seq_24.759.1118785855
channel ORA_DISK_3: scanning archived log +FRA/TNT/ARCHIVELOG/2022_10_22/thread_1_seq_25.742.1118785859
channel ORA_DISK_1: scanning archived log +FRA/TNT/ARCHIVELOG/2022_10_25/thread_1_seq_26.763.1119022693
channel ORA_DISK_2: scanning archived log +FRA/TNT/ARCHIVELOG/2022_10_25/thread_1_seq_27.744.1119022695
...
..
channel ORA_DISK_2: scanning archived log +FRA/TNT/ARCHIVELOG/2022_10_26/thread_2_seq_26.747.1119109325
channel ORA_DISK_3: scanning archived log +FRA/TNT/ARCHIVELOG/2022_10_26/thread_2_seq_27.775.1119109345
Finished restore at 26-OCT-22

RMAN> EXIT