Oracle dataguard  failover 实战

操作步骤

备库:

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH FORCE;

SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;

SQL> SHUTDOWN IMMEDIATE;

SQL> STARTUP;

添加临时文件,删除老的临时文件

附表

具体操作和alert日志如下:

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH FORCE;

Database altered.

备库alert

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH FORCE

Tue Apr  9 10:55:24 2013

Terminal Recovery: request posted (orcl) ---备库实例

Tue Apr  9 10:55:27 2013

Terminal Recovery timestamp is '04/09/2013 10:55:27'  ---恢复时间戳

Terminal Recovery: applying standby redo logs.

Terminal Recovery: thread 1 seq# 29879 redo required

Terminal Recovery:  /opt/oracle/oradata/research/redo04.log ---standby redo log

Identified End-Of-Redo for thread 1 sequence 29879

Tue Apr  9 10:55:28 2013

Incomplete recovery applied all redo ever generated.

Recovery completed through change 1900634393

Tue Apr  9 10:55:28 2013

MRP0: Media Recovery Complete (orcl)

Terminal Recovery: successful completion

Begin: Standby Redo Logfile archival

End: Standby Redo Logfile archival

Resetting standby activation ID 2055592130 (0x7a85d8c2)

Tue Apr  9 10:55:32 2013

Waiting for MRP0 pid 1241 to terminate

Waiting for MRP0 pid 1241 to terminate

Waiting for MRP0 pid 1241 to terminate

Tue Apr  9 10:55:34 2013

MRP0: Background Media Recovery process shutdown (orcl)

Tue Apr  9 10:55:35 2013

Terminal Recovery: completion detected (orcl)

Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH FORCE

主库alert

ARC0: Attempting destination LOG_ARCHIVE_DEST_2 network reconnect (3113)

ARC0: Destination LOG_ARCHIVE_DEST_2 network reconnect abandoned

PING[ARC0]: Error 3113 when pinging standby orcl.

Tue Apr  9 10:36:23 2013

Errors in file /opt/oracle/admin/research/bdump/research_lns1_8489.trc:

ORA-03113: end-of-file on communication channel

Tue Apr  9 10:36:23 2013

LGWR: I/O error 3113 archiving log 1 to 'orcl'

主库

SQL> alter system set log_archive_dest_state_2='defer';

System altered

备库

SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;

Database altered.

ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY

Tue Apr  9 11:08:41 2013

ALTER DATABASE SWITCHOVER TO PRIMARY (orcl) ---orcl实例成为PRIMARY

Tue Apr  9 11:08:41 2013

If media recovery active, switchover will wait 900 seconds

Standby terminal recovery start SCN: 1900632860

SwitchOver after complete recovery through change 1900634393

Tue Apr  9 11:08:41 2013

Errors in file /opt/oracle/admin/research/udump/orcl_ora_4506.trc:

ORA-00313: open failed for members of log group 1 of thread 1

ORA-00312: online log 1 thread 1: '/opt/oracle/oradata/research/redo01.log'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

Tue Apr  9 11:08:42 2013

Errors in file /opt/oracle/admin/research/udump/orcl_ora_4506.trc:

ORA-00313: open failed for members of log group 2 of thread 1

ORA-00312: online log 2 thread 1: '/opt/oracle/oradata/research/redo02.log'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

Tue Apr  9 11:08:43 2013

Errors in file /opt/oracle/admin/research/udump/orcl_ora_4506.trc:

ORA-00313: open failed for members of log group 3 of thread 1

ORA-00312: online log 3 thread 1: '/opt/oracle/oradata/research/redo03.log'

ORA-27037: unable to obtain file status

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3

Standby became primary SCN: 1900632859

Tue Apr  9 11:08:44 2013

Switchover: Complete - Database shutdown required (orcl)

Completed: ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY

Tue Apr  9 11:09:12 2013

ARC1: Archival disabled due to instance shutdown

Shutting down archive processes

Archiving is disabled

Tue Apr  9 11:09:22 2013

ARCH shutting down

ARC0: Archival stopped

Tue Apr  9 11:09:27 2013

ARCH shutting down

ARC1: Archival stopped

SQL> shutdown immediate;

ORA-01507: database not mounted

ORACLE instance shut down.

Tue Apr  9 11:10:33 2013

Shutting down instance: further logons disabled

Tue Apr  9 11:10:33 2013

Stopping background process MMNL

Tue Apr  9 11:10:33 2013

Stopping background process MMON

Tue Apr  9 11:10:34 2013

Shutting down instance (immediate)

License high water mark = 10

Waiting for dispatcher 'D000' to shutdown

All dispatchers and shared servers shutdown

Tue Apr  9 11:10:36 2013

ALTER DATABASE CLOSE NORMAL

ORA-1507 signalled during: ALTER DATABASE CLOSE NORMAL...

ARCH: Archival disabled due to shutdown: 1089

Shutting down archive processes

Archiving is disabled

Archive process shutdown avoided: 0 active

ARCH: Archival disabled due to shutdown: 1089

Shutting down archive processes

Archiving is disabled

Archive process shutdown avoided: 0 active

SQL> startup

ORACLE instance started.

Total System Global Area 2147483648 bytes

Fixed Size                  2022144 bytes

Variable Size            1526727936 bytes

Database Buffers          603979776 bytes

Redo Buffers               14753792 bytes

Database mounted.

Database opened.

备库添加临时文件,删除老的临时文件

alter tablespace temp add tempfile xxxxx size 1G autoextend on maxsize 10G;

