To backup the container database , connect RMAN to the root using sysdba or sysbackup.
Note: sysdbackup is a new user introduced in 12c.
After setting the environment variables for the CDB I'm connecting using OS level authentication (sysdba is already the part of OS group) as below.
-bash-4.1$ rman target /
Recovery Manager: Release 12.1.0.2.0 - Production on Sat Aug 4 16:50:18 2018
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL1210 (DBID=2368395079)
Now you can take the backup in the same way you take it for non -CDB databases.
RMAN> backup database;
Starting backup at 04-AUG-18
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=21 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
Note: sysdbackup is a new user introduced in 12c.
After setting the environment variables for the CDB I'm connecting using OS level authentication (sysdba is already the part of OS group) as below.
-bash-4.1$ rman target /
Recovery Manager: Release 12.1.0.2.0 - Production on Sat Aug 4 16:50:18 2018
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL1210 (DBID=2368395079)
Now you can take the backup in the same way you take it for non -CDB databases.
RMAN> backup database;
Starting backup at 04-AUG-18
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=21 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
*********************excerpts*********************
Starting Control File and SPFILE Autobackup at 04-AUG-18
piece handle=u01/app/12.1.0.2/oracle/product/12.1.0.2/dbhome2/dbs/c-2368395079-20180804-02 comment=NONE
Finished Control File and SPFILE Autobackup at 04-AUG-18
RMAN>
Now, Can we backup pluggable database in same session ?
Yes , I checked it , see below. Please make a note to use the keyword "PLUGGABLE" when backing up the pluggable database.
RMAN> backup pluggable database pdb1;
Starting backup at 04-AUG-18
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=42 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
**************excerpts*****************
piece handle=/u01/app/12.1.0.2/oracle/product/12.1.0.2/dbhome2/dbs/c-2368395079-20180804-03 comment=NONE
Finished Control File and SPFILE Autobackup at 04-AUG-18
RMAN>
Hope it helps.
Comments
Post a Comment