DBCA创建数据库验证asmsnmp用户权限错误

使用DBCA创建数据库时报下面错误:

 

由于“ASM will not be configured to be monitored by Database Control”这句不是很明白是什么作用,所以不敢轻易放过。

按异常提示,应该是权限问题

 

回想了一下,当时创建安装grid时没有创建用户:

 

(1)直接更改用户赋权,用户不存在

sqlplus / as sysasm

SQL*Plus: Release 11.2.0.2.0 Production on Sat Apr 28 18:40:34 2012

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Automatic Storage Management option

SQL> alter user asmsnmp identified by "grid";
alter user asmsnmp identified by "grid"
                                 *
ERROR at line 1:
ORA-01918: user 'ASMSNMP' does not exist

果然不存在

(2)创建用户失败
SQL> create user asmsnmp identified by "grid";
create user asmsnmp identified by "grid"
                                  *
ERROR at line 1:
ORA-01990: error opening password file
'/opt/oracle/product/11.2.0/grid/dbs/orapw'

但创建用户时报错,查看目录'/opt/oracle/product/11.2.0/grid/dbs/orapw'发现不存在相应文件。

(3)创建密码文件

使用命令创建密码文件:/opt/oracle/product/11.2.0/grid/bin/orapwd file=./orapw+ASM password=grid entries=10

注意file必须按照格式创建:orapw+sid,否则无法检测到。

创建密码文件后如果权限不对还必须赋权给grid用户

chown grid:oinstall orapw+ASM

 

(4)创建用户成功
SQL> create user asmsnmp identified by "grid";

User created.

创建用户后还是不行,还是报相同的异常

(5)给asmsnmp用户赋sysasm权限,依然报相同的错误

SQL> grant sysasm to asmsnmp;

Grant succeeded.

(6)给asmsnmp用户赋sysdba权限,问题解决(这个是在网上查到需要这个权限,但是不明白为什么还要sysdba权限)

SQL> grant sysdba to asmsnmp;

Grant succeeded.

 

你可能感兴趣的:(oracle)