alter tablespace doudou add tempfile xxxbb size 1G autoextend on maxsize 10G;

shutdown immediate;

startup;

alter database tempfile '/xxxx/temp01.dbf' drop including datafiles;

alter database tempfile '/xxxx/doudou01.dbf' drop including datafiles;

come from: http://blog.itpub.net/26442936/viewspace-758030/

Oracle dataguard failover 实战的更多相关文章

  1. 4.2 Oracle Dataguard failover 操作步骤

    在11g里面,Oracle认为最理想的情况是,虽然Oracle数据库不能打开,但是可以启动到 mount状态.Mount状态之所以重要,就在于如果可以到这个阶段,控制文件control_file就可以 ...

  2. Oracle Dataguard之failover

    Oracle Dataguard中,角色转换包含两类:Switchover和Failover.上文<Oracle Dataguard之switchover>中,我们已经谈过了switcho ...

  3. Oracle Dataguard故障转移(failover)操作

    注意:故障转移会破坏DG的主从关系,使其变为互不相关的2个数据库,谨慎使用. (一)故障转移操作流程图 (二)故障转移操作流程 备注:以下操作步骤与上面流程图步骤一一对应 STEP1:刷新所有未发送到 ...

  4. Oracle DataGuard故障转移(failover)后使用RMAN还原失败的主库

    (一)DG故障转移后切换为备库的方法 在DG执行故障转移之后,主库与从库的关系就被破坏了.这个时候如果要恢复主从关系,可以使用下面的3种方法: 将失败的主库重新搭建为备库,该方法比较耗时: 使用数据库 ...

  5. oracle dataguard主从切换

    前言: 众所周知DataGuard一般的切换分成两种,一种是系统正常的情况下的切换这种方式为:switchover是无损切换,不会丢失数据:另外一种方式属于灾难情况下的切换,这种情况下一般主库已经启动 ...

  6. Oracle Dataguard之switchover

    Oracle Dataguard的角色转换包含两类:Switchover和Failover.Switchover指主备之间角色转换,主库降为备库,备库升级为主库.而failover则是指主库出现问题时 ...

  7. Oracle dataguard 正常切换和应急切换

    oracle dataguard提供异地容灾方案,能有效的防止单点故障和提供高可用技术,这里介绍dataguard正常主备切换和应急切换(应急切换模拟主库出现问题无法还原,备库脱离dataguard接 ...

  8. Oracle Dataguard之Real-Time Apply

    Oracle Dataguard一共支持三种模式:最大可用模式(Maximum Availability),最大性能模式(Maximum Performance),最大保护模式(Maximum Pro ...

  9. Oracle Dataguard之物理standby的基本配置

    尽管网上有很多Oracle Dataguard的配置教程,但不难发现,很多采用的是rman duplicate这种方法,尽管此种方法较为简便.但在某种程度上,却也误导了初学者,虽说也能配置成功,但只知 ...

随机推荐

  1. Pycharm中pygame报错

    什么鬼???我记得刚安装过啊-.. 并且本机只有一个python3.5,环境变量之前都是正常,我去折腾了大半天,原来在pycharm中安装模块是在如下所示图中 以后如果没有安装模块,都可以在这里进行安 ...

  2. JSP九大内置对象的作用和用法总结【转】

    JSP九大内置对象的作用和用法总结?     JSP中一共预先定义了9个这样的对象,分别为:request.response.session.application.out.pagecontext.c ...

  3. 可能是最漂亮的Spring事务管理详解 专题

    微信阅读地址链接:可能是最漂亮的Spring事务管理详解 事务概念回顾 什么是事务? 事务是逻辑上的一组操作,要么都执行,要么都不执行. 事物的特性(ACID): 原子性: 事务是最小的执行单位,不允 ...

  4. HttpServletResponse 的状态码

    public static final int  SC_ACCEPTED  202 public static final int  SC_BAD_GATEWAY  502 public static ...

  5. Android(java)学习笔记169:服务(service)之为什么使用服务

    1.服务 service 长期在后台运行的进程,一般没有应用程序界面   2.进程线程和应用程序之间的关系 应用程序开启,系统启动一个Linux进程,所有的组件都是运行在同一个进程的同一个线程(mai ...

  6. mybatis+oracle 完成插入数据库,并将主键返回的注意事项

    mybatis+oracle 完成插入数据库,并将主键返回的注意事项一条插入语句就踩了不少的坑,首先我的建表语句是: create table t_openapi_batch_info( BATCH_ ...

  7. Mybatis(一)入门

    mybatis使用的三个部分数据查询主体 : SqlSession查询映射层 : Mapper接口数据维护层 : Bean 设计一.添加maven依赖<!-- mybatis依赖 -->& ...

  8. 前端什么是BFC

    什么是BFC? 全称块级格式化上下文?什么意思不懂.看了好多博客,基本都是抄的,真心都不是大白话.我今天来总结一下,用菜鸟级别的语言来描述. BFC 应该可以抽象成一个 独立的个体,出淤泥而不染的白莲 ...

  9. 骑芯供应链(T 面试)

    1.目前市面上主流的团队开发模式是什么? 正解:DevOps,https://blog.csdn.net/bntX2jSQfEHy7/article/details/79168865 2.你觉得什么是 ...

  10. zabbix利用微信报警

    一.背景介绍 报警的方式有很多种,比如常用的邮件报警,短信,微信等.那这篇文章主要是实现微信报警. 值得注意的是,之前使用微信企业公众号,现在微信企业公众号更新成企业微信了.所以直接注册企业微信,进入 ...