Introduction: –   As a DBA we all familiar with the backup commands. In the latest database of Oracle,  we find some different commands we must keep it in mind how to take backup. In this article, we are going to know about the  Rman Backup In Multitenant Database Oracle 12c.With multitenant feature introduced in oracle 12c, New commands are there for taking rman backup of the pluggable database and root container database.

Backup of complete container( ROOT + ALL PDBS )
SQL> show pdbs
 
    CON_ID CON_NAME			  OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
 2 PDB$SEED			  READ ONLY  NO
 3 ORCL 			  READ WRITE NO
 5 PROD_MN			  READ WRITE NO
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

—- Connect to root container

[oracle@localhost ~]$ rman target sys/oracle@cdb1
 
Recovery Manager: Release 12.1.0.2.0 - Production on Fri Aug 28 22:46:04 2015
 
Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.
 
connected to target database: CDB1 (DBID=828012650)

 
RMAN> backup database plus archivelog
2> ;
  
Starting backup at 28-AUG-15
current log archived
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=30 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=165 RECID=1 STAMP=886318673
input archived log thread=1 sequence=166 RECID=2 STAMP=886319099
input archived log thread=1 sequence=167 RECID=3 STAMP=886320315
input archived log thread=1 sequence=168 RECID=4 STAMP=886321194
 
channel ORA_DISK_1: finished piece 1 at 28-AUG-15
piece handle=/home/oracle/app/oracle/fast_recovery_area/CDB1/backupset/2015_08_28/o1_mf_annnn_TAG20150828T224727_by2kxold_.bkp tag=TAG20150828T224727 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:56
Finished backup at 28-AUG-15
 
Starting backup at 28-AUG-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=00031 name=/home/oracle/app/oracle/oradata/cdb1/testencry.dbf
input datafile file number=00003 name=/home/oracle/app/oracle/oradata/cdb1/sysaux01.dbf
input datafile file number=00001 name=/home/oracle/app/oracle/oradata/cdb1/system01.dbf
input datafile file number=00004 name=/home/oracle/app/oracle/oradata/cdb1/undotbs01.dbf
input datafile file number=00034 name=/home/oracle/app/oracle/oradata/cdb1/dataconversion.dbf
input datafile file number=00037 name=/home/oracle/app/oracle/oradata/cdb1/testin1.dbf
input datafile file number=00006 name=/home/oracle/app/oracle/oradata/cdb1/users01.dbf
channel ORA_DISK_1: starting piece 1 at 28-AUG-15
 
Starting backup at 28-AUG-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=268 RECID=104 STAMP=888965884
channel ORA_DISK_1: starting piece 1 at 28-AUG-15
channel ORA_DISK_1: finished piece 1 at 28-AUG-15
piece handle=/home/oracle/app/oracle/fast_recovery_area/CDB1/backupset/2015_08_28/o1_mf_annnn_TAG20150828T225804_by2lhdwl_.bkp tag=TAG20150828T225804 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 28-AUG-15
 
Starting Control File and SPFILE Autobackup at 28-AUG-15
piece handle=/home/oracle/app/oracle/fast_recovery_area/CDB1/autobackup/2015_08_28/o1_mf_s_888965886_by2lhhc8_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 28-AUG-15
Taking backup of particular pluggable database:(backup pluggable database ORCL;)

—- Connect to root container

[oracle@localhost ~]$ rman target sys/oracle@cdb1

Recovery Manager: Release 12.1.0.2.0 - Production on Fri Aug 28 22:46:04 2015

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

connected to target database: CDB1 (DBID=828012650)


