在oracle 10g rac环境下执行了以下命令
节点1上:
SQL> alter system set cluster_database=false scope=spfile;
System altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
再次打开数据库到mount状态的时候,出现了报错:
SQL> startup mount
ORA-29707: inconsistent value 1 for initialization parameter cluster_database_instances with other instances
直接startup也是如此:
SQL> startup
ORA-29707: inconsistent value 1 for initialization parameter cluster_database_instances with other instances
经过在网上搜寻,得到一个方法就是:关闭其他所有的实例,然后重启数据库。
节点2上:
QL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
然后在两个节点上分别startup数据库:
节点1上:
SQL> startup
ORACLE instance started.
Total System Global Area 364904448 bytes
Fixed Size 1219448 bytes
Variable Size 197133448 bytes
Database Buffers 163577856 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
节点2上:
SQL> startup
ORACLE instance started.
Total System Global Area 364904448 bytes
Fixed Size 1219448 bytes
Variable Size 155190408 bytes
Database Buffers 205520896 bytes
Redo Buffers 2973696 bytes
ORA-01102: cannot mount database in EXCLUSIVE mode
发现在节点2上报了个ORA-01102的错误(真是一波未平,一波又起……),于是2继续搜索此错误,继续进行了下面的操作:
在节点2上:
SQL> show parameter cluster_database;
NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
cluster_database boolean
FALSE
cluster_database_instances integer
参数cluster_database发现为flase,记得之前设置了此参数,感觉可能是此参数引起的,便尝试着在一个节点上将此参数设置为true,然后重启该节点
SQL> alter system set cluster_database=true scope=spfile;
System altered.
SQL> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 364904448 bytes
Fixed Size 1219448 bytes
Variable Size 155190408 bytes
Database Buffers 205520896 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
SQL> select instance_name,status from gv$instance;
INSTANCE_NAME STATUS
---------------- ------------
rac2 OPEN
rac1 OPEN
SQL>
问题解决!