Oracle RAC ORACLE_SID的设置,报错(ORA-01078, LRM-00109)

时间:2023-08-16 08:35:56
[oracle@zen2 ~]$ echo $ORACLE_SID
ORAC
[oracle@zen2 ~]$ sqlplus /nolog SQL*Plus: Release 10.2.0.5.0 - Production on Mon Dec 23 11:13:08 2013 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. SQL> exit
[oracle@zen2 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....C1.inst application ONLINE ONLINE zen1
ora....C2.inst application ONLINE ONLINE zen2
ora.ORAC.db application ONLINE ONLINE zen2
ora....SM1.asm application ONLINE ONLINE zen1
ora....N1.lsnr application ONLINE ONLINE zen1
ora.zen1.gsd application ONLINE ONLINE zen1
ora.zen1.ons application ONLINE ONLINE zen1
ora.zen1.vip application ONLINE ONLINE zen1
ora....SM2.asm application ONLINE ONLINE zen2
ora....N2.lsnr application ONLINE ONLINE zen2
ora.zen2.gsd application ONLINE ONLINE zen2
ora.zen2.ons application ONLINE ONLINE zen2
ora.zen2.vip application ONLINE ONLINE zen2
[oracle@zen2 ~]$ sqlplus /nolog SQL*Plus: Release 10.2.0.5.0 - Production on Mon Dec 23 11:14:16 2013 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. SQL> conn /as sysdba
Connected to an idle instance.
SQL> show parameters sga
ORA-01034: ORACLE not available

数据库明明是启动的啊,于是继续查看

SQL> show user
USER is "SYS"
SQL> startup
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/oracle/product/db_1/dbs/initORAC.ora'
SQL> exit
Disconnected
[oracle@zen2 ~]$ cd /u01/oracle/product/db_1/dbs/
[oracle@zen2 dbs]$ ll
total 52
-rw-rw---- 1 oracle oinstall 1477 Dec 23 09:07 ab_+ASM2.dat
-rw-rw---- 1 oracle oinstall 1544 Dec 23 09:11 hc_+ASM2.dat
-rw-rw---- 1 oracle oinstall 1544 Dec 23 09:11 hc_ORAC2.dat
lrwxrwxrwx 1 oracle oinstall 37 Dec 20 17:42 init+ASM2.ora -> /u01/oracle/admin/+ASM/pfile/init.ora
-rw-r--r-- 1 oracle oinstall 12920 May 3 2001 initdw.ora
-rw-r----- 1 oracle oinstall 8385 Sep 11 1998 init.ora
-rw-r----- 1 oracle oinstall 34 Dec 20 18:42 initORAC2.ora
-rw-r----- 1 oracle oinstall 1536 Dec 20 17:42 orapw+ASM2
-rw-r----- 1 oracle oinstall 1536 Dec 20 18:36 orapwORAC2
[oracle@zen2 dbs]$ cat initORAC2.ora
SPFILE='+ZEN/ORAC/spfileORAC.ora'

google了一下,原文 https://community.oracle.com/thread/2330291?start=0&tstart=0

一个类似的问题之后修改了一下配置文件中的ORACLE_SID=ORAC2

重新登录,问题解决。