环境:RHEL6.5 + Oracle11.2.0.4 双节点RAC 故障现象:节点1实例没有启动成功,节点2正常启动。
尝试启动RAC 节点1,遭遇ORA-01105,ORA-01606:
SQL> startup mount;
ORACLE instance started.
Total System Global Area 9.4869E+10 bytes
Fixed Size 2264056 bytes
Variable Size 5.0197E+10 bytes
Database Buffers 4.4560E+10 bytes
Redo Buffers 109174784 bytes
ORA-01105: mount is incompatible with mounts by other instances
ORA-01606: parameter not identical to that of another mounted instance
数据库节点1目前状态是NOMOUNT.
错误代码说明:
$ oerr ora 1105
01105, 00000, "mount is incompatible with mounts by other instances"
// *Cause: An attempt to mount the database discovered that another instance
// mounted a database by the same name, but the mount is not
// compatible. Additional errors are reported explaining why.
// *Action: See accompanying errors.
$ oerr ora 1606
01606, 00000, "parameter not identical to that of another mounted instance"
// *Cause: A parameter was different on two instances.
// *Action: Modify the initialization parameter and restart.
查询gc_隐含参数
set linesize 333
col name for a35
col description for a66
col value for a30
SELECT i.ksppinm name,
i.ksppdesc description,
CV.ksppstvl VALUE
FROM sys.x$ksppi i, sys.x$ksppcv CV
WHERE i.inst_id = USERENV ('Instance')
AND CV.inst_id = USERENV ('Instance')
AND i.indx = CV.indx
AND i.ksppinm LIKE '/_gc%' ESCAPE '/'
ORDER BY REPLACE (i.ksppinm, '_', '');
查询结果如下(部分相同值的参数已省略):
--节点1:
_gc_policy_time how often to make object policy decisions in minutes 0
_gc_read_mostly_flush_check if TRUE, optimize flushes for read mostly objects FALSE
_gc_read_mostly_locking if TRUE, enable read-mostly locking FALSE
--节点2:
_gc_policy_time how often to make object policy decisions in minutes 10
_gc_read_mostly_flush_check if TRUE, optimize flushes for read mostly objects FALSE
_gc_read_mostly_locking if TRUE, enable read-mostly locking TRUE
发现问题,_gc_policy_time隐藏参数,_gc_read_mostly_locking隐藏参数,2个节点值不一致。 解决方法:根据现在正常运行的节点2的值,重新设置这两个值:
alter system set "_gc_read_mostly_locking"=true scope=spfile sid='*';
alter system set "_gc_policy_time"=10 scope=spfile sid='*';
--正常关闭节点1:
shutdown immediate;
--正常启动节点1:
startup
实际执行过程如下:
SQL> alter system set "_gc_read_mostly_locking"=true scope=spfile sid='*';
System altered.
SQL> alter system set "_gc_policy_time"=10 scope=spfile sid='*';
System altered.
SQL> shutdown immediate;
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 9.4869E+10 bytes
Fixed Size 2264056 bytes
Variable Size 5.1271E+10 bytes
Database Buffers 4.3487E+10 bytes
Redo Buffers 109174784 bytes
Database mounted.
Database opened.
至此RAC节点1启动成功。
猜测故障原因应该是之前有人修改数据库隐含参数,误操作只修改了一个实例导致。
当我们操作RAC环境时,一定要注意sid='*'
这一点。