欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

DBCA创建ASM数据库时遇到ORA-01031

程序员文章站 2022-06-16 18:24:39
...

情况是这样的,我有一台服务器安装的是Oracle11gR201,并且分别使用grid和oracle用户安装了Grid Infrastructure和Database软件,

情况是这样的,我有一台服务器安装的是Oracle11gR201,并且分别使用grid和oracle用户安装了Grid Infrastructure和Database软件,结果在使用dbca工具创建数据库时,在进度条为96%的地方报错了,dbca的trace.log日志内容:

[Thread-161] [ 2012-03-04 15:29:08.101 CST ] [PostDBCreationStep.executeImpl:820] Starting Database HA Resource
[Thread-161] [ 2012-03-04 15:29:08.101 CST ] [CRSNative.internalStartResource:339] About to start resource: Name: ora.srcbdc.db, node: null, options: 0, filter null
[Thread-161] [ 2012-03-04 15:29:08.157 CST ] [CRSNativeResult.addLine:106] callback: ora.srcbdc.db false CRS-2672: Attempting to start 'ora.srcbdc.db' on 'instsvr1'
[Thread-161] [ 2012-03-04 15:29:18.377 CST ] [CRSNativeResult.addLine:106] callback: ora.srcbdc.db true ORA-01031: insufficient privileges
[Thread-161] [ 2012-03-04 15:29:18.378 CST ] [CRSNativeResult.addLine:106] callback: ora.srcbdc.db true ORA-01031: insufficient privileges
[Thread-161] [ 2012-03-04 15:29:18.379 CST ] [CRSNativeResult.addLine:106] callback: ora.srcbdc.db true CRS-2674: Start of 'ora.srcbdc.db' on 'instsvr1' failed
[Thread-161] [ 2012-03-04 15:29:18.380 CST ] [CRSNativeResult.addLine:106] callback: ora.srcbdc.db false CRS-2679: Attempting to clean 'ora.srcbdc.db' on 'instsvr1'
[Thread-161] [ 2012-03-04 15:29:18.385 CST ] [CRSNativeResult.addLine:106] callback: ora.srcbdc.db false CRS-2681: Clean of 'ora.srcbdc.db' on 'instsvr1' succeeded
[Thread-161] [ 2012-03-04 15:29:18.386 CST ] [CRSNativeResult.addComp:162] add comp: name ora.srcbdc.db, rc 215, msg CRS-0215: Could not start resource 'ora.srcbdc.db'.
[Thread-161] [ 2012-03-04 15:29:18.386 CST ] [CRSNative.internalStartResource:352] Failed to start resource: Name: ora.srcbdc.db, node: null, filter: null, msg ORA-01031: insufficient privileges
ORA-01031: insufficient privileges
CRS-2674: Start of 'ora.srcbdc.db' on 'instsvr1' failed
[Thread-161] [ 2012-03-04 15:29:18.387 CST ] [PostDBCreationStep.executeImpl:828] Exception while Starting with HA Database Resource PRCR-1079 : Failed to start resource ora.srcbdc.db
ORA-01031: insufficient privileges
ORA-01031: insufficient privileges

CRS-2674: Start of 'ora.srcbdc.db' on 'instsvr1' failed
[Thread-161] [ 2012-03-04 15:31:05.276 CST ] [PostDBCreationStep.executeImpl:861] Connecting for SIHA/RAC...

通过日志的内容可以比较容易判断,这是权限的问题的!并且数据库能手工启动!但是使用srvcrl命令也无法启动:

[grid@instsvr1 ~]$ srvctl start database -d srcbdc
PRCR-1079 : Failed to start resource ora.srcbdc.db
ORA-01031: insufficient privileges
ORA-01031: insufficient privileges
CRS-2674: Start of 'ora.srcbdc.db' on 'instsvr1' failed

查了一下发现,原来由于我的Grid Infrastructure和Database是使用分别的用户管理的,而在创建数据库的过程中,由于使用的asm,所以在建库的左后grid要把数据库起来,但是由于grid用户不在oracle用户的dba组,所以无法启动数据库,即错误中提到的无法启动资源:ora.srcbdc.db

解决方法:把grid用户添加到dba组即可。

DBCA创建ASM数据库时遇到ORA-01031