DataGuard开启failover
1、修改保护模式
DGMGRL> edit configuration set protection mode as maxAvailability;Succeeded.
2、修改日志同步方式
DGMGRL> show database verbose xiaohe 'LogXptMode'LogXptMode = 'ASYNC'DGMGRL> show database verbose xiaohedg 'LogXptMode'LogXptMode = 'ASYNC'DGMGRL> edit database xiaohe set property LogXptMode = 'SYNC';Property "logxptmode" updatedDGMGRL> edit database xiaohedg set property LogXptMode = 'SYNC';Property "logxptmode" updatedDGMGRL>DGMGRL> show database verbose xiaohe 'LogXptMode'LogXptMode = 'SYNC'DGMGRL> show database verbose xiaohedg 'LogXptMode'LogXptMode = 'SYNC'
3、在dgmgrl中配置主库与standby数据库的FastStartFailoverTarget属性
DGMGRL> show database verbose xiaohe 'FastStartFailoverTarget';FastStartFailoverTarget = 'xiaohedg'DGMGRL> show database verbose xiaohedg 'FastStartFailoverTarget';FastStartFailoverTarget = 'xiaohe'
4、启动observer
5、在另外一个终端查看failover状态
DGMGRL> show fast_start failoverFast-Start Failover: DISABLEDThreshold: 30 secondsTarget: (none)Observer: xiaohe_dg1Lag Limit: 30 secondsShutdown Primary: TRUEAuto-reinstate: TRUEConfigurable Failover ConditionsHealth Conditions:Corrupted Controlfile YESCorrupted Dictionary YESInaccessible Logfile NOStuck Archiver NODatafile Offline YESOracle Error Conditions:(none)
6、激活failover功能
DGMGRL> enable fast_start failover;Enabled.
7、模拟故障
SQL> shutdown abort;ORACLE instance shut down.
DGMGRL> start observerObserver started23:56:08.19 Saturday, March 18, 2017Initiating Fast-Start Failover to database "xiaohe"...Performing failover NOW, please wait...Failover succeeded, new primary is "xiaohe"23:56:11.64 Saturday, March 18, 2017
SQL> select open_mode from v$database;OPEN_MODE--------------------READ WRITE
SQL> startupORACLE instance started.Total System Global Area 839282688 bytesFixed Size 2233000 bytesVariable Size 494931288 bytesDatabase Buffers 339738624 bytesRedo Buffers 2379776 bytesDatabase mounted.ORA-16649: possible failover to another database prevents this database frombeing opened
DGMGRL> start observerObserver started23:56:08.19 Saturday, March 18, 2017Initiating Fast-Start Failover to database "xiaohe"...Performing failover NOW, please wait...Failover succeeded, new primary is "xiaohe"23:56:11.64 Saturday, March 18, 201700:05:46.24 Sunday, March 19, 2017Initiating reinstatement for database "xiaohedg"...Reinstating database "xiaohedg", please wait...Operation requires shutdown of instance "xiaohedg" on database "xiaohedg"Shutting down instance "xiaohedg"...ORA-01109: database not openDatabase dismounted.ORACLE instance shut down.Operation requires startup of instance "xiaohedg" on database "xiaohedg"Starting instance "xiaohedg"...ORACLE instance started.Database mounted.Continuing to reinstate database "xiaohedg" ...Reinstatement of database "xiaohedg" succeeded00:06:42.78 Sunday, March 19, 2017
DataGuard开启failover的更多相关文章
- DataGuard开启延时应用的测试
DataGuard开启延时应用的测试 实验环境:RHEL 6.5 + Oracle 11.2.0.4 GI.DB + Primary RAC(2 nodes)+ Standby RAC(2 nodes ...
- Oracle Dataguard之failover
Oracle Dataguard中,角色转换包含两类:Switchover和Failover.上文<Oracle Dataguard之switchover>中,我们已经谈过了switcho ...
- 物理dataguard 正常切换 脚色转换,switchover_status 状态改变
正常切换切换前: 主库:SQL> select DATABASE_ROLE from v$database;DATABASE_ROLE----------------PRIMARY SQL> ...
- Redis Sentinel:集群Failover解决方案(转载)
本文转载自:http://shift-alt-ctrl.iteye.com/blog/1884370 文中的配置例子,还有failover过程中触发的订阅事件具有很好的参考价值. Redis sent ...
- Duplicate复制数据库并创建物理StandBy(spfile+不同实例名+不同路径)
过程和Duplicate复制数据库并创建物理StandBy类似,只是不需要重启数据库. 目的:创建standby,不重启源数据库 1设定环境如下: Primary数据库 IP 172.17.22.16 ...
- 基于Dubbo框架构建分布式服务(一)
Dubbo是Alibaba开源的分布式服务框架,我们可以非常容易地通过Dubbo来构建分布式服务,并根据自己实际业务应用场景来选择合适的集群容错模式,这个对于很多应用都是迫切希望的,只需要通过简单的配 ...
- redis 集群热备自动切换sentinel配置实战
---恢复内容开始--- Redis SentinelSentinel(哨兵)是用于监控redis集群中Master状态的工具,其已经被集成在redis2.4+的版本中一.Sentinel作用:1): ...
- redis高可用之REDIS SENTINEL
1. Redis主从配置 1.1. 设置主从复制 Master <= Salve 10.24.6.5:6379 <= 10.24.6.7:6379 1.2. 取消主从复制 1.3. ...
- 基于Dubbo框架构建分布式服务
Dubbo是Alibaba开源的分布式服务框架,我们可以非常容易地通过Dubbo来构建分布式服务,并根据自己实际业务应用场景来选择合适的集群容错模式,这个对于很多应用都是迫切希望的,只需要通过简单的配 ...
随机推荐
- springBoot配置activeMq点对点模式消费信息以及独占模式消费如何设置
1.在pom文件中引入对应jar包 <!--activeMQ start--> <dependency> <groupId>org.springframework. ...
- Vue实现静态数据分页
<div style="padding:20px;" id="app"> <div class="panel panel-prima ...
- 解决ionic 启动页面图片没有显示及启动页出现黑白屏
1.ionic 正确打包完app, 并且按照正常的步骤配置config.xml文件之后 ,启动页面还是不能正常的显示出来,而是黑了一下之后,就进入首页了 原因很有可能就是你没有装cordova-plu ...
- windows系统查询指定端口运行的进程并关闭
假如占用的端口是80: 先打开cmd命令窗口 再查找80端口占用的进程:netstat -aon|findstr "80" ,找到对应的程序的PID号: 根据PID号找到 ...
- ES6之模块化导入导出
1.概述 在js的历史上一直没有模块(module)体系,无法将一个大程序拆分成相互依赖的小文件,再用简单的方法拼装起来,这对开发大型的.复杂的项目形成了巨大障碍. 在 ES6 之前,社区制定了一些模 ...
- Delphi - StringReplace用法
StringReplace用法 在开发过程中,有时候我们需要对字符串进行替换操作,屏蔽或者和谐某些字符,可使用Delphi自带的函数StringReplace函数. 通过代码进行说明: //函数原型 ...
- Interger等包装类的比较
Integer a = 1; integer b = 1; integer c = 500; integer d=500; System.out.print(a==b); System.out.pri ...
- ECfinal-D-Ice Cream Tower-二分+贪心
传送门:https://vjudge.net/problem/Gym-101194D 题意:在一堆数中,找到对多的组合,使得每个组合的个数为K,且满足在排序后,后一个是前一个的两倍: 思路:二分,贪心 ...
- 牛客小白月赛 G 异或 找规律
链接:https://www.nowcoder.com/acm/contest/135/G来源:牛客网 题目描述 从前,Apojacsleam家的水族箱里,养了一群热带鱼. 在这几条热带鱼里,Apoj ...
- Python作业本——第3章 函数
今天看完了第三章,习题都是一些概念性的问题,就不一一解答了. 实践项目是创建一个Collatz序列,并且加上验证输入是不是一个整数. def collatz(number): if number % ...