数据库版本:oracle 11.2.0.3.5
系统版本:SUSE11SP2 64bit
NFS环境:NETAPP存储提供
数据库文件存放在nfs上,主机异常宕机,导致nfs锁没释放,备机无法正常启动数据库
oracle@dc_cognos01:~> sqlplus /nolog
SQL*Plus: Release 11.2.0.2.0 Production on Fri Sep 6 10:17:13 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
SQL> conn /as sysdba
Connected.
SQL> select status from v$instance;
STATUS
------------------------
STARTED
SQL>
SQL>
SQL> shutdown immediate;
ORA-01507: database not mounted
ORACLE instance shut down.
SQL>
SQL>
SQL>
SQL> startup
ORACLE instance started.
Total System Global Area 1570009088 bytes
Fixed Size 2226832 bytes
Variable Size 402654576 bytes
Database Buffers 1157627904 bytes
Redo Buffers 7499776 bytes
ORA-00205: error in identifying control file, check alert log for more info
查看alert log
ORACLE_BASE from environment = /oracle/app/oracle
Fri Sep 06 10:17:46 2013
ALTER DATABASE MOUNT
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/oracgdb/cognosdb/control03.ctl'
ORA-27086: unable to lock file - already in use
Linux-x86_64 Error: 11: Resource temporarily unavailable
Additional information: 8
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/oracgdb/cognosdb/control02.ctl'
ORA-27086: unable to lock file - already in use
Linux-x86_64 Error: 11: Resource temporarily unavailable
Additional information: 8
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/oracgdb/cognosdb/control01.ctl'
ORA-27086: unable to lock file - already in use
Linux-x86_64 Error: 11: Resource temporarily unavailable
Additional information: 8
ORA-205 signalled during: ALTER DATABASE MOUNT...
Fri Sep 06 10:17:46 2013
Checker run found 3 new persistent data failures
数据库文件是存放在netapp存储的nfs上,主机由于网络原因异常,无法访问数据文件。nfs锁也无法释放。
手工释放netapp存储上nfs锁,在备机上再启动oracle服务
在备机上卸载数据库资源和nfs资源
登录存储控制器
设置为高级模式
priv set advanced
查看锁情况
lock status -h
======== NLM host lpar6
======== NLM host linux
======== NLM host tmsweb01
======== NLM host dc_cognos01
======== NLM host dc_cognos02
21 0x034d4e56:0x0004344d 0:0 1 GRANTED (0xffffff02952f2428)
21 0x034d4e56:0x0004344e 0:0 1 GRANTED (0xffffff02952f3e00)
21 0x034d4e56:0x0004344f 0:0 1 GRANTED (0xffffff02952f2620)
21 0x034d4e56:0x00043450 0:0 1 GRANTED (0xffffff02952f2230)
21 0x034d4e56:0x00043452 0:0 1 GRANTED (0xffffff02952f3c08)
2 0x034d4e56:0x00043447 0:0 1 GRANTED (0xffffff02952f2e00)
2 0x034d4e56:0x00043448 0:0 1 GRANTED (0xffffff02952f2c08)
2 0x034d4e56:0x00043449 0:0 1 GRANTED (0xffffff02952f2a10)
清除已加锁主机
sm_mon -l dc_cognos02
YS-NPHD1*> lock status -h
======== NLM host lpar6
======== NLM host linux
======== NLM host tmsweb01
======== NLM host dc_cognos01
======== NLM host dc_cognos02
再备机上启动数据库成功