本文主要是介绍【12c】oracle12c 的SYSBACKUP、SYSDG、SYSKM系统用户,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
https://docs.oracle.com/en/database/oracle/oracle-database/12.2/dbseg/configuring-privilege-and-role-authorization.html#GUID-633842B8-4B19-4F96-A757-783BF62825A7
oracle12c 推出了三个新的系统用户SYSBACKUP、SYSDG、SYSKM,下面文章源自官方文档
1、Administrative Privileges
Administrative privileges that are required for an administrator to perform basic
database operations are granted through the following special system privileges:
■ SYSDBA
■ SYSOPER
■ SYSBACKUP
■ SYSDG
■ SYSKM
You must have one of these privileges granted to you, depending upon the level of
authorization you require.
Starting with Oracle Database 12c, the SYSBACKUP, SYSDG, and SYSKM administrative
privileges are available. Each new administrative privilege grants the minimum
required privileges to complete tasks ineach area of administration. The new
administrative privileges enable you to avoid granting SYSDBAadministrative privilege
for many common tasks.
来查询一下系统用户
-
[oracle@test ~]$ sqlplus / as sysbackup
-
-
SQL*Plus: Release 12.1.0.2.0 Production on Tue Mar 8 15:44:58 2016
-
-
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, OLAP, Advanced Analytics and Real Application Testing options
-
-
SQL> select sys_context( 'USERENV' , 'CURRENT_SCHEMA' ) from dual;
-
-
SYS_CONTEXT( 'USERENV' , 'CURRENT_SCHEMA' )
-
--------------------------------------------------------------------------------
-
SYS
-
-
-
SQL> select sys_context( 'USERENV' , 'CURRENT_USER' ) from dual;
-
-
SYS_CONTEXT( 'USERENV' , 'CURRENT_USER' )
-
--------------------------------------------------------------------------------
-
SYSBACKUP
概念
A new administration privilege, SYSBACKUP, allows Recovery Manager (RMAN) users to connect to the target database and run RMAN commands, no longer requiring SYSDBA. This feature enforces the separation of duty security model, whereby backup operators only need SYSBACKUP privilege to run RMAN commands and have separate responsibilities from database administrators who need real SYSDBA privileges. 一个新的管理特权,SYSBACKUP,允许Recovery Manager(RMAN)用户连接到目标数据库,并运行RMAN命令,不再需要SYSDBA。 这一特性强制执行了职责安全模型的分离,即备份操作符只需要SYSBACKUP权限来运行RMAN命令,并从需要真正的SYSDBA特权的数据库管理员那里承担独立的职责。 RMAN连接到数据库的方式与SQL*Plus连接到数据库的方式相同。唯一的区别是,RMAN连接到目标或辅助数据库需要SYSDBA或SYSBACKUP特权。任何用户都可以授予此特权。
实验
以下操作是在Oracle 12.1.0.2.0 版本数据库中操作 1) 给PDB 用户test 赋予sysdba 权限,RMAN两种方式连接目标数据库,并操作RMAN 命令 SQL> grant sysdba to test; Grant succeeded. [oracle@host1 ~]$ rman target test/test@pdbcndba Recovery Manager: Release 12.1.0.2.0 - Production on Wed Aug 9 15:39:52 2017 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. connected to target database: CNDBA (DBID=215559030) [oracle@host1 ~]$ rman Recovery Manager: Release 12.1.0.2.0 - Production on Wed Aug 9 15:40:44 2017 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. RMAN> connect target test/test@pdbcndba connected to target database: CNDBA (DBID=215559030) 2)PDB 用户 cndba 赋予sysbackup 权限,RMAN后面一种方式连接目标数据库,并操作RMAN 命令 SQL> create user cndba identified by cndba 2 / User created. SQL> grant sysbackup to cndba; Grant succeeded. [oracle@host1 ~]$ rman target /"cndba@pdbcndba as sysbackup/" Recovery Manager: Release 12.1.0.2.0 - Production on Wed Aug 9 15:26:30 2017 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. target database Password: RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-00554: initialization of internal recovery manager package failed RMAN-04005: error from target database: ORA-01031: insufficient privileges [oracle@host1 ~]$ rman Recovery Manager: Release 12.1.0.2.0 - Production on Wed Aug 9 15:34:38 2017 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. RMAN> connect target "cndba/cndba@pdbcndba as sysbackup" connected to target database: CNDBA (DBID=215559030) RMAN> list backup; using target database control file instead of recovery catalog List of Backup Sets =================== BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 28 Full 715.90M DISK 00:00:33 09-AUG-17 BP Key: 33 Status: AVAILABLE Compressed: NO Tag: TAG20170809T002639Piece Name: /u01/app/oracle/fast_recovery_area/CNDBA/55DE010CACAA2E2FE055FE1D161C38B5/backupset/2017_08_09/o1_mf_nnndf_TAG20170809T002639_drmso99v_.bkpList of Datafiles in backup set 28File LV Type Ckp SCN Ckp Time Name---- -- ---- ---------- --------- ----8 Full 3011898 09-AUG-17 /u01/app/oracle/oradata/cndba/pdbcndba/system01.dbf9 Full 3011898 09-AUG-17 /u01/app/oracle/oradata/cndba/pdbcndba/sysaux01.dbf10 Full 3011898 09-AUG-17 /u01/app/oracle/oradata/cndba/pdbcndba/pdbcndba_users01.dbf11 Full 3011898 09-AUG-17 /u01/app/oracle/oradata/cndba/pdbcndba/test01.dbf RMAN> backup datafile 11; Starting backup at 09-AUG-17 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=61 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=00011 name=/u01/app/oracle/oradata/cndba/pdbcndba/test01.dbf channel ORA_DISK_1: starting piece 1 at 09-AUG-17 channel ORA_DISK_1: finished piece 1 at 09-AUG-17 piece handle=/u01/app/oracle/fast_recovery_area/CNDBA/55DE010CACAA2E2FE055FE1D161C38B5/backupset/2017_08_09/o1_mf_nnndf_TAG20170809T153759_drogyqm1_.bkp tag=TAG20170809T153759 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03 Finished backup at 09-AUG-17 Starting Control File and SPFILE Autobackup at 09-AUG-17 piece handle=/u01/app/oracle/fast_recovery_area/CNDBA/autobackup/2017_08_09/o1_mf_s_951579482_drogyvl6_.bkp comment=NONE Finished Control File and SPFILE Autobackup at 09-AUG-17
参考链接
http://docs.oracle.com/database/121/BRADV/rcmcnctg.htm#BRADV129
http://docs.oracle.com/database/121/BRADV/rcmquick.htm#BRADV89348
http://docs.oracle.com/database/121/NEWFT/chapter12101.htm#NEWFT416
About Me
.............................................................................................................................................
● 本文作者:小麦苗,部分内容整理自网络,若有侵权请联系小麦苗删除
● 本文在itpub( http://blog.itpub.net/26736162/abstract/1/ )、博客园( http://www.cnblogs.com/lhrbest )和个人weixin公众号( xiaomaimiaolhr )上有同步更新
● 本文itpub地址: http://blog.itpub.net/26736162/abstract/1/
● 本文博客园地址: http://www.cnblogs.com/lhrbest
● 本文pdf版、个人简介及小麦苗云盘地址: http://blog.itpub.net/26736162/viewspace-1624453/
● 数据库笔试面试题库及解答: http://blog.itpub.net/26736162/viewspace-2134706/
● DBA宝典今日头条号地址: http://www.toutiao.com/c/user/6401772890/#mid=1564638659405826
.............................................................................................................................................
● QQ群号: 230161599 (满) 、618766405
● 联系我请加QQ好友 ( 646634621 ) ,注明添加缘由
● 于 2018-04-01 06:00 ~ 2018-04-31 24:00 在魔都完成
● 最新修改时间:2018-04-01 06:00 ~ 2018-04-31 24:00
● 文章内容来源于小麦苗的学习笔记,部分整理自网络,若有侵权或不当之处还请谅解
● 版权所有,欢迎分享本文,转载请保留出处
.............................................................................................................................................
● 小麦苗的微店 : https://weidian.com/s/793741433?wfr=c&ifr=shopdetail
● 小麦苗出版的数据库类丛书 : http://blog.itpub.net/26736162/viewspace-2142121/
● 小麦苗OCP、OCM、高可用网络班 : http://blog.itpub.net/26736162/viewspace-2148098/
.............................................................................................................................................
使用weixin 客户端 扫描下面的二维码来关注小麦苗的 weixin 公众号( xiaomaimiaolhr )及QQ群(DBA宝典), 学习最实用的数据库技术。
小麦苗的公众号 小麦苗的DBA宝典QQ群2 《DBA笔试面试宝典》读者群 小麦苗的微店
.............................................................................................................................................
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26736162/viewspace-2152738/,如需转载,请注明出处,否则将追究法律责任。
这篇关于【12c】oracle12c 的SYSBACKUP、SYSDG、SYSKM系统用户的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!