Oracle11g RAC集群重启操作

Oracle11g RAC集群重启操作
 
1.关闭数据库
1.1 关闭前查看数据库状态
[oracle@fanxin01 ~]$ srvctl status database -d FXDB
实例 fxdb1 正在节点 fanxin01 上运行
实例 fxdb2 正在节点 fanxin02 上运行
 
1.2 关闭数据库
[oracle@fanxin01 ~]$ srvctl stop database -d FXDB
[oracle@fanxin01 ~]$ srvctl status database -d FXDB
实例 fxdb1 没有在 fanxin01 节点上运行
实例 fxdb2 没有在 fanxin02 节点上运行
 
 
2.停止集群服务
2.1 停止前的检查
[root@fanxin01 ~]# su - grid
[grid@fanxin01 ~]$ crs_stat -t -v
Name           Type           R/RA   F/FT   Target    State     Host        
----------------------------------------------------------------------
ora.DATA.dg    ora....up.type 0/5    0/     ONLINE    ONLINE    fanxin01    
ora....ER.lsnr ora....er.type 0/5    0/     ONLINE    ONLINE    fanxin01    
ora....N1.lsnr ora....er.type 0/5    0/0    ONLINE    ONLINE    fanxin02    
ora.asm        ora.asm.type   0/5    0/     ONLINE    ONLINE    fanxin01    
ora.cvu        ora.cvu.type   0/5    0/0    ONLINE    ONLINE    fanxin01    
ora....SM1.asm application    0/5    0/0    ONLINE    ONLINE    fanxin01    
ora....01.lsnr application    0/5    0/0    ONLINE    ONLINE    fanxin01    
ora....n01.gsd application    0/5    0/0    OFFLINE   OFFLINE               
ora....n01.ons application    0/3    0/0    ONLINE    ONLINE    fanxin01    
ora....n01.vip ora....t1.type 0/0    0/0    ONLINE    ONLINE    fanxin01    
ora....SM2.asm application    0/5    0/0    ONLINE    ONLINE    fanxin02    
ora....02.lsnr application    0/5    0/0    ONLINE    ONLINE    fanxin02    
ora....n02.gsd application    0/5    0/0    OFFLINE   OFFLINE               
ora....n02.ons application    0/3    0/0    ONLINE    ONLINE    fanxin02    
ora....n02.vip ora....t1.type 0/0    0/0    ONLINE    ONLINE    fanxin02    
ora.fxdb.db    ora....se.type 0/2    0/1    OFFLINE   OFFLINE               
ora.gsd        ora.gsd.type   0/5    0/     OFFLINE   OFFLINE               
ora....network ora....rk.type 0/5    0/     ONLINE    ONLINE    fanxin01    
ora.oc4j       ora.oc4j.type  0/1    0/2    ONLINE    ONLINE    fanxin01    
ora.ons        ora.ons.type   0/3    0/     ONLINE    ONLINE    fanxin01    
ora.scan1.vip  ora....ip.type 0/0    0/0    ONLINE    ONLINE    fanxin02
 
