您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
Oracle 12c RMAN新特性
SYSBACKUP This privilege allows a user to perform backup and recovery
operations either from Oracle Recovery Manager (RMAN) or
SQL*Plus.
See Oracle Database Security Guidefor the full list of operations allowed
by this administrative privilege.
1.rman 中可以执行sql
<rac02:orcl2:/home/oracle>$rman target /
Recovery Manager: Release 12.1.0.2.0 - Production on Fri Dec 8 06:46:59 2017
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (DBID=1482320270)
RMAN> create user roidba identified by roidba;
using target database control file instead of recovery catalog
Statement processed
RMAN> grant sysbackup to roidba;
Statement processed
RMAN> exit
2.备份用户特权sysbackup,可以备份恢复
<rac02:orcl2:/home/oracle>$rman target '"roidba/roidba@orcl as sysbackup"'
Recovery Manager: Release 12.1.0.2.0 - Production on Fri Dec 8 06:49:21 2017
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (DBID=1482320270)
RMAN> backup database;
Starting backup at 08-DEC-2017 06:50:07
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=86 instance=orcl2 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=+DATADG/ORCL/DATAFILE/system.258.954539407
input datafile file number=00003 name=+DATADG/ORCL/DATAFILE/sysaux.257.954539345
input datafile file number=00004 name=+DATADG/ORCL/DATAFILE/undotbs1.260.954539485
input datafile file number=00005 name=+DATADG/ORCL/DATAFILE/undotbs2.265.954539975
input datafile file number=00006 name=+DATADG/ORCL/DATAFILE/users.259.962189275
channel ORA_DISK_1: starting piece 1 at 08-DEC-2017 06:50:10
channel ORA_DISK_1: finished piece 1 at 08-DEC-2017 06:51:45
piece handle=/u01/app/oracle/product/12.1.0/dbhome_1/dbs/2rslj812_1_1 tag=TAG20171208T065009 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:35
Finished backup at 08-DEC-2017 06:51:45
Starting Control File and SPFILE Autobackup at 08-DEC-2017 06:51:45
piece handle=/u01/app/oracle/product/12.1.0/dbhome_1/dbs/c-1482320270-20171208-04 comment=NONE
Finished Control File and SPFILE Autobackup at 08-DEC-2017 06:51:52
RMAN>
生产环境建议大家使用专用用户,不要什么时候都使用sysdba权限,防止误操作,养成好习惯。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。