oracle 11gR2开始,安装grid集群和oracle软件分开两个用户安装
grid用户单独安装集群,比如包括asm实例,监听资源,节点资源等
oracle用户就只安装oracle代码
grid用户下面新增了三个组asmadmin,asmdba,asmoper
下面列出具体每个用户和组之间对应的关系
用户组 所属该组的用户 用户组描述
oinstall grid, oracle Oracle Inventory and Software Owner
dba grid, oracle Database Administrator
asmadmin grid Oracle Automatic Storage Management Group
asmdba grid, oracle ASM Database Administrator Group
asmoper grid ASM Operator Group
oper oracle Database Operator
如果对oracle用户没赋予asmdba组的话,则会导致oracle用户认不到diskgroup,启动对应节点实例失败。
Thu Jul 08 18:04:18 2010
ASMB started with pid=29, OS id=21238
ORA-00210: cannot open the specified control file
ORA-00202: control file: '+TESTDG/racdb/controlfile/current.256.723833823'
ORA-17503: ksfdopn:2 Failed to open file +TESTDG/racdb/controlfile/current.256.723833823
ORA-15001: diskgroup "TESTDG" does not exist or is not mounted
ORA-15055: unable to connect to ASM instance
ORA-01031: insufficient privileges
Starting background process ASMB
通过id命令可以显示用户包含哪些组
[oracle@rac1 trace]$ id
uid=502(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),506(asmdba)
如果对grid用户没赋予dba组的话,则会导致grid用户启动不了数据库,错误如下:
[grid@racdb dbhome_1]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.DATA.dg ora....up.type ONLINE ONLINE racdb
ora....ER.lsnr ora....er.type ONLINE ONLINE racdb
ora.asm ora.asm.type ONLINE ONLINE racdb
ora.cssd ora.cssd.type ONLINE ONLINE racdb
ora.diskmon ora....on.type ONLINE ONLINE racdb
ora.racdb.db ora....se.type OFFLINE OFFLINE
启动报错:
[grid@racdb dbhome_1]$ crs_start ora.racdb.db
尝试启动 `ora.racdb.db` (在成员 `racdb` 上)
ORA-01031: insufficient privileges
ORA-01031: 权限不足
ORA-01031: insufficient privileges
ORA-01031: insufficient privileges
ORA-01031: 权限不足
ORA-01031: 权限不足
启动 `ora.racdb.db` (在成员 `racdb` 上) 成功。
看一下用户在哪几个组下面:
[grid@racdb dbhome_1]$ id grid
uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1200(asmadmin),1201(asmdba),1202(asmoper)
[grid@racdb dbhome_1]$ id oracle
uid=1101(oracle) gid=1000(oinstall) groups=1000(oinstall),1201(asmdba),1300(dba),1301(oper)
添加dba组给grid用户:
[root@racdb ~]# usermod -g oinstall -G asmadmin,asmdba,asmoper,dba grid
[root@racdb ~]# id grid
uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1200(asmadmin),1201(asmdba),1202(asmoper),1300(dba)
再一次尝试启动,成功:
[grid@racdb ~]$ crs_start ora.racdb.db
尝试启动 `ora.racdb.db` (在成员 `racdb` 上)
启动 `ora.racdb.db` (在成员 `racdb` 上) 成功。
[grid@racdb ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.DATA.dg ora....up.type ONLINE ONLINE racdb
ora....ER.lsnr ora....er.type ONLINE ONLINE racdb
ora.asm ora.asm.type ONLINE ONLINE racdb
ora.cssd ora.cssd.type ONLINE ONLINE racdb
ora.diskmon ora....on.type ONLINE ONLINE racdb
ora.racdb.db ora....se.type ONLINE ONLINE racdb
阅读(1423) | 评论(0) | 转发(0) |