RAC 11.2.0.3 ORA-01102: cannot mount database in EXCLUSIVE mode”

snowdba發表於2014-07-04

檢視叢集資源狀態,節點node2的instance沒能啟動
[grid@node1 ~]$ crsctl status res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS      
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
               ONLINE  ONLINE       node1                                       
               ONLINE  ONLINE       node2                                       
ora.DATA.dg
               ONLINE  ONLINE       node1                                       
               ONLINE  ONLINE       node2                                       
ora.LISTENER.lsnr
               ONLINE  ONLINE       node1                                       
               ONLINE  ONLINE       node2                                       
ora.ORCVOTE.dg
               ONLINE  ONLINE       node1                                       
               ONLINE  ONLINE       node2                                       
ora.asm
               ONLINE  ONLINE       node1                    Started            
               ONLINE  ONLINE       node2                    Started            
ora.gsd
               OFFLINE OFFLINE      node1                                       
               OFFLINE OFFLINE      node2                                       
ora.net1.network
               ONLINE  ONLINE       node1                                       
               ONLINE  ONLINE       node2                                       
ora.ons
               ONLINE  ONLINE       node1                                       
               ONLINE  ONLINE       node2                                       
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       node1                                       
ora.cvu
      1        ONLINE  ONLINE       node1                                       
ora.node1.vip
      1        ONLINE  ONLINE       node1                                       
ora.node2.vip
      1        ONLINE  ONLINE       node2                                       
ora.oc4j
      1        ONLINE  ONLINE       node1                                       
ora.prod.db
      1        ONLINE  ONLINE       node1                    Open               
      2        ONLINE  OFFLINE                               Instance Shutdown  
ora.scan1.vip
      1        ONLINE  ONLINE       node1 




在節點node2 以oracle使用者登入sqlplus
資料例項是idle的,嘗試startup啟動出錯“ORA-01102: cannot mount database in EXCLUSIVE mode”
[oracle@node2 ~]$ sqlplus / as sysdba


SQL*Plus: Release 11.2.0.3.0 Production on Tue Jul 1 23:20:56 2014


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


Connected to an idle instance.


SYS@PROD2> startup
ORA-01102: cannot mount database in EXCLUSIVE mode
SYS@PROD2> 


檢視alert日誌
[oracle@node2 ~]$ vi /s01/diag/rdbms/prod/PROD2/trace/alert_PROD2.log
…..
…...
Tue Jul 01 23:21:10 2014
MARK started with pid=26, OS id=4898
NOTE: MARK has subscribed
starting up 1 shared server(s) ...
lmon registered with NM - instance number 2 (internal mem no 1)
USER (ospid: 4743): terminating the instance due to error 1102
Instance terminated by USER, pid = 4743




用健康的節點node1登入,發現節點node1的例項PROD1的cluster_database屬性為false !
[oracle@node1 ~]$ sqlplus / as sysdba


SQL*Plus: Release 11.2.0.3.0 Production on Tue Jul 1 23:34:10 2014


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




Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options


SYS@PROD1> show parameter cluster_database;


NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
cluster_database                     boolean     FALSE
cluster_database_instances     integer     1

修改spfile中的引數,初步斷定問題的原因是此處導致!

SYS@PROD1> alter system set cluster_database=TRUE scope=spfile sid='PROD1';


System altered.


SYS@PROD1> alter system set cluster_database_instances=2 scope=spfile sid=‘PROD1';


System altered.


退出sqlplus,su到grid使用者下關閉資料庫


[grid@node1 ~]$ srvctl stop database -d prod;




檢視叢集資源狀態,兩個節點的資料庫例項都是shutdown的狀態
[grid@node1 ~]$ crsctl status res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS      
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
               ONLINE  ONLINE       node1                                       
               ONLINE  ONLINE       node2                                       
ora.DATA.dg
               ONLINE  ONLINE       node1                                       
               ONLINE  ONLINE       node2                                       
ora.LISTENER.lsnr
               ONLINE  ONLINE       node1                                       
               ONLINE  ONLINE       node2                                       
ora.ORCVOTE.dg
               ONLINE  ONLINE       node1                                       
               ONLINE  ONLINE       node2                                       
ora.asm
               ONLINE  ONLINE       node1                    Started            
               ONLINE  ONLINE       node2                    Started            
ora.gsd
               OFFLINE OFFLINE      node1                                       
               OFFLINE OFFLINE      node2                                       
ora.net1.network
               ONLINE  ONLINE       node1                                       
               ONLINE  ONLINE       node2                                       
ora.ons
               ONLINE  ONLINE       node1                                       
               ONLINE  ONLINE       node2                                       
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       node1                                       
ora.cvu
      1        ONLINE  ONLINE       node1                                       
ora.node1.vip
      1        ONLINE  ONLINE       node1                                       
ora.node2.vip
      1        ONLINE  ONLINE       node2                                       
ora.oc4j
      1        ONLINE  ONLINE       node1                                       
ora.prod.db
      1        OFFLINE OFFLINE                               Instance Shutdown  
      2        ONLINE  OFFLINE                               Instance Shutdown  
ora.scan1.vip
      1        ONLINE  ONLINE       node1 




重新啟動資料庫,啟動成功!


[grid@node1 ~]$ srvctl stop database -d prod;



[grid@node1 ~]$ crsctl status res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS      
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
               ONLINE  ONLINE       node1                                       
               ONLINE  ONLINE       node2                                       
ora.DATA.dg
               ONLINE  ONLINE       node1                                       
               ONLINE  ONLINE       node2                                       
ora.LISTENER.lsnr
               ONLINE  ONLINE       node1                                       
               ONLINE  ONLINE       node2                                       
ora.ORCVOTE.dg
               ONLINE  ONLINE       node1                                       
               ONLINE  ONLINE       node2                                       
ora.asm
               ONLINE  ONLINE       node1                    Started            
               ONLINE  ONLINE       node2                    Started            
ora.gsd
               OFFLINE OFFLINE      node1                                       
               OFFLINE OFFLINE      node2                                       
ora.net1.network
               ONLINE  ONLINE       node1                                       
               ONLINE  ONLINE       node2                                       
ora.ons
               ONLINE  ONLINE       node1                                       
               ONLINE  ONLINE       node2                                       
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       node1                                       
ora.cvu
      1        ONLINE  ONLINE       node1                                       
ora.node1.vip
      1        ONLINE  ONLINE       node1                                       
ora.node2.vip
      1        ONLINE  ONLINE       node2                                       
ora.oc4j
      1        ONLINE  ONLINE       node1                                       
ora.prod.db
      1        ONLINE  ONLINE       node1                    Open               
      2        ONLINE  ONLINE       node2                    Open               
ora.scan1.vip
      1        ONLINE  ONLINE       node1                    




檢視引數,spfile已經修改成功,cluster_database 引數為TRUE
SYS@PROD1> show parameter cluster_database


NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
cluster_database                     boolean     TRUE
cluster_database_instances           integer     2          

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

相關文章