oracle 10g srvctl 不能带起节点实例问题
oracle 10g srvctl 不能带起节点实例问题
今天在用crs启动集群时,发现不能带起第二个节点的实例
[oracle@p520:/oracle/app/oracle]$crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.orcl.db application ONLINE ONLINE p520
ora....l1.inst application ONLINE ONLINE p520
ora....l2.inst application ONLINE OFFLINE
ora....SM1.asm application ONLINE ONLINE p520
ora....20.lsnr application ONLINE ONLINE p520
ora.p520.gsd application ONLINE ONLINE p520
ora.p520.ons application ONLINE ONLINE p520
ora.p520.vip application ONLINE ONLINE p520
ora....SM2.asm application ONLINE ONLINE p650
ora....50.lsnr application ONLINE ONLINE p650
ora.p650.gsd application ONLINE ONLINE p650
ora.p650.ons application ONLINE ONLINE p650
ora.p650.vip application ONLINE ONLINE p650
查看
[oracle@p650:/oracle/app/oracle/product/10.2.0/clusterdb/log/p650/racg]$ls -ltr
total 1376
drwxr-xr-x 2 oracle oinstall 256 May 25 14:49 racgmain
drwxr-xr-x 2 oracle oinstall 256 May 25 14:49 racgeut
drwxr-xr-x 2 oracle oinstall 256 May 25 15:07 racgimon
drwxr-xr-x 2 oracle oinstall 256 May 25 15:07 racgmdb
-rw-r--r-- 1 oracle oinstall 24214 Jun 04 10:43 ora.test.test2.inst.log
-rw-r--r-- 1 oracle oinstall 29041 Jun 04 10:59 ora.orcl.orcl2.inst.log
-rw-r--r-- 1 oracle oinstall 62664 Jun 04 11:01 ora.p650.LISTENER_P650.lsnr.log
-rw-r--r-- 1 oracle oinstall 29917 Jun 04 11:01 mdb.log
-rw-r--r-- 1 oracle oinstall 54291 Jun 04 11:01 ora.p650.ASM2.asm.log
-rw-r--r-- 1 oracle oinstall 60698 Jun 04 11:01 imontest.log
-rw-r--r-- 1 oracle oinstall 119083 Jun 04 11:01 imon_test.log
-rw-r--r-- 1 oracle oinstall 74331 Jun 04 11:01 imonorcl.log
-rw-r--r-- 1 oracle oinstall 220726 Jun 04 11:01 imon_orcl.log
ora.orcl.orcl2.inst.log 日志记录如下:
SQL*Plus: Release 10.2.0.4.0 - Production on Fri Jun 4 10:42:26 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Enter user-name: Connected to an idle instance.
SQL> ORA-01565: error in identifying file '+dgtest/orcl/spfileorcl.ora'
ORA-175'
处理过程如下:
手工启动这个节点的实例是可以启动的
[oracle@p650:/oracle/app/oracle/product/10.2.0/clusterdb/log/p650/racg]$export ORACLE_SID=orcl2
[oracle@p650:/oracle/app/oracle/product/10.2.0/clusterdb/log/p650/racg]$sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.4.0 - Production on Fri Jun 4 10:54:02 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 4982833152 bytes
Fixed Size 2090856 bytes
Variable Size 889194648 bytes
Database Buffers 4076863488 bytes
Redo Buffers 14684160 bytes
SQL> show parameter spfile
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
spfile string
+DGTEST/orcl/spfileorcl.ora
我们可以看到是DGTEST是大写的
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@p650:/oracle/app/oracle/product/10.2.0/clusterdb/log/p650/racg]$cd $ORACLE_HOME/dbs
[oracle@p650:/oracle/app/oracle/product/10.2.0/clusterdb/dbs]$ls
ab_+ASM2.dat arch1_39_720092431.dbf arch2_18_720092431.dbf init.ora orapwjl
arch1_1_720542036.dbf arch1_40_720092431.dbf hc_+ASM2.dat initdw.ora orapworcl2
arch1_35_720092431.dbf arch1_41_720092431.dbf hc_jl.dat initjl.ora orapwtest2
arch1_36_720092431.dbf arch2_15_720092431.dbf hc_orcl2.dat initorcl2.ora snapcf_test2.f
arch1_37_720092431.dbf arch2_16_720092431.dbf hc_test2.dat inittest2.ora spfilejl.ora.old
arch1_38_720092431.dbf arch2_17_720092431.dbf init+ASM2.ora orapw+ASM2
[oracle@p650:/oracle/app/oracle/product/10.2.0/clusterdb/dbs]$more initorcl2.ora
SPFILE='+dgtest/orcl/spfileorcl.ora'
而initorcl2.ora 下面的spfile dgtest是小写的
更改成大写
[oracle@p650:/oracle/app/oracle/product/10.2.0/clusterdb/dbs]$vi initorcl2.ora
"initorcl2.ora" 1 line, 37 characters
SPFILE='+DGTEST/orcl/spfileorcl.ora'
srvctl 修改database spfile 参数
[color=#000066][oracle@p650:/oracle/app/oracle/product/10.2.0/clusterdb/dbs]$srvctl modify database -d orcl -o /oracle/app/oracle/product/10.2.0/clusterdb -p +DGTEST/orcl/spfileorcl.ora
后再启动crs,能带起节点2数据库
[oracle@p650:/oracle/app/oracle]$crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.orcl.db application ONLINE ONLINE p650
ora....l1.inst application ONLINE ONLINE p520
ora....l2.inst application ONLINE ONLINE p650
ora....SM1.asm application ONLINE ONLINE p520
ora....20.lsnr application ONLINE ONLINE p520
ora.p520.gsd application ONLINE ONLINE p520
ora.p520.ons application ONLINE ONLINE p520
ora.p520.vip application ONLINE ONLINE p520
ora....SM2.asm application ONLINE ONLINE p650
ora....50.lsnr application ONLINE ONLINE p650
ora.p650.gsd application ONLINE ONLINE p650
ora.p650.ons application ONLINE ONLINE p650
ora.p650.vip application ONLINE ONLINE p650
总结:数据库实例的spfile参数和$ORACLE_HOME/dbs/initsid.ora文件要一致,有大小写区分
要注意。