PDBs Backup (How to identify which PDBs a backup set belong to)

Introduction:- In this article, we are going to have look on PDBs backup. Normally we have learnt about a different kind of backup available in Oracle. In cloud computing, we have backups in PDBs. In RMAN we have a script to know about the backup history. Now we can get the information of PDB(backup). n large scale industries have multiple kinds of databases are available sometimes we get confused about the backup. To solve this issue we have a new feature in 12c to know about PDBs backup’s information. Let’s have look on ways to know about PDBs backup. I hope this information is valuable for you.

In this case the container database, named CDB001, contains three pluggable databases named PDB001, PDB002 and PDB003: it is also possible to easily identify the seed container used as template when you want to create new PDBs.

After you successfully connect to the container database with RMAN it is not sufficient to have a look at the third line to determine if you are using the container database or a pluggable one.
That line simply specifies you are connected to a target database and when connecting to a pluggable database it could be misleading.

Have a look at the following attempts to connect first to the root container and then directly to the PDB001 pluggable database.
Where and what are the differences if you exclude the time settings ?

When connected to a pluggable database using the report schema command is possible to deduce the PDB name looking at its datafiles and locations: indeed in this case only the datafiles associated with the connected PDB are listed in the output of the report schema command.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

RMAN>report schema;

using target database control file instead of recovery catalog

Report of database schema fordatabase with db_unique_name CDB001

List of Permanent Datafiles

===========================

File Size(MB)Tablespace RB segs Datafile Name

---------------------------------------------------------------

7260SYSTEM ***/app/oracle/oradata/CDB001/PDB001/system01.dbf

8635SYSAUX ***/app/oracle/oradata/CDB001/PDB001/sysaux01.dbf

95USERS ***/app/oracle/oradata/CDB001/PDB001/PDB001_users01.dbf

List of Temporary Files

=======================

File Size(MB)Tablespace Maxsize(MB)Tempfile Name

---------------------------------------------------------------

320TEMP32767/app/oracle/oradata/CDB001/PDB001/temp01.dbf

Quit the previous conection to the pluggable database and connect again to the ROOT container and have a look at the list backup command.
List backup command is not so useful when you still don’t have any backups available.

1

2

3

RMAN>list backup;

specification does notmatch any backup inthe repository

So let’s get first a full database backup.
When you are connected to the ROOT container any commands you send using RMAN are related to the ROOT container; of course you can, while connected to the ROOT container, execute command on the pluggable database but you have to specify the pluggable database name and additional syntax.

With the list command you can display information about the available backups.Looking at that information you can be able toknow that the o1_mf_nnndf_TAG20140220T163840_9jd8l78o_.bkp backup isrelated toafull backup of the pluggable database named PDB001,the o1_mf_nnndf_TAG20140220T163840_9jd8n97w_.bkp backup isrelated toPDB002 ando1_mf_nnndf_TAG20140220T163840_9jd8q9jq_.bkp toPDB003.

Looking only at the name of the backup set how you can deduce which PDB that backup belongs to ?
If your database is still available you can query the V$BACKUP_FILES view and match the container id with the V$CONTAINERS view for example.

But how can you identify which pluggable database the backup belongs to looking only at the location of the backup set ?
From the file location you can only use the Globally Unique ID (associated with every pluggable databases by the Oracle software) and deduce the name of the pluggable database: if you don’t have access to the database it is quite difficult to remember that association.
For this reason when dealing with container and pluggable databases it is heartily recommended to tag your backups using specific names and easily refer to them when required.