RMAN> backup pluggable database ORCL;
Starting backup at 28-AUG-15
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=12 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00008 name=/home/oracle/app/oracle/oradata/cdb1/orcl/system01.dbf
input datafile file number=00011 name=/home/oracle/app/oracle/oradata/cdb1/orcl/example01.dbf
input datafile file number=00009 name=/home/oracle/app/oracle/oradata/cdb1/orcl/sysaux01.dbf
input datafile file number=00010 name=/home/oracle/app/oracle/oradata/cdb1/orcl/SAMPLE_SCHEMA_users01.dbf
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00008 name=/home/oracle/app/oracle/oradata/cdb1/orcl/system01.dbf
input datafile file number=00011 name=/home/oracle/app/oracle/oradata/cdb1/orcl/example01.dbf
input datafile file number=00009 name=/home/oracle/app/oracle/oradata/cdb1/orcl/sysaux01.dbf
input datafile file number=00010 name=/home/oracle/app/oracle/oradata/cdb1/orcl/SAMPLE_SCHEMA_users01.dbf
input datafile file number=00033 name=/home/oracle/app/oracle/oradata/cdb1/orcl/dataconversion.dbf
input datafile file number=00023 name=/home/oracle/app/oracle/oradata/cdb1/orcl/APEX_3496321052328731.dbf
input datafile file number=00027 name=/home/oracle/app/oracle/oradata/cdb1/orcl/APEX_3638406606618093.dbf
input datafile file number=00029 name=/home/oracle/app/oracle/oradata/cdb1/orcl/APEX_1780406307370394.dbf
input datafile file number=00028 name=/home/oracle/app/oracle/oradata/cdb1/orcl/APEX_3753603687620385.dbf
input datafile file number=00030 name=/home/oracle/app/oracle/oradata/cdb1/orcl/APEX_5372044460374154.dbf
input datafile file number=00024 name=/home/oracle/app/oracle/oradata/cdb1/orcl/APEX_3618122143496338.dbf
input datafile file number=00025 name=/home/oracle/app/oracle/oradata/cdb1/orcl/APEX_3624405313851440.dbf
input datafile file number=00026 name=/home/oracle/app/oracle/oradata/cdb1/orcl/APEX_3632418306476203.dbf
channel ORA_DISK_1: starting piece 1 at 28-AUG-15
channel ORA_DISK_1: finished piece 1 at 28-AUG-15
piece handle=/home/oracle/app/oracle/fast_recovery_area/CDB1/FF72AA85A0370D5BE045000000000001/backupset/2015_08_28/o1_mf_nnndf_TAG20150828T232125_by2mv65d_.bkp tag=TAG20150828T232125 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:15
Finished backup at 28-AUG-15

Starting Control File and SPFILE Autobackup at 28-AUG-15
piece handle=/home/oracle/app/oracle/fast_recovery_area/CDB1/autobackup/2015_08_28/o1_mf_s_888967361_by2mxlpf_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 28-AUG-15

channel ORA_DISK_1: starting piece 1 at 28-AUG-15
Backup of only root container:
RMAN> backup database root ;
Starting backup at 29-AUG-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=00031 name=/home/oracle/app/oracle/oradata/cdb1/testencry.dbf
input datafile file number=00003 name=/home/oracle/app/oracle/oradata/cdb1/sysaux01.dbf
input datafile file number=00001 name=/home/oracle/app/oracle/oradata/cdb1/system01.dbf
input datafile file number=00004 name=/home/oracle/app/oracle/oradata/cdb1/undotbs01.dbf
input datafile file number=00034 name=/home/oracle/app/oracle/oradata/cdb1/dataconversion.dbf
input datafile file number=00037 name=/home/oracle/app/oracle/oradata/cdb1/testin1.dbf
input datafile file number=00006 name=/home/oracle/app/oracle/oradata/cdb1/users01.dbf
channel ORA_DISK_1: starting piece 1 at 29-AUG-15

channel ORA_DISK_1: finished piece 1 at 29-AUG-15
piece handle=/home/oracle/app/oracle/fast_recovery_area/CDB1/backupset/2015_08_29/o1_mf_nnndf_TAG20150829T010145_by2sqbd9_.bkp tag=TAG20150829T010145 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:25
Finished backup at 29-AUG-15

Starting Control File and SPFILE Autobackup at 29-AUG-15
piece handle=/home/oracle/app/oracle/fast_recovery_area/CDB1/autobackup/2015_08_29/o1_mf_s_888973391_by2sszjo_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 29-AUG-15
Backup of tablespace of pluggable database(by connecting to PDB )
RMAN> backup tablespace USERS;

Starting backup at 29-AUG-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=00010 name=/home/oracle/app/oracle/oradata/cdb1/orcl/SAMPLE_SCHEMA_users01.dbf
channel ORA_DISK_1: starting piece 1 at 29-AUG-15
channel ORA_DISK_1: finished piece 1 at 29-AUG-15
piece handle=/home/oracle/app/oracle/fast_recovery_area/CDB1/FF72AA85A0370D5BE045000000000001/backupset/2015_08_29/o1_mf_nnndf_TAG20150829T011323_by2tf3vl_.bkp tag=TAG20150829T011323 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
Finished backup at 29-AUG-15

Starting Control File and SPFILE Autobackup at 29-AUG-15
piece handle=/home/oracle/app/oracle/fast_recovery_area/CDB1/autobackup/2015_08_29/o1_mf_s_888974011_by2tfcd3_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 29-AUG-15

In this article, we have gone through some different and new commands which give an introduction of 12c. Backup plays an important role in any DBA’s job. Oracle latest version provides some new way to get backup. Being Oracle DBA we must have good knowledge of backup of the database . I hope this article provides you a proper acknowledge and help you take backup.

About The Author

Leave a Reply

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