oracle10g rac安裝完畢 啟動的時候報錯ORA-01078 解決方法

xfhuangfu發表於2015-07-04
對著文件在 虛擬機器上安裝完 oracle 10g r2的 rac ,但是啟動的時候有報錯,下面是具體內容


在節點rac1上執行報錯如下:

[oracle@rac1 ~]$ cd $ORACLE_HOME/dbs
[oracle@rac1 dbs]$ ls -l
total 52
-rw-rw----  1 oracle dba   515 Oct 19 12:26 ab_+ASM1.dat
-rw-rw----  1 oracle dba  1544 Oct 19 12:26 hc_+ASM1.dat
-rw-rw----  1 oracle dba  1544 Oct 19 12:42 hc_racdb1.dat
lrwxrwxrwx  1 oracle dba    38 Oct 19 12:26 init+ASM1.ora -> /home/oracle/admin/+ASM/pfile/init.ora
-rw-r-----  1 oracle dba 12920 May  3  2001 initdw.ora
-rw-r-----  1 oracle dba  8385 Sep 11  1998 init.ora
-rw-r-----  1 oracle dba    37 Oct 19 12:50 initracdb1.ora
-rw-r-----  1 oracle dba  1536 Oct 19 12:26 orapw+ASM1
-rw-r-----  1 oracle dba  1536 Oct 19 12:48 orapwracdb1

[oracle@rac1 dbs]$
[oracle@rac1 dbs]$ more initracdb1.ora
SPFILE='+DATA/racdb/spfileracdb.ora'

[oracle@rac1 dbs]$
[oracle@rac1 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Oct 19 13:17:48 2012

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

Connected to an idle instance.

SQL> startup
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/home/oracle/10.2.0/db_1/dbs/initrac1.ora'
SQL>







然後到rac2節點上執行如下


oracle@rac2 dbs]$ pwd
/home/oracle/10.2.0/db_1/dbs
[oracle@rac2 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Oct 19 13:10:06 2012

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

Connected to an idle instance.


SQL> create spfile from pfile='/home/oracle/10.2.0/db_1/dbs/initracdb2.ora';

File created.


oracle@rac2 dbs]$ export oracle_sid=rac2
[oracle@rac2 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Oct 19 13:16:10 2012

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

Connected to an idle instance.

SQL> startup
ORA-29760: instance_number parameter not specified
SQL>



檢視oracle使用者的 .bash_profile 檔案,如下


#set environment

export ORACLE_BASE=/home/oracle
export ORACLE_HOME=$ORACLE_BASE/10.2.0/db_1
export ORACLE_CRS_HOME=$ORACLE_BASE/10.2.0/crs_1
export ORACLE_SID=rac2
export PATH=$ORACLE_HOME/bin:$PATH
export PATH=$ORACLE_CRS_HOME/bin:$$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin/
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
ulimit -u 16384 -n 65536
umask 022



因為在用dbca建立資料庫的時候,db_name 填的是 racdb  ,因此在這裡將 ORACLE_SID 由原來的rac2改寫為 racdb2 之後,
再次用sqlplus登入,即可看到db自動啟動了。

[oracle@rac2 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Oct 19 13:29:34 2012

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL> select open_mode,name,DB_UNIQUE_NAME from v$database;

OPEN_MODE  NAME      DB_UNIQUE_NAME
---------- --------- ------------------------------
READ WRITE RACDB     racdb

SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
racdb2


也不曉得如果資料庫名取名為racdb ,那麼對應的兩個例項名必須為racdb1 或racdb2 ,這種情況會不會是個bug呢   ? 
這個暫時也沒辦法求證,只能用這種方法去解決。



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28373936/viewspace-1722279/,如需轉載,請註明出處,否則將追究法律責任。

相關文章