[20180131]启动时参数文件的优先级.txt
--//别人问的问题:http://www.itpub.net/thread-2096826-1-1.html
--//测试如下.
1.让oracle不能访问参数文件:
$ cd $ORACLE_HOME/dbs
$ mv spfilebook.ora spfilebook.ora_2018
$ mv initbook.ora initbook.ora_2018
2.启动跟踪:
$ strace -f -o /tmp/startup.out sqlplus sys/book as sysdba <<<'startup'
$ egrep -i "init|spfile" /tmp/startup.out
6533 getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
6533 getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
6533 getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
6533 setrlimit(RLIMIT_STACK, {rlim_cur=32768*1024, rlim_max=RLIM_INFINITY}) = 0
6533 getrlimit(RLIMIT_STACK, {rlim_cur=32768*1024, rlim_max=RLIM_INFINITY}) = 0
6533 getrlimit(RLIMIT_STACK, {rlim_cur=32768*1024, rlim_max=RLIM_INFINITY}) = 0
6533 setrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
6534 getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
6534 getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
6534 setrlimit(RLIMIT_STACK, {rlim_cur=32768*1024, rlim_max=RLIM_INFINITY}) = 0
6534 getrlimit(RLIMIT_FSIZE, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
6534 stat("/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/spfilebook.ora", 0x7fffda969598) = -1 ENOENT (No such file or directory)
6534 stat("/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/spfile.ora", 0x7fffda969598) = -1 ENOENT (No such file or directory)
6534 access("/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/initbook.ora", F_OK) = -1 ENOENT (No such file or directory)
6534 open("/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/initbook.ora", O_RDONLY) = -1 ENOENT (No such file or directory)
--//$ORACLE_HOME目录下,spfilebook.ora=>spfile.ora=>initbook.ora.