Oracle create pfile时报ORA-27037问题的处理

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:41

在客户那接手一个数据库问题,启动数据库时报以下错误
[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_testdb1'
检查tnsnames.ora文件发现少了LISTENERS_testdb1 配置,而这个配置因为由双机改为单机不需要添加,必须从参数文件中手工去掉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_testdb1'
SQL> create pfile=/tmp/pfile20090105.ora from spfile=+DGDATA/testdb/spfiletestdb.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/testdb/spfiletestdb.ora';
File created.
SQL>
然后vi /tmp/pfile20090105.ora 参数文件,去掉local_listener参数
再创建asm存储的spfile
SQL> create spfile='+DGDATA/testdb/spfiletestdb.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_testdb1'

如果看到数据库启动时报以下错误,则可以知道是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_testdb1'

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】