Your multitenant container database (CDB) is running in ARCHIVELOG mode. You connect to the
CDB RMAN.
Examine the following command and its output:
You execute the following command:
RMAN > BACKUP DATABASE PLUS ARCHIVELOG;
Which data files will be backed up?
A.
Data files that belong to only the root container
B.
Data files that belong to the root container and all the pluggable databases (PDBs)
C.
Data files that belong to only the root container and PDB$SEED
D.
Data files that belong to the root container and all the PDBs excluding PDB$SEED
Explanation:
Backing Up a Whole CDB
Backing up a whole CDB is similar to backing up a non-CDB. When you back up a whole CDB,
RMAN backs up the root, all the PDBs, and the archived redo logs. You can then recover either
the whole CDB, the root only, or one or more PDBs from the CDB backup.
Note:
* You can back up and recover a whole CDB, the root only, or one or more PDBs.
* Backing Up Archived Redo Logs with RMAN
Archived redo logs are the key to successful media recovery. Back them up regularly. You can
back up logs with BACKUP ARCHIVELOG, or back up logs while backing up datafiles and control
files by specifying BACKUP … PLUS ARCHIVELOG.
B
B.
Data files that belong to the root container and all the pluggable databases (PDBs)
B.
http://www.oracle-base.com/articles/12c/multitenant-rman-backup-recovery-cdb-and-pdb-12cr1.php
RMAN> BACKUP DATABASE PLUS ARCHIVELOG;
A section of the output from the above backup command is shown below. Notice how the datafiles associated with the CBD (cdb1) and all the PDBs (pdb1, pdb2, pdb$seed) are included in the backup
…
…
B
B
B
RMAN> backup database plus archivelog;
Starting backup at 31-JUL-15
current log archived
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=59 device type=DISK
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=25 RECID=47 STAMP=886388651
input archived log thread=1 sequence=26 RECID=48 STAMP=886410054
input archived log thread=1 sequence=27 RECID=49 STAMP=886438830
input archived log thread=1 sequence=28 RECID=50 STAMP=886457009
input archived log thread=1 sequence=29 RECID=51 STAMP=886458613
input archived log thread=1 sequence=30 RECID=52 STAMP=886471270
input archived log thread=1 sequence=31 RECID=53 STAMP=886471300
input archived log thread=1 sequence=32 RECID=54 STAMP=886482028
input archived log thread=1 sequence=33 RECID=55 STAMP=886489172
input archived log thread=1 sequence=34 RECID=56 STAMP=886489849
channel ORA_DISK_1: starting piece 1 at 31-JUL-15
channel ORA_DISK_1: finished piece 1 at 31-JUL-15
piece handle=/u01/app/oracle/fast_recovery_area/CDB2/backupset/2015_07_31/o1_mf_annnn_TAG20150731T071049_bvplfb0h_.bkp tag=TAG20150731T071049 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
Finished backup at 31-JUL-15
Starting backup at 31-JUL-15
using channel ORA_DISK_1
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=/u01/app/oracle/oradata/cdb2/system01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/cdb2/sysaux01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/cdb2/undotbs01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/cdb2/users01.dbf
channel ORA_DISK_1: starting piece 1 at 31-JUL-15
channel ORA_DISK_1: finished piece 1 at 31-JUL-15
piece handle=/u01/app/oracle/fast_recovery_area/CDB2/backupset/2015_07_31/o1_mf_nnndf_TAG20150731T071115_bvplg39o_.bkp tag=TAG20150731T071115 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:55
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00009 name=/u01/app/oracle/oradata/cdb2/pdb2_11/sysaux01.dbf
input datafile file number=00008 name=/u01/app/oracle/oradata/cdb2/pdb2_11/system01.dbf
input datafile file number=00020 name=/u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
input datafile file number=00010 name=/u01/app/oracle/oradata/cdb2/pdb2_11/pdb2_11_users01.dbf
channel ORA_DISK_1: starting piece 1 at 31-JUL-15
channel ORA_DISK_1: finished piece 1 at 31-JUL-15
piece handle=/u01/app/oracle/fast_recovery_area/CDB2/18042040D23A31D8E0532838A8C09227/backupset/2015_07_31/o1_mf_nnndf_TAG20150731T071115_bvplmlh1_.bkp tag=TAG20150731T071115 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:45
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00012 name=/u01/app/oracle/oradata/cdb2/pdb2_12/sysaux01.dbf
input datafile file number=00011 name=/u01/app/oracle/oradata/cdb2/pdb2_12/system01.dbf
input datafile file number=00013 name=/u01/app/oracle/oradata/cdb2/pdb2_12/pdb2_12_users01.dbf
channel ORA_DISK_1: starting piece 1 at 31-JUL-15
channel ORA_DISK_1: finished piece 1 at 31-JUL-15
piece handle=/u01/app/oracle/fast_recovery_area/CDB2/1804259C3CCF32C7E0532838A8C0BD7B/backupset/2015_07_31/o1_mf_nnndf_TAG20150731T071115_bvplrrqm_.bkp tag=TAG20150731T071115 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00015 name=/u01/app/oracle/oradata/cdb2/pdb2_13/sysaux01.dbf
input datafile file number=00014 name=/u01/app/oracle/oradata/cdb2/pdb2_13/system01.dbf
input datafile file number=00016 name=/u01/app/oracle/oradata/cdb2/pdb2_13/pdb2_13_users01.dbf
channel ORA_DISK_1: starting piece 1 at 31-JUL-15
channel ORA_DISK_1: finished piece 1 at 31-JUL-15
piece handle=/u01/app/oracle/fast_recovery_area/CDB2/180429E26FA933C2E0532838A8C02D27/backupset/2015_07_31/o1_mf_nnndf_TAG20150731T071115_bvpm1omv_.bkp tag=TAG20150731T071115 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:25
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00018 name=/u01/app/oracle/oradata/cdb2/pdb2_14/sysaux01.dbf
input datafile file number=00017 name=/u01/app/oracle/oradata/cdb2/pdb2_14/system01.dbf
input datafile file number=00019 name=/u01/app/oracle/oradata/cdb2/pdb2_14/pdb2_14_users01.dbf
channel ORA_DISK_1: starting piece 1 at 31-JUL-15
channel ORA_DISK_1: finished piece 1 at 31-JUL-15
piece handle=/u01/app/oracle/fast_recovery_area/CDB2/18042DE8979B34BDE0532838A8C019AF/backupset/2015_07_31/o1_mf_nnndf_TAG20150731T071115_bvpm66r2_.bkp tag=TAG20150731T071115 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:15
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=/u01/app/oracle/oradata/cdb2/pdbseed/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/cdb2/pdbseed/system01.dbf
channel ORA_DISK_1: starting piece 1 at 31-JUL-15
channel ORA_DISK_1: finished piece 1 at 31-JUL-15
piece handle=/u01/app/oracle/fast_recovery_area/CDB2/1803E10C071F2EF5E0532838A8C01B4B/backupset/2015_07_31/o1_mf_nnndf_TAG20150731T071115_bvpmbfwt_.bkp tag=TAG20150731T071115 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:55
Finished backup at 31-JUL-15
Starting backup at 31-JUL-15
current log archived
using channel ORA_DISK_1
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=35 RECID=57 STAMP=886490897
channel ORA_DISK_1: starting piece 1 at 31-JUL-15
channel ORA_DISK_1: finished piece 1 at 31-JUL-15
piece handle=/u01/app/oracle/fast_recovery_area/CDB2/backupset/2015_07_31/o1_mf_annnn_TAG20150731T072817_bvpmg1bs_.bkp tag=TAG20150731T072817 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 31-JUL-15
Starting Control File and SPFILE Autobackup at 31-JUL-15
piece handle=/u01/app/oracle/fast_recovery_area/CDB2/autobackup/2015_07_31/o1_mf_s_886490898_bvpmg8n2_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 31-JUL-15
RMAN> select con_id, name, open_mode from v$pdbs;
CON_ID NAME OPEN_MODE
———- —————————— ———-
2 PDB$SEED READ ONLY
3 PDB2 MOUNTED
4 PDB2_2 MOUNTED
5 PDB_ORCL2 MOUNTED
6 PDB1_1 READ WRITE
RMAN>
list backup of pluggable database PDB2;
RMAN>
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
——- —- — ———- ———– ———— —————
76 Full 674.22M DISK 00:02:29 31-JUL-15
BP Key: 76 Status: AVAILABLE Compressed: NO Tag: TAG20150731T071115
Piece Name: /u01/app/oracle/fast_recovery_area/CDB2/18042040D23A31D8E0532838A8C09227/backupset/2015_07_31/o1_mf_nnndf_TAG20150731T071115_bvplmlh1_.bkp
List of Datafiles in backup set 76
Container ID: 3, PDB Name: PDB2
File LV Type Ckp SCN Ckp Time Name
—- — —- ———- ——— —-
8 Full 2500630 31-JUL-15 /u01/app/oracle/oradata/cdb2/pdb2_11/system01.dbf
9 Full 2500630 31-JUL-15 /u01/app/oracle/oradata/cdb2/pdb2_11/sysaux01.dbf
10 Full 2500630 31-JUL-15 /u01/app/oracle/oradata/cdb2/pdb2_11/pdb2_11_users01.dbf
20 Full 2500630 31-JUL-15 /u01/app/oracle/oradata/cdb2/pdb2_1/ldata_01.dbf
RMAN>
RMAN> list backup of pluggable database PDB2_2;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
——- —- — ———- ———– ———— —————
77 Full 672.44M DISK 00:04:40 31-JUL-15
BP Key: 77 Status: AVAILABLE Compressed: NO Tag: TAG20150731T071115
Piece Name: /u01/app/oracle/fast_recovery_area/CDB2/1804259C3CCF32C7E0532838A8C0BD7B/backupset/2015_07_31/o1_mf_nnndf_TAG20150731T071115_bvplrrqm_.bkp
List of Datafiles in backup set 77
Container ID: 4, PDB Name: PDB2_2
File LV Type Ckp SCN Ckp Time Name
—- — —- ———- ——— —-
11 Full 2500932 31-JUL-15 /u01/app/oracle/oradata/cdb2/pdb2_12/system01.dbf
12 Full 2500932 31-JUL-15 /u01/app/oracle/oradata/cdb2/pdb2_12/sysaux01.dbf
13 Full 2500932 31-JUL-15 /u01/app/oracle/oradata/cdb2/pdb2_12/pdb2_12_users01.dbf
RMAN> list backup of pluggable database PDB_ORCL2;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
——- —- — ———- ———– ———— —————
78 Full 672.09M DISK 00:01:59 31-JUL-15
BP Key: 78 Status: AVAILABLE Compressed: NO Tag: TAG20150731T071115
Piece Name: /u01/app/oracle/fast_recovery_area/CDB2/180429E26FA933C2E0532838A8C02D27/backupset/2015_07_31/o1_mf_nnndf_TAG20150731T071115_bvpm1omv_.bkp
List of Datafiles in backup set 78
Container ID: 5, PDB Name: PDB_ORCL2
File LV Type Ckp SCN Ckp Time Name
—- — —- ———- ——— —-
14 Full 2501217 31-JUL-15 /u01/app/oracle/oradata/cdb2/pdb2_13/system01.dbf
15 Full 2501217 31-JUL-15 /u01/app/oracle/oradata/cdb2/pdb2_13/sysaux01.dbf
16 Full 2501217 31-JUL-15 /u01/app/oracle/oradata/cdb2/pdb2_13/pdb2_13_users01.dbf
RMAN> list backup of pluggable database PDB1_1;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
——- —- — ———- ———– ———— —————
79 Full 672.70M DISK 00:02:06 31-JUL-15
BP Key: 79 Status: AVAILABLE Compressed: NO Tag: TAG20150731T071115
Piece Name: /u01/app/oracle/fast_recovery_area/CDB2/18042DE8979B34BDE0532838A8C019AF/backupset/2015_07_31/o1_mf_nnndf_TAG20150731T071115_bvpm66r2_.bkp
List of Datafiles in backup set 79
Container ID: 6, PDB Name: PDB1_1
File LV Type Ckp SCN Ckp Time Name
—- — —- ———- ——— —-
17 Full 2502578 31-JUL-15 /u01/app/oracle/oradata/cdb2/pdb2_14/system01.dbf
18 Full 2502578 31-JUL-15 /u01/app/oracle/oradata/cdb2/pdb2_14/sysaux01.dbf
19 Full 2502578 31-JUL-15 /u01/app/oracle/oradata/cdb2/pdb2_14/pdb2_14_users01.dbf
B is correct