ITPub博客

首页 > Linux操作系统 > Linux操作系统 > [20120120]startup nomount访问参数文件的顺序.txt

[20120120]startup nomount访问参数文件的顺序.txt

原创 Linux操作系统 作者:lfree 时间:2012-01-20 09:23:07 0 删除 编辑
检查startup nomount访问参数文件的顺序.

export ORACLE_SID=noexist
strace -o noexist.txt sqlplus sys as sysdba

$ rlsqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Fri Jan 20 08:48:12 2012

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Enter password:
Connected to an idle instance.

08:48:14 SQL> exit
Disconnected
$ export ORACLE_SID=noexist
$ strace -o noexist.txt sqlplus sys as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri Jan 20 08:50:04 2012

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Enter password:
Connected to an idle instance.

08:50:05 SQL> startup nomount
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/db_1/dbs/initnoexist.ora'
08:50:11 SQL> quit
Disconnected

$egrep -i "noexist|spfile" noexist.txt
--没有结果!why?在没有执行startup nomount之前观察,发现
$ ps -ef
...
oracle    3825  3248  0 09:13 pts/0    00:00:00 sqlplus     as sysdba
oracle    3828  3825  0 09:13 ?        00:00:00 oraclenoexist (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
...

sqlplus会派生一个oraclenoexist经常.

$strace -o noexist1.txt  -p  3828

再执行startup nomount,退出后.执行如下:

# egrep -i "noexist|spfile" noexist1.txt
stat("/u01/app/oracle/product/11.2.0/db_1/dbs/spfilenoexist.ora", 0x7fff12a3a8a8) = -1 ENOENT (No such file or directory)
stat("/u01/app/oracle/product/11.2.0/db_1/dbs/spfile.ora", 0x7fff12a3a8a8) = -1 ENOENT (No such file or directory)
open("/u01/app/oracle/product/11.2.0/db_1/dbs/initnoexist.ora", O_RDONLY) = -1 ENOENT (No such file or directory)

可以确定startup nomount启动参数文件的查找顺序是:
dbs目录下的:
spfile<$ORACLE_SID>.ora => spfile.ora => init<$ORACLE_SID>.ora

了解这个顺序对于定位启动问题很重要.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/267265/viewspace-715126/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
熟悉oracle相关技术,擅长sql优化,rman备份与恢复,熟悉linux shell编程。

注册时间:2008-01-03

  • 博文量
    2353
  • 访问量
    6095899