[Oracle 12c] BACKUP PLUGGABLE DATABASE

Backing up the Oracle database is always very important. In version 12c, there is the possibility of backing up one or more PDBs. There are two methods to back up the PDB, one is connecting directly as a ROOT in RMAN and using the “BACKUP PLUGGABLE DATABASE” command or the option to connect directly to the PDB through the service and execute the “BACKUP DATABASE” command.
So, in this post I will be explaining just how to backup the PDB by connecting as ROOT and using as an example a PDB called PDB2_1:


SQL> select name, open_mode from v$pdbs;

NAME			       OPEN_MODE
------------------------------ ----------
PDB$SEED		       READ ONLY
PDB2_1			       READ WRITE

1. Connect to the RMAN catalog:


[oracle@dbdg backupset]$ rman

Recovery Manager: Release 12.1.0.2.0 - Production on Fri May 4 12:58:55 2018

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

RMAN> connect target /

connected to target database: SEIS (DBID=2199653114)

RMAN> connect catalog rcatowner/Oracle_4U@rman 

connected to recovery catalog database

2- Execute  BACKUP PLUGGABLE DATABASE PDB2_1:


RMAN> BACKUP PLUGGABLE DATABASE PDB2_1;

Starting backup at 04-MAY-18
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=/u01/app/oracle/oradata/SEIS/6983EA2A4E4C651AE0534738A8C0CBC9/datafile/o1_mf_sysaux_fdt1k3gx_.dbf
input datafile file number=00008 name=/u01/app/oracle/oradata/SEIS/6983EA2A4E4C651AE0534738A8C0CBC9/datafile/o1_mf_system_fdt1k3fy_.dbf
input datafile file number=00012 name=/u01/app/oracle/oradata/SEIS/datafile/o1_mf_teste_ff8v0jcq_.dbf
input datafile file number=00010 name=/u01/app/oracle/oradata/SEIS/6983EA2A4E4C651AE0534738A8C0CBC9/datafile/o1_mf_users_fdt1kp16_.dbf
channel ORA_DISK_1: starting piece 1 at 04-MAY-18
channel ORA_DISK_1: finished piece 1 at 04-MAY-18
piece handle=/u01/app/oracle/fast_recovery_area/SEIS/6983EA2A4E4C651AE0534738A8C0CBC9/backupset/2018_05_04/o1_mf_nnndf_TAG20180504T131006_fgs4zgqw_.bkp tag=TAG20180504T131006 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
Finished backup at 04-MAY-18

Starting Control File and SPFILE Autobackup at 04-MAY-18
piece handle=/u01/app/oracle/fast_recovery_area/SEIS/autobackup/2018_05_04/o1_mf_s_975244223_fgs4zzpz_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 04-MAY-18


Efetuar o backup do banco de dados Oracle é sempre muito importante. Na versao 12c, há a possibilidade de se efetuar o backup de um ou mais PDBs. Existem dois métodos para se efetuar o backup do PDB, um é se conectando diretamente como ROOT no RMAN e utilizando o comando “BACKUP PLUGGABLE DATABASE” ou a opcao de se conectar diretamente no PDB através do servico e executar o comando “BACKUP DATABASE”.
Sendo assim, neste post estarei exemplificando apenas como se efetuar o backup do PDB conectando como ROOT e utilizando como exemplo um PDB chamado PDB2_1:


SQL> select name, open_mode from v$pdbs;

NAME			       OPEN_MODE
------------------------------ ----------
PDB$SEED		       READ ONLY
PDB2_1			       READ WRITE

1. Conecte no catálago do RMAN:


[oracle@dbdg backupset]$ rman

Recovery Manager: Release 12.1.0.2.0 - Production on Fri May 4 12:58:55 2018

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

RMAN> connect target /

connected to target database: SEIS (DBID=2199653114)

RMAN> connect catalog rcatowner/Oracle_4U@rman 

connected to recovery catalog database

2- Execute o comando BACKUP PLUGGABLE DATABASE PDB2_1:


RMAN> BACKUP PLUGGABLE DATABASE PDB2_1;

Starting backup at 04-MAY-18
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=/u01/app/oracle/oradata/SEIS/6983EA2A4E4C651AE0534738A8C0CBC9/datafile/o1_mf_sysaux_fdt1k3gx_.dbf
input datafile file number=00008 name=/u01/app/oracle/oradata/SEIS/6983EA2A4E4C651AE0534738A8C0CBC9/datafile/o1_mf_system_fdt1k3fy_.dbf
input datafile file number=00012 name=/u01/app/oracle/oradata/SEIS/datafile/o1_mf_teste_ff8v0jcq_.dbf
input datafile file number=00010 name=/u01/app/oracle/oradata/SEIS/6983EA2A4E4C651AE0534738A8C0CBC9/datafile/o1_mf_users_fdt1kp16_.dbf
channel ORA_DISK_1: starting piece 1 at 04-MAY-18
channel ORA_DISK_1: finished piece 1 at 04-MAY-18
piece handle=/u01/app/oracle/fast_recovery_area/SEIS/6983EA2A4E4C651AE0534738A8C0CBC9/backupset/2018_05_04/o1_mf_nnndf_TAG20180504T131006_fgs4zgqw_.bkp tag=TAG20180504T131006 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
Finished backup at 04-MAY-18

Starting Control File and SPFILE Autobackup at 04-MAY-18
piece handle=/u01/app/oracle/fast_recovery_area/SEIS/autobackup/2018_05_04/o1_mf_s_975244223_fgs4zzpz_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 04-MAY-18

Related posts

Leave a Comment