The validating database is one part of the DBA job. Most DBAs wants to check the database’s health pro-actively regularly during non-peak hours.

Validating Database checks the following things :

1. It scans specified files and their contents.

2. It confirms that specified files exist and they are at the correct location.

3. It checks for corrupt data blocks.

So now let us see how we can validate database in Multi-Tenant environment.

We may want to validate whole CDB, just a CDB root or pluggable databases.

When we are connected to the CDB database in RMAN following will work

RMAN>VALIDATE DATABASE;

Validate Database will validate the whole database including cdb root and all pluggable database.

RMAN>VALIDATE DATABASE ROOT;

Validate Database Root will just validate the cdb root and not any pluggable database.

Now, to validate the pluggable database we can do the following

Step 1: Connect to RMAN with CDB$ROOT

[oracle@localhost ~]$ rman target /

Recovery Manager: Release 12.2.0.1.0 - Production on Sun Sep 2 07:39:48 2018

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

connected to target database: DUPCDB (DBID=2214727166)

Step 2: Validate using Validate Pluggable Database

RMAN> validate pluggable database pdb,pdb1;

Starting validate at 02-SEP-18
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=80 device type=DISK
channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
input datafile file number=00010 name=/u02/oradata/dupcdb/7488420FE8375E14E055000000000001/datafile/o1_mf_sysaux_frfggtt0_.dbf
input datafile file number=00012 name=/u02/oradata/dupcdb/7488420FE8375E14E055000000000001/datafile/o1_mf_undo_1_frfgp5hx_.dbf
input datafile file number=00009 name=/u02/oradata/dupcdb/7488420FE8375E14E055000000000001/datafile/o1_mf_system_frfggto4_.dbf
input datafile file number=00011 name=/u02/oradata/dupcdb/7488420FE8375E14E055000000000001/datafile/o1_mf_users_frfggtt2_.dbf
channel ORA_DISK_1: validation complete, elapsed time: 00:00:35
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
9    OK     0              9328         48642           2886140   
  File Name: /u02/oradata/dupcdb/7488420FE8375E14E055000000000001/datafile/o1_mf_system_frfggto4_.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              20571           
  Index      0              15185           
  Other      0              3556            

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
10   OK     0              8256         65282           2876457   
  File Name: /u02/oradata/dupcdb/7488420FE8375E14E055000000000001/datafile/o1_mf_sysaux_frfggtt0_.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              5814            
  Index      0              3505            
  Other      0              47705           

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
11   OK     0              1            641             1605417   
  File Name: /u02/oradata/dupcdb/7488420FE8375E14E055000000000001/datafile/o1_mf_users_frfggtt2_.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              0               
  Index      0              0               
  Other      0              639             

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
12   OK     0              1            56364           2886140   
  File Name: /u02/oradata/dupcdb/7488420FE8375E14E055000000000001/datafile/o1_mf_undo_1_frfgp5hx_.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              0               
  Index      0              0               
  Other      0              56319           

channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
input datafile file number=00017 name=/u02/oradata/dupcdb/74D7FDB4AE824BFEE055000000000001/datafile/o1_mf_sysaux_frp5n9o4_.dbf
input datafile file number=00016 name=/u02/oradata/dupcdb/74D7FDB4AE824BFEE055000000000001/datafile/o1_mf_system_frp5n9n6_.dbf
input datafile file number=00018 name=/u02/oradata/dupcdb/74D7FDB4AE824BFEE055000000000001/datafile/o1_mf_undotbs1_frp5n9o5_.dbf
channel ORA_DISK_1: validation complete, elapsed time: 00:00:25
List of Datafiles
=================
File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
16   OK     0              6551         32001           2886242   
  File Name: /u02/oradata/dupcdb/74D7FDB4AE824BFEE055000000000001/datafile/o1_mf_system_frp5n9n6_.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              15081           
  Index      0              8235            
  Other      0              2133            

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
17   OK     0              7718         44801           2876460   
  File Name: /u02/oradata/dupcdb/74D7FDB4AE824BFEE055000000000001/datafile/o1_mf_sysaux_frp5n9o4_.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              3541            
  Index      0              1965            
  Other      0              31576           

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
18   OK     0              151          12801           2886242   
  File Name: /u02/oradata/dupcdb/74D7FDB4AE824BFEE055000000000001/datafile/o1_mf_undotbs1_frp5n9o5_.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              0               
  Index      0              0               
  Other      0              12649           

Finished validate at 02-SEP-18

In the above step, I have validated 2 pluggable databases.

When you are connected with pdb in RMAN you can apply to validate database to validate pdb.

[oracle@localhost dbs]$ rman target  system/oracle@pdb1

Recovery Manager: Release 12.2.0.1.0 - Production on Sun Sep 2 09:10:04 2018

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

connected to target database: DUPCDB:PDB1 (DBID=2408061008)

RMAN> validate database;

Starting validate at 02-SEP-18
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=35 device type=DISK
channel ORA_DISK_1: starting validation of datafile
channel ORA_DISK_1: specifying datafile(s) for validation
input datafile file number=00017 name=/u02/oradata/dupcdb/74D7FDB4AE824BFEE055000000000001/datafile/o1_mf_sysaux_frp5n9o4_.dbf
input datafile file number=00016 name=/u02/oradata/dupcdb/74D7FDB4AE824BFEE055000000000001/datafile/o1_mf_system_frp5n9n6_.dbf
input datafile file number=00018 name=/u02/oradata/dupcdb/74D7FDB4AE824BFEE055000000000001/datafile/o1_mf_undotbs1_frp5n9o5_.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
---- ------ -------------- ------------ --------------- ----------
16   OK     0              6546         32001           2902694   
  File Name: /u02/oradata/dupcdb/74D7FDB4AE824BFEE055000000000001/datafile/o1_mf_system_frp5n9n6_.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              15083           
  Index      0              8236            
  Other      0              2135            

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
17   OK     0              7718         44801           2900040   
  File Name: /u02/oradata/dupcdb/74D7FDB4AE824BFEE055000000000001/datafile/o1_mf_sysaux_frp5n9o4_.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              3540            
  Index      0              1965            
  Other      0              31577           

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
---- ------ -------------- ------------ --------------- ----------
18   OK     0              146          12801           2902694   
  File Name: /u02/oradata/dupcdb/74D7FDB4AE824BFEE055000000000001/datafile/o1_mf_undotbs1_frp5n9o5_.dbf
  Block Type Blocks Failing Blocks Processed
  ---------- -------------- ----------------
  Data       0              0               
  Index      0              0               
  Other      0              12654           

Finished validate at 02-SEP-18

RMAN>

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us an Invitation or Follow us:

Telegram Channel: https://t.me/helporacle

Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/

Joel Perez’s LinkedIn: Joel Perez’s Profile

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

About The Author

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.