能够管理ASM instance的三种角色

能够管理ASM instance的角色有三种,他们的分工如下:
组描述       OS指定的组        具有的权限      能做的事情
OSASM      asmadmin        SYSASM           ASM所有管理工作
OSDBA      asmdba           SYSDBA            访问diskgroup上的文件,database instance所在用户必须是此组成员,因为要对数据文件进行操作,注意只有基于数据库层面的操作权限,没有底层diskgroup层面
                                                             的操作权限,且不能启停asm instance

OSOPER     asmoper         SYSOPER         startup, shutdown, mount, dismount, and check disk group


通常oracle用户和grid用户必须是asmdba组成员,grid用户还要是asmadmin、asmoper组的成员
The SYSDBA privilege is intended to be used by the database to access disk groups.


安装ASM是默认创建ASMSNMP用户,ASMSNMP是oracle安装时推荐的用户,该用户只能以sysdba权限登录ASM库(其效果等同于sqlplus sys as sysdba),不能做一些管理的工作例如create Diskgroup:
grid@ora12c1:/home/grid>sqlplus asmsnmp as sysdba 


SQL*Plus: Release 12.1.0.1.0 Production on Tue Oct 22 16:16:37 2013


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


Enter password: 


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options


SQL> select path from v$asm_disk;


PATH
--------------------------------------------------------------------------------
/dev/asm-diskk
/dev/asm-diskl
/dev/asm-diskf
/dev/asm-diskd
/dev/asm-diskh
/dev/asm-diskg
/dev/asm-diskc
/dev/asm-diske


8 rows selected.


SQL> create diskgroup testdg normal redundancy disk '/dev/asm-diskk','/dev/asm-diskl';
create diskgroup testdg normal redundancy disk '/dev/asm-diskk','/dev/asm-diskl'
*
ERROR at line 1:
ORA-15260: permission denied on ASM disk group
create diskgroup testdg normal redundancy disk '/dev/asm-diskk','/dev/asm-diskl';


只有通过sqlplus sys as sysasm连接才能实现:
SQL*Plus: Release 12.1.0.1.0 Production on Tue Oct 22 16:17:28 2013


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


Enter password: 


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options


SQL> create diskgroup testdg normal redundancy disk '/dev/asm-diskk','/dev/asm-diskl';


Diskgroup created.


SQL> drop diskgroup testdg;


Diskgroup dropped.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/53956/viewspace-1319484/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/53956/viewspace-1319484/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值