本文为Oracle数据库在虚拟机上启动时报错的解决过程
实验环境如下:
数据库:oracle 11g 11.2.0
主机:Red Hat Enterprise Linux 5
虚拟机:VMware WorkStation 10
Last login: Tue Jul 7 11:16:52 2015 from 192.168.0.17
[root@oracle ~]# su - oracle
[oracle@oracle ~]$ . oraenv
ORACLE_SID = [orcl] ? orcl
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
[oracle@oracle ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Tue Jul 14 11:33:10 2015
Copyright (c) 1982, 2009, 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/orcl/spfileorcl.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA/orcl/spfileorcl.ora
ORA-15077: could not locate ASM instance serving a required diskgroup
查询报错信息如下:
[oracle@oracle ~]$ oerr ora 15077
15077, 00000, "could not locate ASM instance serving a required diskgroup"
// *Cause: The instance failed to perform the specified operation because it
// could not locate a required ASM instance.
// *Action: If you want to start a database instance, start an ASM instance
// and mount the required diskgroup. If you want to start an ASM
// instance, relink the ORACLE binary with ASM_ON or explicitly set
// INSTANCE_TYPE initialization parameter to ASM.
看到这,可知 因为ASM磁盘没有挂载,而参数文件又在ASM磁盘上,实例无法找到参数文件,从而无法启动
接下来通过重启(或直接修改状态)去挂载相应的ASM DISKGROUP, 切换到grid用户下,并设置环境变量
[grid@oracle ~]$ . oraenv
ORACLE_SID = [+ASM] ? +ASM
The Oracle base for ORACLE_HOME=/u01/app/grid/product/11.2.0/grid is /u01/app/grid
[grid@oracle ~]$ sqlplus / as sysasm
Connected.
SQL> shutdown immediate
ASM diskgroups dismounted
ASM instance shutdown
SQL> startup
ASM instance started
Total System Global Area 283930624 bytes
Fixed Size 2212656 bytes
Variable Size 256552144 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
SQL> select name,state from v$asm_diskgroup;
NAME STATE
------------------------------ -----------
DATA MOUNTED
FRA MOUNTED
接下来去启动orcl实例,切换到oracle 用户下,并设置环境变量,通过sqlplus 连接数据库
[oracle@oracle oracle]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Tue Jul 14 12:34:50 2015
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 1653518336 bytes
Fixed Size 2213896 bytes
Variable Size 1056966648 bytes
Database Buffers 587202560 bytes
Redo Buffers 7135232 bytes
Database mounted.
Database opened.
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
---------------- ------------
orcl OPEN
SQL>
至此数据库正常启动,可访问。
实验环境如下:
数据库:oracle 11g 11.2.0
主机:Red Hat Enterprise Linux 5
虚拟机:VMware WorkStation 10
Last login: Tue Jul 7 11:16:52 2015 from 192.168.0.17
[root@oracle ~]# su - oracle
[oracle@oracle ~]$ . oraenv
ORACLE_SID = [orcl] ? orcl
The Oracle base for ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 is /u01/app/oracle
[oracle@oracle ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Tue Jul 14 11:33:10 2015
Copyright (c) 1982, 2009, 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/orcl/spfileorcl.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA/orcl/spfileorcl.ora
ORA-15077: could not locate ASM instance serving a required diskgroup
查询报错信息如下:
[oracle@oracle ~]$ oerr ora 15077
15077, 00000, "could not locate ASM instance serving a required diskgroup"
// *Cause: The instance failed to perform the specified operation because it
// could not locate a required ASM instance.
// *Action: If you want to start a database instance, start an ASM instance
// and mount the required diskgroup. If you want to start an ASM
// instance, relink the ORACLE binary with ASM_ON or explicitly set
// INSTANCE_TYPE initialization parameter to ASM.
看到这,可知 因为ASM磁盘没有挂载,而参数文件又在ASM磁盘上,实例无法找到参数文件,从而无法启动
接下来通过重启(或直接修改状态)去挂载相应的ASM DISKGROUP, 切换到grid用户下,并设置环境变量
[grid@oracle ~]$ . oraenv
ORACLE_SID = [+ASM] ? +ASM
The Oracle base for ORACLE_HOME=/u01/app/grid/product/11.2.0/grid is /u01/app/grid
[grid@oracle ~]$ sqlplus / as sysasm
Connected.
SQL> shutdown immediate
ASM diskgroups dismounted
ASM instance shutdown
SQL> startup
ASM instance started
Total System Global Area 283930624 bytes
Fixed Size 2212656 bytes
Variable Size 256552144 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
SQL> select name,state from v$asm_diskgroup;
NAME STATE
------------------------------ -----------
DATA MOUNTED
FRA MOUNTED
接下来去启动orcl实例,切换到oracle 用户下,并设置环境变量,通过sqlplus 连接数据库
[oracle@oracle oracle]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Tue Jul 14 12:34:50 2015
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 1653518336 bytes
Fixed Size 2213896 bytes
Variable Size 1056966648 bytes
Database Buffers 587202560 bytes
Redo Buffers 7135232 bytes
Database mounted.
Database opened.
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
---------------- ------------
orcl OPEN
SQL>
至此数据库正常启动,可访问。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29367946/viewspace-1732810/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29367946/viewspace-1732810/