今天我的虚拟测试环境中的11.2的库自上次关机后今天启动突然报错,记录以下过程备查。
1 2 3 4 5 6 7 8 9 | SQL> SELECT * FROM v$version; BANNER -------------------------------------------------------------------------------- Oracle DATABASE 11g Enterprise Edition RELEASE 11.2.0.2.0 - 64bit Production PL/SQL RELEASE 11.2.0.2.0 - Production CORE 11.2.0.2.0 Production TNS FOR Linux: Version 11.2.0.2.0 - Production NLSRTL Version 11.2.0.2.0 - Production |
启动数据库时报错:
1 2 3 4 5 6 7 8 9 | SQL> startup ORACLE instance started. Total SYSTEM Global Area 734892032 bytes Fixed SIZE 2230120 bytes Variable SIZE 448792728 bytes DATABASE Buffers 276824064 bytes Redo Buffers 7045120 bytes ORA-00205: error IN identifying control FILE, CHECK alert LOG FOR more info |
根据alert log找到trace文件:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | [oracle@ORCL112 ~]$ more /u01/app/oracle/diag/rdbms/orcl112/orcl112/trace/orcl112_asmb_6745.trc Trace FILE /u01/app/oracle/diag/rdbms/orcl112/orcl112/trace/orcl112_asmb_6745.trc Oracle DATABASE 11g Enterprise Edition RELEASE 11.2.0.2.0 - 64bit Production WITH the Partitioning, OLAP, Data Mining AND REAL Application Testing options ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1 SYSTEM name: Linux Node name: ORCL112 RELEASE: 2.6.18-92.el5 Version: #1 SMP Fri May 23 23:40:43 EDT 2008 Machine: x86_64 VM name: VMWare Version: 6 Instance name: orcl112 Redo thread mounted BY this instance: 0 <none> Oracle process NUMBER: 16 Unix process pid: 6745, image: oracle@ORCL112 (ASMB) *** 2011-11-10 12:42:57.949 *** SESSION ID:(8.1) 2011-11-10 12:42:57.950 *** CLIENT ID:() 2011-11-10 12:42:57.950 *** SERVICE NAME:() 2011-11-10 12:42:57.950 *** MODULE NAME:() 2011-11-10 12:42:57.950 *** ACTION NAME:() 2011-11-10 12:42:57.950 WARNING: failed TO START ASMB (connection failed) state=0x1 sid='+ASM' home='/u01/app/grid/product/11.2.0/grid' ORA-15055: unable TO CONNECT TO ASM instance ORA-12547: TNS:lost contact |
1 2 3 4 5 | [grid@ORCL112 ~]$ crsctl stat res -t -------------------------------------------------------------------------------- NAME TARGET STATE SERVER STATE_DETAILS Local Resources ora.DG01.dg ONLINE ONLINE orcl112 ora.asm ONLINE ONLINE orcl112 Started |
MOS上有相关文档:[ID 1307075.1] 是由于$GRID_HOME/bin/oracle和$ORACLE_HOME/bin/oracle文件权限不当导致连接ASM实例失败的。 ls -al $GRID_HOME/bin/oracle -rwxr-x--x 1 grid oinstall 200678464 Feb 28 14:54 oracle ls -al $ORACLE_HOME/bin/oracle -rwxr-x--x 1 oracle asmadmin 228886191 Feb 28 15:41 oracle 而在我的环境中只有$GRID_HOME/bin/oracle文件权限发生改变 [grid@ORCL112 bin]$ cd /u01/app/grid/product/11.2.0/grid/bin [grid@ORCL112 bin]$ ls -l oracle -rwxrwxr-x 1 grid oinstall 200678464 Jul 15 23:18 oracle
解决方法很简单: oracle binary的正确权限是:6751 cd $GRID_HOME/bin chmod 6751 oracle cd $ORACLE_HOME/bin chmod 6751 oracle 修改之后再检查一下 ls -l oracle -rwsr-s--x 1 grid oinstall 152400480 Nov 24 15:49 oracle 如果数据库启动仍然失败,重新启动GI
修改之后数据库正常启动 [root@ORCL112 bin]# chmod 6751 oracle [root@ORCL112 bin]# ls -l oracle -rwsr-s--x 1 grid oinstall 200678464 Jul 15 23:18 oracle SQL> startup ORACLE instance started. Total SYSTEM Global Area 734892032 bytes Fixed SIZE 2230120 bytes Variable SIZE 448792728 bytes DATABASE Buffers 276824064 bytes Redo Buffers 7045120 bytes DATABASE mounted. DATABASE opened.
-The End-