Vous êtes sur la page 1sur 7

RMAN Enhancements Oracle 12c

RMAN Features 12c


1. Includes Permissions for backup and recovery
2. Does not include data access privileges such as SELECT ANY TABLE
3. Introducing task-specific and least-privileged administrative privilege SYSBACKUP

Feature-1 SYSBACKUP Privilege


[oracle@12casm ~]$ . oraenv
ORACLE_SID = [cdb2] ? cdb3
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@12casm ~]$ sqlplus /nolog
SQL> connect sys/oracle@192.168.56.150:1521/cdb3 as sysdba
Connected.
SQL> select name,open_mode from v$pdbs;
NAME
OPEN_MODE
-------------------------------------------------------PDB$SEED
READ ONLY
PDB1
READ WRITE
SQL> create user c##1 identified by oracle container=all;
User created.
SQL> grant create session to c##1 container=all;
Grant succeeded.
SQL> grant sysbackup to c##1;
Grant succeeded.
SQL> show parameter db_re
SQL> shut immediate;
SQL> connect sys/oracle as sysdba
SQL> startup mount;
SQL> alter database archivelog;
Database altered.
SQL> shut immediate;

RMAN Enhancements Oracle Database 12c

Page 1 of 7

SQL> connect sys/oracle as sysdba


Connected to an idle instance.
SQL> startup mount;
SQL> alter database open;
Database altered.
SQL> archive log list;
SQL> select name, open_mode from v$database;
NAME OPEN_MODE
--------- -------------------CDB3 READ WRITE
SQL> !
[oracle@12casm ~]$ rman target '"c##1@cdb3 as sysbackup"'
target database Password:
connected to target database: CDB3 (DBID=560956977)
RMAN> backup database;
Starting backup at 14-NOV-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=55 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=00001
name=/u01/app/oracle/oradata/CDB3/datafile/o1_mf_system_b6cxny8j_.dbf
input datafile file number=00003
name=/u01/app/oracle/oradata/CDB3/datafile/o1_mf_sysaux_b6cxlwsk_.dbf
input datafile file number=00004
name=/u01/app/oracle/oradata/CDB3/datafile/o1_mf_undotbs1_b6cxqo85_.dbf
input datafile file number=00011
name=/u01/app/oracle/oradata/CDB3/datafile/target_ts_01.dbf
input datafile file number=00006
name=/u01/app/oracle/oradata/CDB3/datafile/o1_mf_users_b6cxqml2_.dbf
channel ORA_DISK_1: starting piece 1 at 14-NOV-14
channel ORA_DISK_1: finished piece 1 at 14-NOV-14
piece
handle=/u01/app/oracle/fast_recovery_area/CDB3/backupset/2014_11_14/o1_mf_nnndf_TAG
20141114T184738_b6d07mky_.bkp tag=TAG20141114T184738 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:05
channel ORA_DISK_1: starting full datafile backup set

RMAN Enhancements Oracle Database 12c

Page 2 of 7

channel ORA_DISK_1: specifying datafile(s) in backup set


input datafile file number=00009
name=/u01/app/oracle/oradata/CDB3/07D1F20A94365612E0539638A8C0D95F/datafile/o1_m
f_sysaux_b6cy3kww_.dbf
input datafile file number=00008
name=/u01/app/oracle/oradata/CDB3/07D1F20A94365612E0539638A8C0D95F/datafile/o1_m
f_system_b6cy3ktm_.dbf
input datafile file number=00010
name=/u01/app/oracle/oradata/CDB3/07D1F20A94365612E0539638A8C0D95F/datafile/o1_m
f_users_b6cy59lq_.dbf
channel ORA_DISK_1: starting piece 1 at 14-NOV-14
channel ORA_DISK_1: finished piece 1 at 14-NOV-14
piece
handle=/u01/app/oracle/fast_recovery_area/CDB3/07D1F20A94365612E0539638A8C0D95F/b
ackupset/2014_11_14/o1_mf_nnndf_TAG20141114T184738_b6d09nrj_.bkp
tag=TAG20141114T184738 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
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/CDB3/datafile/o1_mf_sysaux_b6cxsk9t_.dbf
input datafile file number=00005
name=/u01/app/oracle/oradata/CDB3/datafile/o1_mf_system_b6cxskbh_.dbf
channel ORA_DISK_1: starting piece 1 at 14-NOV-14
channel ORA_DISK_1: finished piece 1 at 14-NOV-14
piece
handle=/u01/app/oracle/fast_recovery_area/CDB3/07D1E2AA392852A3E0539638A8C0484A/b
ackupset/2014_11_14/o1_mf_nnndf_TAG20141114T184738_b6d0br4p_.bkp
tag=TAG20141114T184738 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
Finished backup at 14-NOV-14
Starting Control File and SPFILE Autobackup at 14-NOV-14
piece
handle=/u01/app/oracle/fast_recovery_area/CDB3/autobackup/2014_11_14/o1_mf_s_863635
795_b6d0cx0t_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 14-NOV-14

Method:2
[oracle@12casm ~]$ rman target '"/ as sysbackup"'
Recovery Manager: Release 12.1.0.2.0 - Production on Fri Nov 14 19:15:42 2014

RMAN Enhancements Oracle Database 12c

