重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2002|回复: 0
打印 上一主题 下一主题

12c备份权限用户

[复制链接]
跳转到指定楼层
楼主
发表于 2019-7-30 14:44:57 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
在12c之前,要备份,必须要sysdba权限,即使system用户都不行,从12c开始,新增加了一个新用户 sysbackup,以及权限 sysbackup,有这个权限的用户,就可以进行数据库备份了

sql>create user c##bak identified by bak;

sql>grant connect,sysbackup to c##bak;

rman target '"c##bak/bak@sztech as sysbackup"'

rman >backup spfile;

附操作:

[oracle@dbserver ~]$ rman target '"c##bak/bak@sztech as sysbackup"'
Recovery Manager: Release 12.1.0.2.0 - Production on Tue Jul 30 14:43:33 2019
Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.
connected to target database: SZTECH (DBID=3310902941)
RMAN> backup spfile;
Starting backup at 30-JUL-19
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=280 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 30-JUL-19
channel ORA_DISK_1: finished piece 1 at 30-JUL-19
piece handle=/u01/app/oracle/fast_recovery_area/SZTECH/backupset/2019_07_30/o1_mf_nnsnf_TAG20190730T144345_gmzss1yc_.bkp tag=TAG20190730T144345 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 30-JUL-19
Starting Control File and SPFILE Autobackup at 30-JUL-19
piece handle=/u01/app/oracle/fast_recovery_area/SZTECH/autobackup/2019_07_30/o1_mf_s_1014993827_gmzss37l_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 30-JUL-19
RMAN> list backup;

List of Backup Sets
===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1       Full    80.00K     DISK        00:00:00     29-JUL-19      
        BP Key: 1   Status: AVAILABLE  Compressed: NO  Tag: TAG20190729T190723
        Piece Name: /u01/app/oracle/fast_recovery_area/SZTECH/backupset/2019_07_29/o1_mf_nnsnf_TAG20190729T190723_gmxnvc70_.bkp
  SPFILE Included: Modification time: 29-JUL-19
  SPFILE db_unique_name: SZTECH
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2       Full    17.20M     DISK        00:00:00     29-JUL-19      
        BP Key: 2   Status: AVAILABLE  Compressed: NO  Tag: TAG20190729T190724
        Piece Name: /u01/app/oracle/fast_recovery_area/SZTECH/autobackup/2019_07_29/o1_mf_s_1014923244_gmxnvdlg_.bkp
  SPFILE Included: Modification time: 29-JUL-19
  SPFILE db_unique_name: SZTECH
  Control File Included: Ckp SCN: 2488459      Ckp time: 29-JUL-19
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
3       Full    80.00K     DISK        00:00:00     30-JUL-19      
        BP Key: 3   Status: AVAILABLE  Compressed: NO  Tag: TAG20190730T144345
        Piece Name: /u01/app/oracle/fast_recovery_area/SZTECH/backupset/2019_07_30/o1_mf_nnsnf_TAG20190730T144345_gmzss1yc_.bkp
  SPFILE Included: Modification time: 30-JUL-19
  SPFILE db_unique_name: SZTECH
BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
4       Full    17.20M     DISK        00:00:00     30-JUL-19      
        BP Key: 4   Status: AVAILABLE  Compressed: NO  Tag: TAG20190730T144347
        Piece Name: /u01/app/oracle/fast_recovery_area/SZTECH/autobackup/2019_07_30/o1_mf_s_1014993827_gmzss37l_.bkp
  SPFILE Included: Modification time: 30-JUL-19
  SPFILE db_unique_name: SZTECH
  Control File Included: Ckp SCN: 2490627      Ckp time: 30-JUL-19
RMAN>


分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-11-28 20:57 , Processed in 0.098097 second(s), 20 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表