2.2 停止集群
[root@fanxin01 bin]# ./crsctl stop cluster -n fanxin01 fanxin02
CRS-2673: Attempting to stop 'ora.crsd' on 'fanxin01'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'fanxin01'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'fanxin01'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'fanxin01'
CRS-2673: Attempting to stop 'ora.cvu' on 'fanxin01'
CRS-2673: Attempting to stop 'ora.oc4j' on 'fanxin01'
CRS-2677: Stop of 'ora.cvu' on 'fanxin01' succeeded
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'fanxin01' succeeded
CRS-2673: Attempting to stop 'ora.fanxin01.vip' on 'fanxin01'
CRS-2677: Stop of 'ora.fanxin01.vip' on 'fanxin01' succeeded
CRS-2673: Attempting to stop 'ora.crsd' on 'fanxin02'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'fanxin02'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'fanxin02'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'fanxin02'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'fanxin02'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'fanxin02' succeeded
CRS-2673: Attempting to stop 'ora.fanxin02.vip' on 'fanxin02'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'fanxin02' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'fanxin02'
CRS-2677: Stop of 'ora.fanxin02.vip' on 'fanxin02' succeeded
CRS-2677: Stop of 'ora.scan1.vip' on 'fanxin02' succeeded
CRS-2677: Stop of 'ora.oc4j' on 'fanxin01' succeeded
CRS-2677: Stop of 'ora.DATA.dg' on 'fanxin01' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'fanxin01'
CRS-2677: Stop of 'ora.asm' on 'fanxin01' succeeded
CRS-2677: Stop of 'ora.DATA.dg' on 'fanxin02' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'fanxin02'
CRS-2677: Stop of 'ora.asm' on 'fanxin02' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'fanxin02'
CRS-2677: Stop of 'ora.ons' on 'fanxin02' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'fanxin02'
CRS-2677: Stop of 'ora.net1.network' on 'fanxin02' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'fanxin02' has completed
CRS-2673: Attempting to stop 'ora.ons' on 'fanxin01'
CRS-2677: Stop of 'ora.ons' on 'fanxin01' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'fanxin01'
CRS-2677: Stop of 'ora.net1.network' on 'fanxin01' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'fanxin01' has completed
CRS-2677: Stop of 'ora.crsd' on 'fanxin02' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'fanxin02'
CRS-2673: Attempting to stop 'ora.evmd' on 'fanxin02'
CRS-2673: Attempting to stop 'ora.asm' on 'fanxin02'
CRS-2677: Stop of 'ora.crsd' on 'fanxin01' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'fanxin01'
CRS-2673: Attempting to stop 'ora.evmd' on 'fanxin01'
CRS-2673: Attempting to stop 'ora.asm' on 'fanxin01'
CRS-2677: Stop of 'ora.evmd' on 'fanxin02' succeeded
CRS-2677: Stop of 'ora.evmd' on 'fanxin01' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'fanxin02' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'fanxin01' succeeded
CRS-2677: Stop of 'ora.asm' on 'fanxin02' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'fanxin02'
CRS-2677: Stop of 'ora.asm' on 'fanxin01' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'fanxin01'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'fanxin02' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'fanxin02'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'fanxin01' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'fanxin01'
CRS-2677: Stop of 'ora.cssd' on 'fanxin02' succeeded
CRS-2677: Stop of 'ora.cssd' on 'fanxin01' succeeded
 
[oracle@fanxin01 ~]$ srvctl status database -d FXDB
PRCD-1027 : 无法检索数据库 FXDB
PRCR-1115 : 找不到与过滤器 ((NAME == ora.fxdb.db) && (TYPE == ora.database.type)) 匹配且包含属性 VERSION,ORACLE_HOME,DATABASE_TYPE 的类型为 资源 的实体
Cannot communicate with crsd
 
[grid@fanxin01 ~]$ crs_stat -t -v
CRS-0184: Cannot communicate with the CRS daemon.
 
3.启动集群服务
[root@fanxin01 bin]# ./crsctl start cluster -n fanxin01 fanxin02
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'fanxin01'
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'fanxin02'
CRS-2676: Start of 'ora.cssdmonitor' on 'fanxin01' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'fanxin01'
CRS-2672: Attempting to start 'ora.diskmon' on 'fanxin01'
CRS-2676: Start of 'ora.cssdmonitor' on 'fanxin02' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'fanxin02'
CRS-2672: Attempting to start 'ora.diskmon' on 'fanxin02'
CRS-2676: Start of 'ora.diskmon' on 'fanxin01' succeeded
CRS-2676: Start of 'ora.diskmon' on 'fanxin02' succeeded
CRS-2676: Start of 'ora.cssd' on 'fanxin02' succeeded
CRS-2676: Start of 'ora.cssd' on 'fanxin01' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'fanxin02'
CRS-2672: Attempting to start 'ora.ctssd' on 'fanxin01'
CRS-2676: Start of 'ora.ctssd' on 'fanxin01' succeeded
CRS-2672: Attempting to start 'ora.evmd' on 'fanxin01'
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'fanxin01'
CRS-2676: Start of 'ora.ctssd' on 'fanxin02' succeeded
CRS-2672: Attempting to start 'ora.evmd' on 'fanxin02'
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'fanxin02'
CRS-2676: Start of 'ora.evmd' on 'fanxin01' succeeded
CRS-2676: Start of 'ora.evmd' on 'fanxin02' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'fanxin02' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'fanxin02'
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'fanxin01' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'fanxin01'
CRS-2676: Start of 'ora.asm' on 'fanxin02' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'fanxin02'
CRS-2676: Start of 'ora.asm' on 'fanxin01' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'fanxin01'
CRS-2676: Start of 'ora.crsd' on 'fanxin02' succeeded
CRS-2676: Start of 'ora.crsd' on 'fanxin01' succeeded
 