Page 3 of 7

Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: CDB3 (DBID=560956977)
RMAN> backup database;
Starting backup at 14-NOV-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
The SYSBACKUP user is granted the following:
SQL> select privilege from dba_sys_privs where grantee='SYSBACKUP';
PRIVILEGE
---------------------------------------ALTER SYSTEM
AUDIT ANY
SELECT ANY TRANSACTION
SELECT ANY DICTIONARY
RESUMABLE
CREATE ANY DIRECTORY
UNLIMITED TABLESPACE
ALTER TABLESPACE
ALTER SESSION
ALTER DATABASE
CREATE ANY TABLE
DROP TABLESPACE
CREATE ANY CLUSTER

Feature-2: Using SQL in RMAN prompt


1. No SQL prefix or quotes required
2. Provides SQL *Plus DESCRIBE functionality
SQL> connect sys/oracle@192.168.56.150:1521/cdb3 as sysdba
Connected.
SQL> grant create any table to c##1;
Grant succeeded.
SQL> connect c##1/oracle@cdb3
Connected.
SQL> create table sample (no number);
Table created.

RMAN Enhancements Oracle Database 12c

Page 4 of 7

SQL> !
[oracle@12casm ~]$ rman target '"sys@cdb3 as sysdba"'
target database Password:
connected to target database: CDB3 (DBID=560956977)
RMAN> desc c##1.sample;
using target database control file instead of recovery catalog
Name
Null? Type
----------------------------------------- -------- ---------------------------NO
NUMBER
Adding datafile to Tablespace:
[oracle@12casm ~]$ rman target '"sys@cdb3 as sysdba"'
target database Password:
connected to target database: CDB3 (DBID=560956977)
RMAN> select file_name from dba_data_files;
using target database control file instead of recovery catalog
FILE_NAME
-------------------------------------------------------------------------------/u01/app/oracle/oradata/CDB3/datafile/o1_mf_system_b6cxny8j_.dbf
/u01/app/oracle/oradata/CDB3/datafile/o1_mf_sysaux_b6cxlwsk_.dbf
/u01/app/oracle/oradata/CDB3/datafile/o1_mf_undotbs1_b6cxqo85_.dbf
/u01/app/oracle/oradata/CDB3/datafile/o1_mf_users_b6cxqml2_.dbf
/u01/app/oracle/oradata/CDB3/datafile/target_ts_01.dbf
RMAN> alter tablespace target_ts add datafile
'/u01/app/oracle/oradata/CDB3/datafile/target_ts_02.dbf' Size 10M;
Statement processed
RMAN> select file_name from dba_data_files;
FILE_NAME
-------------------------------------------------------------------------------/u01/app/oracle/oradata/CDB3/datafile/o1_mf_system_b6cxny8j_.dbf
/u01/app/oracle/oradata/CDB3/datafile/o1_mf_sysaux_b6cxlwsk_.dbf
/u01/app/oracle/oradata/CDB3/datafile/o1_mf_users_b6cxqml2_.dbf
/u01/app/oracle/oradata/CDB3/datafile/o1_mf_undotbs1_b6cxqo85_.dbf
/u01/app/oracle/oradata/CDB3/datafile/target_ts_01.dbf
/u01/app/oracle/oradata/CDB3/datafile/target_ts_02.dbf

RMAN Enhancements Oracle Database 12c

Page 5 of 7

Feature-3: Backing up and Restoring Very Large Files


In 12c, multisectional backups are available for all backup types, this includes backupsets
(which was the functionality added in 11g), image copies and incremental backups. The use of
this feature can reduce the completion time for non-backup use cases such as copying a file as
part of transportable tablespace procedure or for creating a clone with the active database
duplication.
This new functionality requires compatible to be set to 12.0 and is only used for datafiles.
RMAN> backup incremental level 0 section size 300M database;
RMAN> backup incremental level 1 section size 300M database;

1. Oracle data files can be upto 128 TB in size


2. RMAN can break up large files into sections and it can be backup and restore these
sections independently using section size clause
3. Benefit to Exadata
4. Reduce image copy creation time
5. Set compatible to 12.0
6. For full and incremental backups

Feature-4: Support for Container and Pluggable Databases


RMAN in 12c provides full backup and recovery support for a Pluggable Database
environment. You can perform backup of the entire container database (CDB), either full or
using incremental backup strategy, or one/many pluggable databases (PDB).

Feature-5: Active Database Duplication Improvements


The active duplicate option was implemented in RMAN 11g, this functionality used a push
process from target (source) to the auxiliary (destination) sending full image datafile copies
across the network. The target channels did the work pushing the datafile across the network
to the auxiliary instance from the target database.
In 12c, by default RMAN uses a pull (or restore) process and uses backupsets for active
duplication. Rather than the image copy of the datafile, rman sends datafile data as backupsets
to the auxiliary instance and from within that instances restores the datafiles. Preexisting
backups are not used by this operation, instead, rman will create a new backupset on the
source and directly transmit (through Sql*net) to the auxiliary. With the use of backupsets,
options such as compression, section size and/or encryption become available and can be
added within the duplicate command.

RMAN Enhancements Oracle Database 12c

Page 6 of 7

In 12c to parallelize the active duplicate execution, multiple auxiliary channels must be
allocated rather than target channels as is the case in 11g.
This new functionality reduces the impact on the source database during the active duplication
process by off-loading the data transfer operations to the auxiliary server. A reduced
duplication time for database with large files can be achieved by spreading out the restore
workload using compression and/or multisectional backup.

RMAN Enhancements Oracle Database 12c

Page 7 of 7

Vous aimerez peut-être aussi