oracle dg switchover,Oracle rac+dg的switchover和failover步骤

环境:

主库为双节点RAC,备库为单节点+ASM 数据库版本为11.2.0.4

switchover:

1.rac2节点

shutdown immediate;

2.rac1节点

alter database commit to switchover to physical standby with session shutdown;

startup;

3.standby节点

alter database commit to switchover to primary with session shutdown;

select database_role,open_mode from v$database;

alter database open;

alter system switch logfile;

4.rac1 节点

alter database recover managed standby database using current logfile disconnect from session;

5.standby节点(现在为主节点)状态检查

select process,client_process,status,sequence# from gv$managerd_standby;------process为LNS的status为writting

select dest_name,status,recovery_mode from v$archive_dest_status;------LOG_ARCGIVE_DEST_2的recovery_Mode为MANAGED REAL TIME APPLY

6.rac1节点(现在备节点)状态检查

select * from (select sequence#,completion_time,applied from v$archive_log order by 2 desc) where rownum<10;----sequence#最大的applied列为in-memory 其余前几个为YES

select * from v$archive_gap;-------查询为空

select process,client_process,status,sequence# from gv$managerd_standby;------process为MRP的status为applying_log

select dest_name,status,recovery_mode from gv$archive_dest_status;------LOG_ARCGIVE_DEST_1的recovery_Mode为MANAGED REAL TIME APPLY

failover(rac双节点异常关机):

1.standby节点

alter database recover managed standby database finish force;

alter database commit to switchover to primary with session shutdown;

select database_role,open_mode from v$database;

alter database open;

alter system switch logfile;

failover后利用flashback database重建主备关系:

该方法的前提条件是之前的rac在failover之前开启了flashback database

1.rac2节点

shutdown immediate;

2.rac1节点

shutdown immediate;

startup mount;

3.standby节点

select standby_became_primary_scn from v$database;----查询出备库做failover时的scn

4.rac1节点

flashback database to scn xxx;

alter database convert to physical standby;

shutdown immediate;

startup;

alter database recover managed standby database using current logfile disconnect from session;

5.standby节点(现在为主节点)状态检查

select process,client_process,status,sequence# from gv$managerd_standby;------process为LNS的status为writting

select dest_name,status,recovery_mode from v$archive_dest_status;------LOG_ARCGIVE_DEST_2的recovery_Mode为MANAGED REAL TIME APPLY

6.rac1节点(现在备节点)状态检查

select * from (select sequence#,completion_time,applied from v$archive_log order by 2 desc) where rownum<10;----sequence#最大的applied列为in-memory 其余前几个为YES

select * from v$archive_gap;-------查询为空

select process,client_process,status,sequence# from gv$managerd_standby;------process为MRP的status为applying_log

select dest_name,status,recovery_mode from gv$archive_dest_status;------LOG_ARCGIVE_DEST_1的recovery_Mode为MANAGED REAL TIME APPLY

7.rac2节点(关于rac2节点的这个停启操作没什么科学依据。。只是我单纯的认为单节点对单节点的话可能会避免一些问题。。等稳定了再把这个节点起来也不迟嘛!)

startup;

failover后利用rman重建主备关系:

回来再补充,?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值