案例重演:
dbca建库,SID:metro --手工建库时实例名小写的metro
......
[Oracle@org54 ~]$ export ORACLE_SID=METRO --由于未设置环境变量,手工注入SID
[oracle@org54 ~]$ sqlplus '/as sysdba' --登录sqlplus
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jun 12 09:15:16 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup --启库,报错如下,提示找不到pfile文件
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/10.2.0/db_1/dbs/initMETRO.ora'
[oracle@org54 ~]$ cd /u01/app/oracle/product/10.2.0/db_1/dbs --到参数文件目录下查看
[oracle@org54 dbs]$ ls --发现有spfile文件,但数据库提示未找到,此时要注意,对于SID的设置,在环境变量配置下是区分大小写的,由于手工建库时是小写的,所以配置环境变量时也必须是小写的
hc_metro.dat initdw.ora init.ora lkMETRO orapwmetro spfilemetro.ora
[oracle@org54 dbs]$ export ORACLE_SID=metro --重新设置环境变量,注入SID小写的
[oracle@org54 dbs]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jun 12 09:18:33 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup --启库
ORACLE instance started.
Total System Global Area 343932928 bytes
Fixed Size 1219328 bytes
Variable Size 109053184 bytes
Database Buffers 230686720 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
启库完成
: