Which statement is true about the execution of this command to back up the database?

Your multitenant container database (CDB) cdb1 that is running in archivelog mode contains
two pluggable databases (PDBs), pdb2_1 and pdb2_2, both of which are open. RMAN is
connected to the target database pdb2_1.

RMAN> BACKUP DATABASE PLUS ARCHIVELOG DELETE INPUT;
Which statement is true about the execution of this command to back up the database?

Your multitenant container database (CDB) cdb1 that is running in archivelog mode contains
two pluggable databases (PDBs), pdb2_1 and pdb2_2, both of which are open. RMAN is
connected to the target database pdb2_1.

RMAN> BACKUP DATABASE PLUS ARCHIVELOG DELETE INPUT;
Which statement is true about the execution of this command to back up the database?

A.
All data files belonging to pdb2_1 are backed up and all archive log files are deleted.

B.
All data files belonging to pdb2_1 are backed up along with the archive log files.

C.
Only the data files belonging to pdb2_ are backed up.

D.
This command gives an error because archive log files can be backed up only when
RMAN is connected to the root database.



Leave a Reply 14

Your email address will not be published. Required fields are marked *


Siegfried

Correct

Correct

Why not D?? Because it clearly states:

The following operations are not available when you connect as target directly to a PDB

Tri

Tri

C is correct. Because the command does not make error. It makes warning only. And all plugable datafiles backed up.

RMAN> BACKUP DATABASE PLUS ARCHIVELOG DELETE INPUT;

Starting backup at 01-DEC-15
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=55 device type=DISK
specification does not match any archived log in the repository
backup cancelled because there are no files to backup
Finished backup at 01-DEC-15

Starting backup at 01-DEC-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=00011 name=/u01/app/oracle/oradata/orcl/pdborcl/example01.dbf
input datafile file number=00009 name=/u01/app/oracle/oradata/orcl/pdborcl/sysaux01.dbf
input datafile file number=00008 name=/u01/app/oracle/oradata/orcl/pdborcl/system01.dbf
input datafile file number=00010 name=/u01/app/oracle/oradata/orcl/pdborcl/SAMPLE_SCHEMA_users01.dbf
channel ORA_DISK_1: starting piece 1 at 01-DEC-15
channel ORA_DISK_1: finished piece 1 at 01-DEC-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCL/25CF9C06BF14344AE0530B0A0A0A6A9E/backupset/2015_12_01/o1_mf_nnndf_TAG20151201T193925_c5v57xfj_.bkp tag=TAG20151201T193925 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:25
Finished backup at 01-DEC-15

Vonpire

Vonpire

It’s C

See here for a great example : http://nagaappani.blogspot.pt/2013/07/oracle-database-12c-new-features.html

2) Backup of Pluggable Database (PDB)

On ROOT Container connection, Using “BACKUP PLUGGABLE DATABASE”
[oracle@ora12c ~]$ rman target /
Recovery Manager: Release 12.1.0.1.0 – Production on Mon Jul 1 17:11:07 2013
Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.
connected to target database: CONDB (DBID=1075048777)

RMAN> BACKUP PLUGGABLE DATABASE PDB PLUS ARCHIVELOG;

OR

On PDB Connection itself, Using “BACKUP DATABASE” on PDB
[oracle@ora12c ~]$ rman target sys@PDB
Recovery Manager: Release 12.1.0.1.0 – Production on Mon Jul 1 17:35:59 2013
Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.
target database Password:
connected to target database: CONDB (DBID=1075048777)
RMAN> BACKUP DATABASE PLUS ARCHIVELOG;

Output
Starting backup at 01-JUL-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=58 device type=DISK
specification does not match any archived log in the repository
backup cancelled because there are no files to backup
Finished backup at 01-JUL-13
Starting backup at 01-JUL-13
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=00009 name=/dbs/CONDB/PDB/sysaux01.dbf
input datafile file number=00011 name=/dbs/CONDB/PDB/example01.dbf
input datafile file number=00008 name=/dbs/CONDB/PDB/system01.dbf
input datafile file number=00019 name=/dbs/CONDB/PDB/root_cdb_01.dbf
input datafile file number=00022 name=/dbs/CONDB/PDB/ts_pdb_01.dbf
input datafile file number=00010 name=/dbs/CONDB/PDB/SAMPLE_SCHEMA_users01.dbf
channel ORA_DISK_1: starting piece 1 at 01-JUL-13
channel ORA_DISK_1: finished piece 1 at 01-JUL-13
piece handle=/backup/CONDB/CONDB_47_819653777_CONDB tag=TAG20130701T173617 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
Finished backup at 01-JUL-13
Starting backup at 01-JUL-13
using channel ORA_DISK_1
specification does not match any archived log in the repository
backup cancelled because there are no files to backup
Finished backup at 01-JUL-13
Starting Control File and SPFILE Autobackup at 01-JUL-13
piece handle=/backup/CONDB/c-1075048777-20130701-03 comment=NONE

Finished Control File and SPFILE Autobackup at 01-JUL-13

OCP_L

OCP_L

You can not delete archive logs when connected to the PDB directly.
C seems to be the only possible answer

max

max

C tested and same results as tri!

Mohamed

Mohamed

I would answer it B

Notice “specification does not match any archived log in the repository” in the RMAN example, it try to backup the archive log files but seems there is no file generated to backup.

Mohamed

Mohamed

Apologize ==> I was wrong, you are right

====> C is the right answer <====

The following is the RMAN Restrictions When Connected to a PDB :
Back up or Delete archived logs
Delete archived log backups
Restore archived logs
Point-in-time recovery (PITR)
TSPITR
Table recovery
Duplicate database
Flashback operations
Running Data Recovery Advisor
Report/delete obsolete
Register database
Import catalog
Reset database
Configuring the RMAN environment (using the CONFIGURE command)

REF: http://docs.oracle.com/database/121/BRADV/rcmcnctg.htm#BRADV005

Thanks

goszczu

goszczu

C

ยท Connect to the PDB and use the BACKUP DATABASE command. This approach backs up only a single PDB and enables you to use the same commands used for backing up non-CDBs.
Backups created when connected to any PDB are visible when connected to the root.
When you back up individual PDBs, the archived redo logs are not backed up.

Roshan

Roshan

why can’t we delete archivelogs when connecting to PDBS?