12c RMAN-1 SYSBACKUP

在12c中引入了SYSBACKUP这个权限或者用户来进行RMAN备份和恢复操作,不再需要给特定用户授予SYSDBA权限来进行备份操作。
SYSBACKUP分配了2个角色:SELECT_CATALOG_ROLE和HS_ADMIN_SELECT_ROLE。

1. 操作系统验证

[oracle@oel12c1 ~]$  rman target '"/ as sysbackup"'

Recovery Manager: Release 12.1.0.2.0 - Production on Wed Jan 14 10:42:52 2015

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

connected to target database: CDBRAC (DBID=339653049)

RMAN> BACKUP DATAFILE 1;

Starting backup at 14-JAN-15
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=34 instance=cdbrac1 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=78 instance=cdbrac1 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=71 instance=cdbrac1 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=+DATA/CDBRAC/DATAFILE/system.278.854056479
channel ORA_DISK_1: starting piece 1 at 14-JAN-15
channel ORA_DISK_1: finished piece 1 at 14-JAN-15
piece handle=+DATA/CDBRAC/BACKUPSET/2015_01_14/nnndf0_tag20150114t104751_0.306.868963673 tag=TAG20150114T104751 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:46
Finished backup at 14-JAN-15

Starting Control File and SPFILE Autobackup at 14-JAN-15
piece handle=+DATA/CDBRAC/AUTOBACKUP/2015_01_14/s_868963777.307.868963779 comment=NONE
Finished Control File and SPFILE Autobackup at 14-JAN-15

2. 创建具有SYSBACKUP权限的用户

[oracle@oel12c1 ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 12.1.0.2.0 Production on Wed Jan 14 10:51:19 2015

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options

SQL> create user c##backupadm identified by oracle;

User created.

SQL> grant sysbackup to c##backupadm;

Grant succeeded.

SQL> !rman target c##backupadm

Recovery Manager: Release 12.1.0.2.0 - Production on Wed Jan 14 10:52:49 2015

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

target database Password: 
connected to target database: CDBRAC (DBID=339653049)
RMAN> backup datafile 6;

Starting backup at 14-JAN-15
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=82 instance=cdbrac1 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=55 instance=cdbrac1 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=73 instance=cdbrac1 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=00006 name=+DATA/CDBRAC/DATAFILE/users.279.854056585
channel ORA_DISK_1: starting piece 1 at 14-JAN-15
channel ORA_DISK_1: finished piece 1 at 14-JAN-15
piece handle=+DATA/CDBRAC/BACKUPSET/2015_01_14/nnndf0_tag20150114t105324_0.308.868964005 tag=TAG20150114T105324 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 14-JAN-15

Starting Control File and SPFILE Autobackup at 14-JAN-15
piece handle=+DATA/CDBRAC/AUTOBACKUP/2015_01_14/s_868964006.309.868964009 comment=NONE
Finished Control File and SPFILE Autobackup at 14-JAN-15

此条目发表在rman分类目录。将固定链接加入收藏夹。

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s