环境: ORACLE 11.2.0.3 ,linux 5.5,单实例+asm方式 ,数据库安装过程中创建了 grid 用户、 oracle用户
问题:在数据库启动或关闭过程中,不能在sqlplus中执行,而必须依赖于clusterware本身的命令
现象描述:
1:检查has、css资源都正常
[root@singlehost ~]#
[root@singlehost ~]# crsctl check has
CRS-4638: Oracle High Availability Services is online
[root@singlehost ~]#
[root@singlehost ~]# crsctl check css
CRS-4529: Cluster Synchronization Services is online
[root@singlehost ~]#
[root@singlehost ~]# crsctl status resource -t -init
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE singlehost
ora.FRA.dg
ONLINE ONLINE singlehost
ora.asm
ONLINE ONLINE singlehost Started
ora.ons
OFFLINE OFFLINE singlehost
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE singlehost
ora.diskmon
1 OFFLINE OFFLINE
ora.evmd
1 ONLINE ONLINE singlehost
ora.test.db
1 ONLINE INTERMEDIATE singlehost Shutdown Initiated
2:检查asm实例,正常
[root@singlehost ~]# su - grid
[grid@singlehost ~]$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.3.0 Production on Tue Dec 23 16:39:09 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Automatic Storage Management option
SQL>
SQL>
SQL> select name from v$asm_disk;
NAME
------------------------------
DATA
FRA
SQL>
3:db在操作系统启动的时候,也被正常启动了
[root@singlehost ~]# su - oracle
[oracle@singlehost ~]$
[oracle@singlehost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Tue Dec 23 16:40:48 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
SQL>
SQL>
4:在sqlplus中关闭数据库报错
[oracle@singlehost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Tue Dec 23 16:42:46 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> shutdown immediate;
ORA-29701: unable to connect to Cluster Synchronization Service
SQL>
sqlplus中执行报错,但是使用srvctl 命令可以关闭数据库
[root@singlehost ~]# srvctl stop database -d test
[root@singlehost ~]#
看到已经停止了
[oracle@singlehost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Tue Dec 23 16:46:25 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL>
在sqlplus 中启动数据库也报错
[root@singlehost ~]# su - oracle
[oracle@singlehost ~]$
[oracle@singlehost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Tue Dec 23 16:55:26 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+DATA/test/spfiletest.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA/test/spfiletest.ora
ORA-29701: unable to connect to Cluster Synchronization Service
SQL>
但是通过srvctl启动数据库,则正常
[root@singlehost ~]#
[root@singlehost ~]# srvctl start database -d test
[root@singlehost ~]#
[root@singlehost ~]# su - oracle
[oracle@singlehost ~]$
[oracle@singlehost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Tue Dec 23 16:57:53 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
这个会是什么问题呢 ?