[oracle@fanxin01 ~]$ srvctl status database -d FXDB
实例 fxdb1 没有在 fanxin01 节点上运行
实例 fxdb2 没有在 fanxin02 节点上运行
 
4.启动数据库
[oracle@fanxin01 ~]$ srvctl start database -d FXDB
[oracle@fanxin01 ~]$
[oracle@fanxin01 ~]$ srvctl status database -d FXDB
实例 fxdb1 正在节点 fanxin01 上运行
实例 fxdb2 正在节点 fanxin02 上运行
[grid@fanxin01 ~]$ crs_stat -t -v
Name           Type           R/RA   F/FT   Target    State     Host        
----------------------------------------------------------------------
ora.DATA.dg    ora....up.type 0/5    0/     ONLINE    ONLINE    fanxin01    
ora....ER.lsnr ora....er.type 0/5    0/     ONLINE    ONLINE    fanxin01    
ora....N1.lsnr ora....er.type 0/5    0/0    ONLINE    ONLINE    fanxin01    
ora.asm        ora.asm.type   0/5    0/     ONLINE    ONLINE    fanxin01    
ora.cvu        ora.cvu.type   0/5    0/0    ONLINE    ONLINE    fanxin02    
ora....SM1.asm application    0/5    0/0    ONLINE    ONLINE    fanxin01    
ora....01.lsnr application    0/5    0/0    ONLINE    ONLINE    fanxin01    
ora....n01.gsd application    0/5    0/0    OFFLINE   OFFLINE               
ora....n01.ons application    0/3    0/0    ONLINE    ONLINE    fanxin01    
ora....n01.vip ora....t1.type 0/0    0/0    ONLINE    ONLINE    fanxin01    
ora....SM2.asm application    0/5    0/0    ONLINE    ONLINE    fanxin02    
ora....02.lsnr application    0/5    0/0    ONLINE    ONLINE    fanxin02    
ora....n02.gsd application    0/5    0/0    OFFLINE   OFFLINE               
ora....n02.ons application    0/3    0/0    ONLINE    ONLINE    fanxin02    
ora....n02.vip ora....t1.type 0/0    0/0    ONLINE    ONLINE    fanxin02    
ora.fxdb.db    ora....se.type 0/2    0/1    ONLINE    ONLINE    fanxin01    
ora.gsd        ora.gsd.type   0/5    0/     OFFLINE   OFFLINE               
ora....network ora....rk.type 0/5    0/     ONLINE    ONLINE    fanxin01    
ora.oc4j       ora.oc4j.type  0/1    0/2    ONLINE    ONLINE    fanxin02    
ora.ons        ora.ons.type   0/3    0/     ONLINE    ONLINE    fanxin01    
ora.scan1.vip  ora....ip.type 0/0    0/0    ONLINE    ONLINE    fanxin0
 
SQL> select inst_id,
  2         instance_name,
  3         version,
  4         startup_time,
  5         status,
  6         database_status
  7    from gv$instance;
   INST_ID INSTANCE_NAME    VERSION           STARTUP_TIME  STATUS       DATABASE_STATUS
---------- ---------------- -----------------  ------------ ------------ -----------------
         1 fxdb1            11.2.0.4.0        2020/4/26    OPEN         ACTIVE
         2 fxdb2            11.2.0.4.0        2020/4/26   OPEN         ACTIVE
 
发布了10 篇原创文章 · 获赞 3 · 访问量 1876

猜你喜欢

转载自blog.csdn.net/tttt0611/article/details/105777145
今日推荐