oracle实例启动的参数文件选择顺序为spfile$ORACLE_SID.ora -> spfile.ora -> init$ORACLE_SID.ora。
下面做实验验证。
[oracle@localhost dbs]$ echo $ORACLE_SID
iloveqhdb
[oracle@localhost dbs]$ export ORACLE_SID=hellokitty
[oracle@localhost dbs]$ echo $ORACLE_SID
hellokitty
[oracle@localhost dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed May 25 08:25:44 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> ! ls
afiedt.buf hc_iloveqhdb.dat hc_wangfeng.dat initiloveqhdb.ora init.ora lkILOVEQHDlkILOVEQHDB orapwiloveqhdb
SQL> ! cp initiloveqhdb.ora spfile$ORACLE_SID.ora
SQL> ! ls
afiedt.buf hc_iloveqhdb.dat hc_wangfeng.dat initiloveqhdb.ora init.ora lkILOVEQHDlkILOVEQHDB orapwiloveqhdb spfilehellokitty.ora
SQL> startup nomount
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/11.2.0.4/db_home1/dbs/inithellokitty.ora'
SQL> exit
Disconnected
[oracle@localhost dbs]$
[oracle@localhost dbs]$
[oracle@localhost dbs]$
[oracle@localhost dbs]$ cat spfilehellokitty.ora
iloveqhdb.__db_cache_size=574619648
iloveqhdb.__java_pool_size=4194304
iloveqhdb.__large_pool_size=16777216
iloveqhdb.__pga_aggregate_target=268435456
iloveqhdb.__sga_target=805306368
iloveqhdb.__shared_io_pool_size=0
iloveqhdb.__shared_pool_size=197132288
iloveqhdb.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/iloveqhdb/adump'
*.audit_trail='db'
*.compatible='11.2.0.4.0'
*.control_files='+DATA/iloveqhdb/controlfile/current.261.912462939','+DATA/iloveqhdb/controlfile/current.260.912462939'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_domain='wf'
*.db_name='iloveqhd'
*.db_recovery_file_dest='+DATA'
*.db_recovery_file_dest_size=4385144832
*.db_unique_name='iloveqhdb'
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTO