DataGuard角色转换之physical standby switchover

DataGuard角色转换之physical standby switchover

在使用switchover进行角色转换时需先把pramary转换为standby再把standby转换为primary.physical standbylogical standby同时存在,在选择standby首先phycial standby

1.确认是否可以进行角色转换

select switchover_status from v$database;

若查询结果为to_standby表明可以进行,若查询为session active,在执行switchover命令是就需要加上with session shudown

2.primary database转换为standby database

alter database commit to switchover to physical standby;

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

3.关闭并重新启动新的standby

shutdown immediate;

startup mount;

alter database recover managed standby database disconnect;

现在同时存在两个standy

4.当把primary转换为standby时会在redo stream中产生一个标记,并将这个标记传给standby.这个标记说明不再产生redo.standby收到这个标记时,它就可以转换为primary

查看swithover_status的状态

select switchover_status from v$database,关于switchover_status的说明同上

5.standby转换为primary

alter database commit to switchover to primary;

alter database commit to switchover to primary with session shutdown;

6.关闭并重新启动新的primary

shutdown immediate;

startup;

7.确认

primary:

alter system switch logfile;

archive log list;

standby:

select process,status from v$managed_standby;

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7419833/viewspace-604994/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/7419833/viewspace-604994/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值