zoukankan      html  css  js  c++  java
  • 11g Rac 切换

    <pre name="code" class="sql">[grid@devrac1 ~]$ crsctl status res -t
    --------------------------------------------------------------------------------
    NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
    --------------------------------------------------------------------------------
    Local Resources
    --------------------------------------------------------------------------------
    ora.DATA.dg
                   ONLINE  ONLINE       devrac1                                      
                   ONLINE  ONLINE       devrac2                                      
    ora.LISTENER.lsnr
                   ONLINE  ONLINE       devrac1                                      
                   ONLINE  ONLINE       devrac2                                      
    ora.OCRVOT.dg
                   ONLINE  ONLINE       devrac1                                      
                   ONLINE  ONLINE       devrac2                                      
    ora.asm
                   ONLINE  ONLINE       devrac1                  Started             
                   ONLINE  ONLINE       devrac2                  Started             
    ora.gsd
                   OFFLINE OFFLINE      devrac1                                      
                   OFFLINE OFFLINE      devrac2                                      
    ora.net1.network
                   ONLINE  ONLINE       devrac1                                      
                   ONLINE  ONLINE       devrac2                                      
    ora.ons
                   ONLINE  ONLINE       devrac1                                      
                   ONLINE  ONLINE       devrac2                                      
    --------------------------------------------------------------------------------
    Cluster Resources
    --------------------------------------------------------------------------------
    ora.LISTENER_SCAN1.lsnr
          1        ONLINE  ONLINE       devrac2                                      
    ora.cvu
          1        ONLINE  ONLINE       devrac2                                      
    ora.devrac.db
          1        ONLINE  ONLINE       devrac1                  Open                
          2        ONLINE  ONLINE       devrac2                  Open                
    ora.devrac.devrun1.svc
          1        ONLINE  ONLINE       devrac1                                      
    ora.devrac.devrun2.svc
          1        ONLINE  ONLINE       devrac2                                      
    ora.devrac1.vip
          1        ONLINE  ONLINE       devrac1                                      
    ora.devrac2.vip
          1        ONLINE  ONLINE       devrac2                                      
    ora.oc4j
          1        ONLINE  ONLINE       devrac2                                      
    ora.scan1.vip
          1        ONLINE  ONLINE       devrac2
    
    
    ######################################################################################################################################################################
    [grid@devrac2 ~]$ crsctl status res -t
    --------------------------------------------------------------------------------
    NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
    --------------------------------------------------------------------------------
    Local Resources
    --------------------------------------------------------------------------------
    ora.DATA.dg
                   ONLINE  ONLINE       devrac1                                      
                   ONLINE  ONLINE       devrac2                                      
    ora.LISTENER.lsnr
                   ONLINE  ONLINE       devrac1                                      
                   ONLINE  ONLINE       devrac2                                      
    ora.OCRVOT.dg
                   ONLINE  ONLINE       devrac1                                      
                   ONLINE  ONLINE       devrac2                                      
    ora.asm
                   ONLINE  ONLINE       devrac1                  Started             
                   ONLINE  ONLINE       devrac2                  Started             
    ora.gsd
                   OFFLINE OFFLINE      devrac1                                      
                   OFFLINE OFFLINE      devrac2                                      
    ora.net1.network
                   ONLINE  ONLINE       devrac1                                      
                   ONLINE  ONLINE       devrac2                                      
    ora.ons
                   ONLINE  ONLINE       devrac1                                      
                   ONLINE  ONLINE       devrac2                                      
    --------------------------------------------------------------------------------
    Cluster Resources
    --------------------------------------------------------------------------------
    ora.LISTENER_SCAN1.lsnr
          1        ONLINE  ONLINE       devrac2                                      
    ora.cvu
          1        ONLINE  ONLINE       devrac2                                      
    ora.devrac.db
          1        ONLINE  ONLINE       devrac1                  Open                
          2        ONLINE  ONLINE       devrac2                  Open                
    ora.devrac.devrun1.svc
          1        ONLINE  ONLINE       devrac1                                      
    ora.devrac.devrun2.svc
          1        ONLINE  ONLINE       devrac2                                      
    ora.devrac1.vip
          1        ONLINE  ONLINE       devrac1                                      
    ora.devrac2.vip
          1        ONLINE  ONLINE       devrac2                                      
    ora.oc4j
          1        ONLINE  ONLINE       devrac2                                      
    ora.scan1.vip
          1        ONLINE  ONLINE       devrac2   
    
    ----开始连在devrac1节点上
    SQL> select distinct username from v$session;
    
    USERNAME
    ------------------------------
    
    HZMCASSET
    CZCIS
    SYS
    CBSRUN
    
    [grid@devrac1 ~]$ crsctl stop crs
    CRS-4563: Insufficient user privileges.
    
    CRS-4000: Command Stop failed, or completed with errors.
    [grid@devrac1 ~]$ exit
    logout
    [root@devrac1 grid]# crsctl stop crs
    CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'devrac1'
    CRS-2673: Attempting to stop 'ora.crsd' on 'devrac1'
    CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'devrac1'
    CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'devrac1'
    CRS-2673: Attempting to stop 'ora.devrac.devrun1.svc' on 'devrac1'
    CRS-2677: Stop of 'ora.devrac.devrun1.svc' on 'devrac1' succeeded
    CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'devrac1' succeeded
    CRS-2673: Attempting to stop 'ora.devrac1.vip' on 'devrac1'
    CRS-2677: Stop of 'ora.devrac1.vip' on 'devrac1' succeeded
    CRS-2672: Attempting to start 'ora.devrac1.vip' on 'devrac2'
    CRS-2676: Start of 'ora.devrac1.vip' on 'devrac2' succeeded
    CRS-2672: Attempting to start 'ora.devrac.devrun1.svc' on 'devrac2'
    CRS-2676: Start of 'ora.devrac.devrun1.svc' on 'devrac2' succeeded
    CRS-2673: Attempting to stop 'ora.OCRVOT.dg' on 'devrac1'
    CRS-2673: Attempting to stop 'ora.devrac.db' on 'devrac1'
    CRS-2677: Stop of 'ora.devrac.db' on 'devrac1' succeeded
    CRS-2673: Attempting to stop 'ora.DATA.dg' on 'devrac1'
    CRS-2677: Stop of 'ora.DATA.dg' on 'devrac1' succeeded
    CRS-2677: Stop of 'ora.OCRVOT.dg' on 'devrac1' succeeded
    CRS-2673: Attempting to stop 'ora.asm' on 'devrac1'
    CRS-2677: Stop of 'ora.asm' on 'devrac1' succeeded
    CRS-2673: Attempting to stop 'ora.ons' on 'devrac1'
    CRS-2677: Stop of 'ora.ons' on 'devrac1' succeeded
    CRS-2673: Attempting to stop 'ora.net1.network' on 'devrac1'
    CRS-2677: Stop of 'ora.net1.network' on 'devrac1' succeeded
    CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'devrac1' has completed
    CRS-2677: Stop of 'ora.crsd' on 'devrac1' succeeded
    CRS-2673: Attempting to stop 'ora.mdnsd' on 'devrac1'
    CRS-2673: Attempting to stop 'ora.ctssd' on 'devrac1'
    CRS-2673: Attempting to stop 'ora.evmd' on 'devrac1'
    CRS-2673: Attempting to stop 'ora.asm' on 'devrac1'
    CRS-2677: Stop of 'ora.evmd' on 'devrac1' succeeded
    CRS-2677: Stop of 'ora.mdnsd' on 'devrac1' succeeded
    CRS-2677: Stop of 'ora.asm' on 'devrac1' succeeded
    CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'devrac1'
    CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'devrac1' succeeded
    CRS-2677: Stop of 'ora.ctssd' on 'devrac1' succeeded
    CRS-2673: Attempting to stop 'ora.cssd' on 'devrac1'
    CRS-2677: Stop of 'ora.cssd' on 'devrac1' succeeded
    CRS-2673: Attempting to stop 'ora.crf' on 'devrac1'
    CRS-2677: Stop of 'ora.crf' on 'devrac1' succeeded
    CRS-2673: Attempting to stop 'ora.gipcd' on 'devrac1'
    CRS-2677: Stop of 'ora.gipcd' on 'devrac1' succeeded
    CRS-2673: Attempting to stop 'ora.gpnpd' on 'devrac1'
    CRS-2677: Stop of 'ora.gpnpd' on 'devrac1' succeeded
    CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'devrac1' has completed
    CRS-4133: Oracle High Availability Services has been stopped.
    
    [grid@devrac2 ~]$ crsctl status res -t
    --------------------------------------------------------------------------------
    NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
    --------------------------------------------------------------------------------
    Local Resources
    --------------------------------------------------------------------------------
    ora.DATA.dg
                   ONLINE  OFFLINE      devrac1                                      
                   ONLINE  ONLINE       devrac2                                      
    ora.LISTENER.lsnr
                   ONLINE  OFFLINE      devrac1                                      
                   ONLINE  ONLINE       devrac2                                      
    ora.OCRVOT.dg
                   ONLINE  OFFLINE      devrac1                                      
                   ONLINE  ONLINE       devrac2                                      
    ora.asm
                   ONLINE  OFFLINE      devrac1                                      
                   ONLINE  ONLINE       devrac2                  Started             
    ora.gsd
                   OFFLINE OFFLINE      devrac1                                      
                   OFFLINE OFFLINE      devrac2                                      
    ora.net1.network
                   ONLINE  OFFLINE      devrac1                                      
                   ONLINE  ONLINE       devrac2                                      
    ora.ons
                   ONLINE  OFFLINE      devrac1                                      
                   ONLINE  ONLINE       devrac2                                      
    --------------------------------------------------------------------------------
    Cluster Resources
    --------------------------------------------------------------------------------
    ora.LISTENER_SCAN1.lsnr
          1        ONLINE  ONLINE       devrac2                                      
    ora.cvu
          1        ONLINE  ONLINE       devrac2                                      
    ora.devrac.db
          1        ONLINE  OFFLINE                               Instance Shutdown   
          2        ONLINE  ONLINE       devrac2                  Open                
    ora.devrac.devrun1.svc
          1        ONLINE  ONLINE       devrac2                                      
    ora.devrac.devrun2.svc
          1        ONLINE  ONLINE       devrac2                                      
    ora.devrac1.vip
          1        ONLINE  INTERMEDIATE devrac2                  FAILED OVER         
    ora.devrac2.vip
          1        ONLINE  ONLINE       devrac2                                      
    ora.oc4j
          1        ONLINE  ONLINE       devrac2                                      
    ora.scan1.vip
          1        ONLINE  ONLINE       devrac2  
    
    
    启动CRS:
    [grid@devrac1 ~]$ crsctl status res -t
    --------------------------------------------------------------------------------
    NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
    --------------------------------------------------------------------------------
    Local Resources
    --------------------------------------------------------------------------------
    ora.DATA.dg
                   ONLINE  ONLINE       devrac1                                      
                   ONLINE  ONLINE       devrac2                                      
    ora.LISTENER.lsnr
                   ONLINE  ONLINE       devrac1                                      
                   ONLINE  ONLINE       devrac2                                      
    ora.OCRVOT.dg
                   ONLINE  ONLINE       devrac1                                      
                   ONLINE  ONLINE       devrac2                                      
    ora.asm
                   ONLINE  ONLINE       devrac1                  Started             
                   ONLINE  ONLINE       devrac2                  Started             
    ora.gsd
                   OFFLINE OFFLINE      devrac1                                      
                   OFFLINE OFFLINE      devrac2                                      
    ora.net1.network
                   ONLINE  ONLINE       devrac1                                      
                   ONLINE  ONLINE       devrac2                                      
    ora.ons
                   ONLINE  ONLINE       devrac1                                      
                   ONLINE  ONLINE       devrac2                                      
    --------------------------------------------------------------------------------
    Cluster Resources
    --------------------------------------------------------------------------------
    ora.LISTENER_SCAN1.lsnr
          1        ONLINE  ONLINE       devrac2                                      
    ora.cvu
          1        ONLINE  ONLINE       devrac2                                      
    ora.devrac.db
          1        ONLINE  ONLINE       devrac1                  Open                
          2        ONLINE  ONLINE       devrac2                  Open                
    ora.devrac.devrun1.svc
          1        ONLINE  ONLINE       devrac2                                      
    ora.devrac.devrun2.svc
          1        ONLINE  ONLINE       devrac2                                      
    ora.devrac1.vip
          1        ONLINE  ONLINE       devrac1                                      
    ora.devrac2.vip
          1        ONLINE  ONLINE       devrac2                                      
    ora.oc4j
          1        ONLINE  ONLINE       devrac2                                      
    ora.scan1.vip
          1        ONLINE  ONLINE       devrac2 
    
    
    
    crsctl stop crs 方式停止数据库,启动后数据库会自动打开
    


    
    
    
    
  • 相关阅读:
    数据的艺术
    第十七篇 make的路径搜索综合实践
    第十六篇 make中的路径搜索
    第十五篇 make中的隐式规则概述
    第十四篇 自动生成依赖关系(终结)
    [SDOI2009]HH的项链解题报告
    欧几里德与扩展欧几里德算法的理解、实现与应用
    浅析强连通分量(Tarjan和kosaraju)
    deque-at
    plt.imshow()
  • 原文地址:https://www.cnblogs.com/zhaoyangjian724/p/3797839.html
Copyright © 2011-2022 走看看