回滚Swtichover
从11.2.0.2开始,如果由于某种原因switchover没有成功,可以回滚switchover。
For physical standby databases in situations where an error occurred and it is not
possible to continue with the switchover, it might still be possible to revert the new
physical standby database back to the primary role by using the following steps. (This
functionality is available starting with Oracle Database 11 g Release 2 (11.2.0.2).)
1. Shut down and mount the new standby database (old primary).
2. Start Redo Apply on the new standby database.
3. Verify that the new standby database is ready to be switched back to the primary
role. Query the SWITCHOVER_STATUS column of the V$DATABASE view on the
new standby database. For example:
SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE;
SWITCHOVER_STATUS
—————–
TO_PRIMARY
1 row selected
A value of TO PRIMARY or SESSIONS ACTIVE indicates that the new standby
database is ready to be switched to the primary role. Continue to query this
column until the value returned is either TO PRIMARY or SESSIONS ACTIVE.
4. Issue the following statement to convert the new standby database back to the
primary role:
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITH SESSION SHUTDOWN;
If this statement is successful, the database will be running in the primary
database role, and you do not need to perform any more steps.
If this statement is unsuccessful, then continue with Step 5.
一般来说执行到这个步骤,基本就OK了。此时primary database是mount状态,启动到OPEN后,验证同步OK,可以正常工作。
5. When the switchover to change the role from primary to physical standby was
initiated, a trace file was written in the log directory. This trace file contains the
SQL statements required to re-create the original primary control file. Locate the
trace file and extract the SQL statements into a temporary file. Execute the
temporary file from SQL*Plus. This will revert the new standby database back to
the primary role.
6. Shut down the original physical standby database.
7. Create a new standby control file. This is necessary to resynchronize the primary
database and physical standby database. Copy the physical standby control file to
the original physical standby system. Section 3.2.2 describes how to create a
physical standby control file.
8. Restart the original phys ical standby instance.
If this procedure is successful and archive gap management is enabled, the FAL
processes will start and re-archive any missing archived redo log files to the
physical standby database. Force a log switch on the primary database and
examine the alert logs on both the primary database and physical standby
database to ensure the archived redo log file sequence numbers are correct.
See Section 6.4.3.1 for information about archive gap management and
Appendix F for information about locating the trace files.
9. Try the switchover again.
At this point, the Data Guard configuration has been rolled back to its initial state,
and you can try the switchover operation again (after correcting any problems that
might have led to the initial unsuccessful switchover).
回滚Swtichover的更多相关文章
- eclipse,myeclipse 误删文件,回滚历史文件操作
昨天因为误操作把一个写了一上午的代码给删了,找到的这个,以前竟然还没发现有这个功能- -! 具体操作: 1.建立同路径同名的文件 2.文件上右键 --> Compare With --> ...
- Log4net入门(回滚日志文件篇)
在上一篇Log4net(日志文件篇)中,我们使用"log4net.Appender.FileAppender"将日志信息输出到一个单一的文件中,随着应用程序的持续使用,该日志文件会 ...
- spring 事务回滚
1.遇到的问题 当我们一个方法里面有多个数据库保存操作的时候,中间的数据库操作发生的错误.伪代码如下: public method() { Dao1.save(Person1); Dao1.save( ...
- SqlServer批量刷数据执行事务回滚语句备份
企业进行对数据库执行刷数据工作,一段很长的语句希望同时成功或者失败时用到. 1.建立测试环境 /**************************************************** ...
- git用法之[回滚代码]
我们在写代码的任何过程中,都有可能出错,任何过程都有可能要!回!滚!代!码!事关重大!一定要详细讲讲. 一.关于 工作区.暂存区.本地分支: 工作区:即自己当前分支所修改的代码,git add xx ...
- springmvc+mybatis事务回滚
spring-mybatis.xml中 配置了 <!-- 拦截器方式配置事物 --> <tx:advice id="transactionAdvice" tran ...
- 【Java EE 学习 54】【OA项目第一天】【SSH事务管理不能回滚问题解决】【struts2流程回顾】
一.SSH整合之后事务问题和总结 1.引入问题:DAO层测试 假设将User对象设置为懒加载模式,在dao层使用load方法. 注意,注释不要放开. 使用如下的代码块进行测试: 会报错:no sess ...
- 【Java EE 学习 53】【Spring学习第五天】【Spring整合Hibernate】【Spring整合Hibernate、Struts2】【问题:整合hibernate之后事务不能回滚】
一.Spring整合Hibernate 1.如果一个DAO 类继承了HibernateDaoSupport,只需要在spring配置文件中注入SessionFactory就可以了:如果一个DAO类没有 ...
- 【Java EE 学习 52】【Spring学习第四天】【Spring与JDBC】【JdbcTemplate创建的三种方式】【Spring事务管理】【事务中使用dbutils则回滚失败!!!??】
一.JDBC编程特点 静态代码+动态变量=JDBC编程. 静态代码:比如所有的数据库连接池 都实现了DataSource接口,都实现了Connection接口. 动态变量:用户名.密码.连接的数据库. ...
随机推荐
- Eclipse - JAR包制作细节
Eclipse - JAR包制作细节 1.Jar包分为两种,一种是不可运行的,一种是可运行的Jar包,他们的主要区别如下: > 不可直接运行的Jar包主要是用于给别的程序提供调用 ...
- Angular之filter学习
过滤器(filter)正如其名,作用就是接收一个输入,通过某个规则进行处理,然后返回处理后的结果.主要用在数据的格式化上,例如获取一个数组中的子集,对数组中的元素进行排序等.ng内置了一些过滤器,它们 ...
- 使用AsyncTask实现图片加载
如上图所示:我们看到的就是使用PrograssDialog进度条和AsyncTask异步任务实现的效果(额,不要看应用名...).下面介绍一下具体的实现流程. 一.首先使用XML布局,布局很简单直接上 ...
- vs2010 中检测到有潜在危险的 Request.Form 值
解决方法 : 一般在网上搜只有以下两种处理方式: 1.在报错的页面前吧<%Page%>标签中增加validateRequest="false"的属性为false 如下所 ...
- win7系统64位plsql的设置
1. Instant Client Downloads for Microsoft Windows (32-bit) 我下载的是: instantclient-basic-win32-11.2.0.1 ...
- cocoapods导入第三方库
1.移除现有Ruby默认源 终端:gem sources --remove https://rubygems.org/ 2.使用新的源 终端:gem sources -a https://ruby.t ...
- JavaScript 原型链的一点想法
JavaScript借鉴了许多语言的特点:例如语法类Java.函数借鉴Scheme.原型继承借鉴自Self.正则表达式借鉴于Perl.(DC Javascript:语言精粹). 首先,每个J ...
- JSP总结2 配置开发环境和firstjsp
JDK的下载 JAVA_HOME ,CLASSPATH,PATH 的配置,根据安装路径. 然后java -version检测配置OK. 编写helloworld.java 放置在同JDK 盘里.j ...
- php中的短标签 太坑人了
今天配置了一个php页面去修改svn密码问题,结果调了半天,最后在Windows和 Linux的运行现象是不一样,运行结果更不一样了,关键是完全一模一样的代码. 最后发现是短标签引起的,Windows ...
- servlet 之 返回json数据并显示
//实体类import java.util.ArrayList; public class ObjectType { private String type; private ArrayList< ...