My Oracle Support Banner

How to do a Restore and recovery of Single or multiple datafile from a PDB database on12c (Doc ID 1565822.1)

Last updated on MAY 16, 2023

Applies to:

Oracle Database - Enterprise Edition - Version 12.1.0.1 to 12.1.0.1 [Release 12.1]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Information in this document applies to any platform.

Goal

NOTE: In the images and/or the document content below, the user information and environment data used represents fictitious data from the Oracle sample schema(s), Public Documentation delivered with an Oracle database product or other training material. Any similarity to actual environments, actual persons, living or dead, is purely coincidental and not intended in any manner.

For the purposes of this document, the following fictitious environment is used as an example to describe the procedure:
CDB name:CDB1
PDB name: pdbtest
CDB1 path:/cdb1/cdb1
PDBTEST path: /cdb1/cdb1/pdbtest
PDBTEST tablespace name: TEST
PDBTEST tablespace test datafile: /cdb1/cdb1/pdbtest/sh.dbf
PDBTEST TNS connect string: pdbtest
RMAN backup location: /cdb1
PDB$SEED path:/cdb1/cdb1/pdbseed

 *****************************

 

The Goal of this article is do a restore and recovery of a datafile From PDB  when one or couple of datafiles associated with PDB are corrupted or lost.

Before we start Please understand the following Terms used in 12c.

What is a multitenant container database ?

A 12c database is either a non-Container Database or a Container Database -  referred to as non-CDB or CDB respectively.
A CDB is an Oracle database that includes zero, one, or many customer-created Containers or Pluggable Databases referred to as PDB.
The CDB has:


What is a Pluggable Database
?

A pluggable Database (PDB) is a user-created container holding the data for any application.
A PDB would have its SYSTEM, SYSAUX, TEMP tablespaces.It can also contains  other user created tablespaces in it.

Change done to Pdb database would be written to the Undo /redo present in the CDB$ROOT.

By Default When you Connect as  sysdba without any service name you connect to Root Container

 

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
 Step1 :- Check the status of the file
 Step 2 :- Restore the datafile 20 from backup.
 Step 3 : Recover the datafile
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.