用srvctl启动库正常,而用sqlplus 启动报错,参考MOS中这段:
With SRVCTL, the root user OS setup is used since inherited from the crsd.bin that will start the instances as oracle user. With SQLPLUS, the oracle user OS setup is used. Having different user setups for root or oracle will make that the performance can be different (fragmented sga or not, another 'solaris' project setup, ...) Check Note 603051.1 , Note 369424.1 .
两者使用的用户权限不一样。
三.问题解决
更改下面权限,将数据盘的组改为oinstall
chown oragrid:oinstall /dev/asmdisk/datadisk1
chown oragrid:oinstall /dev/asmdisk/datadisk2
chown oragrid:oinstall /dev/asmdisk/datadisk3
chown oragrid:oinstall /dev/asmdisk/datadisk4
root@msuu435:/dev/asmdisk# ls -ltr
total 0
crw-rw-r-- 1 oragrid oinstall 265, 24 Sep 15 03:39 datadisk3
crw-rw-r-- 1 oragrid oinstall 265, 16 Sep 15 03:44 datadisk2
crw-rw-r-- 1 oragrid oinstall 265, 32 Sep 15 04:08 datadisk4
crw-rw-r-- 1 oragrid oinstall 265, 8 Sep 15 04:08 datadisk1
crw-rw-r-- 1 oragrid asmadmin 265, 78 Sep 15 04:08 crsdisk5
crw-rw-r-- 1 oragrid asmadmin 265, 70 Sep 15 04:08 crsdisk4
crw-rw-r-- 1 oragrid asmadmin 265, 62 Sep 15 04:08 crsdisk3
crw-rw-r-- 1 oragrid asmadmin 265, 54 Sep 15 04:08 crsdisk2
crw-rw-r-- 1 oragrid asmadmin 265, 46 Sep 15 04:08 crsdisk1
更改权限后,用sqlplus启动数据库,不再报错,能正常打开。
root@msuu435:/dev/asmdisk# su - ccssver
Oracle Corporation SunOS 5.11 11.1 March 2014
-bash-4.1$ sqlplus /nolog
SQL*Plus: Release 12.1.0.2.0 Production on Thu Sep 15 05:06:20 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 6.4425E+10 bytes
Fixed Size 7651632 bytes
Variable Size 9932119760 bytes
Database Buffers 5.4358E+10 bytes
Redo Buffers 126558208 bytes
Database mounted.
Database opened.
另一个节点作同样处理,用sqlplus和srvctl启动数据库都正常。