分类: Oracle
2012-04-28 01:52:04
今天启动数据库的时候,出现以下问题:
[root@p570a2:/crs/app/oracle/product/crs_1/bin]#su - oracle
[oracle@p570a2:/oracle/app/oracle]$sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.4.0 - Production on Tue Jan 5 11:53:42 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup
ORA-01078: failure in processing system parameters
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00132: syntax error or unresolved network name 'LISTENERS_FSYYK1'
检查tnsnames.ora文件发现少了LISTENERS_FSYYK1 配置,而这个配置因为由双机改为单机不需要添加,必须从参数文件中手工去掉LOCAL_LISTENER参数
由于这个用的asm数据库,参数也放在asm存储中,create pfile from spfile时,报以下错误
SQL> create pfile from spfile;
create pfile from spfile
ERROR at line 1:
ORA-27037: unable to obtain file status
IBM AIX RISC System/6000 Error: 2: No such file or directory
Additional information: 3
由于这个时候数据库无法打开,不知道是用spfile启动还是pfile启动
所以只能试先从pfile创建成spfile,再从asm位置创建成pfile,然后进行修改
[oracle@p570a2:/oracle/app/oracle]$sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.4.0 - Production on Tue Jan 5 11:57:38 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> create spfile from pfile;
File created.
SQL> startup
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00132: syntax error or unresolved network name 'LISTENERS_FSYYK1'
SQL> create pfile=/tmp/pfile20090105.ora from spfile=+DGDATA/fsyyk/spfilefsyyk.ora;
create pfile=/tmp/pfile20090105.ora from spfile
ERROR at line 1:
ORA-02236: invalid file name
上面这个问题是pfile路径要加单引号
SQL> create pfile='/tmp/pfile20090105.ora' from spfile='+DGDATA/fsyyk/spfilefsyyk.ora';
File created.
SQL>
然后vi /tmp/pfile20090105.ora 参数文件,去掉local_listener参数
再创建asm存储的spfile
SQL> create spfile='+DGDATA/fsyyk/spfilefsyyk.ora' from pfile='/tmp/pfile20090105.ora' ;
File created.
SQL> startup
启动数据库成功
总结:
如果看到数据库启动时报以下错误,则可以知道是spfile启动的
SQL> startup
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00132: syntax error or unresolved network name 'LISTENERS_FSYYK1'
如果看到数据库启动时报以下错误,则可以知道是pfile启动的,即多了ORA-01078错误
SQL> startup
ORA-01078: failure in processing system parameters
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00132: syntax error or unresolved network name 'LISTENERS_FSYYK1'