[Oracle] crsctl stat res -t

tolilong發表於2016-05-25
oracle10g的時候檢視resource用 crs_stat -t比較多.
到了oracle11g後檢視resource 用 crsctl stat res -t

[root@xxxxxdb2 ~]# crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.FRA.dg
               ONLINE  ONLINE       xxxxxdb1                                     
               ONLINE  ONLINE       xxxxxdb2                                     
ora.LISTENER.lsnr
               ONLINE  ONLINE       xxxxxdb1                                     
               ONLINE  ONLINE       xxxxxdb2                                     
ora.OCR_VOT.dg
               ONLINE  ONLINE       xxxxxdb1                                     
               ONLINE  ONLINE       xxxxxdb2                                     
ora.ORADATA.dg
               ONLINE  ONLINE       xxxxxdb1                                     
               ONLINE  ONLINE       xxxxxdb2                                     
ora.asm
               ONLINE  ONLINE       xxxxxdb1                 Started             
               ONLINE  ONLINE       xxxxxdb2                                     
ora.eons
               ONLINE  ONLINE       xxxxxdb1                                     
               ONLINE  ONLINE       xxxxxdb2                                     
ora.gsd
               OFFLINE OFFLINE      xxxxxdb1                                     
               OFFLINE OFFLINE      xxxxxdb2                                     
ora.net1.network
               ONLINE  ONLINE       xxxxxdb1                                     
               ONLINE  ONLINE       xxxxxdb2                                     
ora.ons
               ONLINE  ONLINE       xxxxxdb1                                     
               ONLINE  ONLINE       xxxxxdb2                                     
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       xxxxxdb2                                     
ora.oc4j
      1        OFFLINE OFFLINE                                                   
ora.scan1.vip
      1        ONLINE  ONLINE       xxxxxdb2                                     
ora.xxxxxdb.db
      1        OFFLINE OFFLINE                                                   
      2        OFFLINE OFFLINE                               Instance Shutdown   
ora.xxxxxdb1.vip
      1        ONLINE  ONLINE       xxxxxdb1                                     
ora.xxxxxdb2.vip
      1        ONLINE  ONLINE       xxxxxdb2                      

其中ora.xxxxxdb.db顯示為offline狀態,其實用sqlplus 登入兩個節點檢視instance的狀態都為open
這個應該和srvctl config配置有關係。     
      
[root@xxxxxdb2 ~]# srvctl start instance -d xxxxxdb -n xxxxxdb2 -o open      
執行這個命令後xxxxxdb2   的狀態為online,並且為open.
      
[root@xxxxxdb2 ~]# crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.FRA.dg
               ONLINE  ONLINE       xxxxxdb1                                     
               ONLINE  ONLINE       xxxxxdb2                                     
ora.LISTENER.lsnr
               ONLINE  ONLINE       xxxxxdb1                                     
               ONLINE  ONLINE       xxxxxdb2                                     
ora.OCR_VOT.dg
               ONLINE  ONLINE       xxxxxdb1                                     
               ONLINE  ONLINE       xxxxxdb2                                     
ora.ORADATA.dg
               ONLINE  ONLINE       xxxxxdb1                                     
               ONLINE  ONLINE       xxxxxdb2                                     
ora.asm
               ONLINE  ONLINE       xxxxxdb1                 Started             
               ONLINE  ONLINE       xxxxxdb2                                     
ora.eons
               ONLINE  ONLINE       xxxxxdb1                                     
               ONLINE  ONLINE       xxxxxdb2                                     
ora.gsd
               OFFLINE OFFLINE      xxxxxdb1                                     
               OFFLINE OFFLINE      xxxxxdb2                                     
ora.net1.network
               ONLINE  ONLINE       xxxxxdb1                                     
               ONLINE  ONLINE       xxxxxdb2                                     
ora.ons
               ONLINE  ONLINE       xxxxxdb1                                     
               ONLINE  ONLINE       xxxxxdb2                                     
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       xxxxxdb2                                     
ora.oc4j
      1        OFFLINE OFFLINE                                                   
ora.scan1.vip
      1        ONLINE  ONLINE       xxxxxdb2                                     
ora.xxxxxdb.db
      1        OFFLINE OFFLINE                                                   
      2        ONLINE  ONLINE       xxxxxdb2                 Open                
ora.xxxxxdb1.vip
      1        ONLINE  ONLINE       xxxxxdb1                                     
ora.xxxxxdb2.vip
      1        ONLINE  ONLINE       xxxxxdb2             



[root@xxxxxdb2 ~]# srvctl start instance -d xxxxxdb -i xxxxxdb1 -o open
執行這個命令後xxxxxdb1   的狀態為online,並且為open. 但是檢視 xxxxxdb1  的alert log,instance會突然abort,讓後重新啟動。


[root@xxxxxdb2 ~]# crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.FRA.dg
               ONLINE  ONLINE       xxxxxdb1                                     
               ONLINE  ONLINE       xxxxxdb2                                     
ora.LISTENER.lsnr
               ONLINE  ONLINE       xxxxxdb1                                     
               ONLINE  ONLINE       xxxxxdb2                                     
ora.OCR_VOT.dg
               ONLINE  ONLINE       xxxxxdb1                                     
               ONLINE  ONLINE       xxxxxdb2                                     
ora.ORADATA.dg
               ONLINE  ONLINE       xxxxxdb1                                     
               ONLINE  ONLINE       xxxxxdb2                                     
ora.asm
               ONLINE  ONLINE       xxxxxdb1                 Started             
               ONLINE  ONLINE       xxxxxdb2                                     
ora.eons
               ONLINE  ONLINE       xxxxxdb1                                     
               ONLINE  ONLINE       xxxxxdb2                                     
ora.gsd
               OFFLINE OFFLINE      xxxxxdb1                                     
               OFFLINE OFFLINE      xxxxxdb2                                     
ora.net1.network
               ONLINE  ONLINE       xxxxxdb1                                     
               ONLINE  ONLINE       xxxxxdb2                                     
ora.ons
               ONLINE  ONLINE       xxxxxdb1                                     
               ONLINE  ONLINE       xxxxxdb2                                     
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       xxxxxdb2                                     
ora.oc4j
      1        OFFLINE OFFLINE                                                   
ora.scan1.vip
      1        ONLINE  ONLINE       xxxxxdb2                                     
ora.xxxxxdb.db
      1        ONLINE  ONLINE       xxxxxdb1                 Open                
      2        ONLINE  ONLINE       xxxxxdb2                 Open                
ora.xxxxxdb1.vip
      1        ONLINE  ONLINE       xxxxxdb1                                     
ora.xxxxxdb2.vip
      1        ONLINE  ONLINE       xxxxxdb2    

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

相關文章