1.停止Standby
select process, status from v$managed_standby; --查看备库是否在应用日志进行恢复
alter database recover managed standby database cancel;
shutdown immediate;
 
2.切换到只读模式
-----由shutdown模式切换到只读模式-------
startup nomount;
alter database mount standby database;
alter database open read only;
-----由应用日志模式切换到只读模式-------

alter database recover managed standby database cancel;
-- 取消日志应用
alter database open read only;

 
3.切换回管理恢复模式
startup nomount;
alter database mount standby database;
alter database recover managed standby database disconnect from session;
-- 启动日志应用
alter database recover managed standby database using current logfile disconnect from session;
 
4.主库和备库之间角色切换
4.1 主库切换为备库
alter database commit to switchover to physical standby;
alter database commit to switchover to physical standby with session shutdown;-- 主库有会话连接的时候
shutdown immediate
startup nomount;
alter database mount standby database;
alter database recover managed standby database disconnect from session;
 
4.2 从库切换为主库
alter database commit to switchover to primary;
shutdown immediate;
startup
alter system switch logfile;
 
5.备库自动使用主库传过来的日志进行恢复
alter database recover automatic standby database;
 
6.更改保护模式
alter database set standby database to maximize protection;
alter database set standby database to maximize availability;
alter database set standby database to maximize performancen;
 
7.取消自动恢复模式
alter database recover managed standby database cancel;
alter database recover managed standby database finish;
alter database recover managed standby database finish force;

物理standby database的日常维护的更多相关文章

  1. 物理Data Guard的日常维护

    关闭顺序 1. 首先关闭primary数据库 [oracle@Master admin]$ sqlplus / as sysdba SQL> shutdown immediate 2. 关闭st ...

  2. 使用RMAN DUPLICATE...FROM ACTIVE DATABASE创建物理standby database

    Applies to: Oracle Server - Enterprise Edition - Version 11.1.0.6 to 11.2.0.4 [Release 11.1 to 11.2] ...

  3. Oracle DataGuard 物理Standby 搭建(上)

    物理standby database 环境搭建 Arch asysnc Oracle Dataguard host IP Oracle_sid DB_unique_name FAL_server FA ...

  4. Physical Standby Database Failover

    1.物理standby failover 切换 故障转移时在一些糟糕的事情发生时执行的计划外事件,需要将生产库移动到DR站点.有意思的是,这时候人们通常忙来忙去,试图弄明白发生了什么,需要做些什么才能 ...

  5. ORACLE11g Dataguard物理Standby 日常巡检操作手册

    ORACLE11g Dataguard物理Standby日常巡检操作手册 编写:_____________校对:_____________日期:_____________ 目录1.DG环境的日常巡检 ...

  6. Flashing Back a Failed Primary Database into a Physical Standby Database(闪回FAILOVER失败的物理备库)

    文档操作依据来自官方网址:https://docs.oracle.com/cd/E11882_01/server.112/e41134/scenarios.htm#SBYDB4888 闪回FAILOV ...

  7. ORACLE 11gR2 DG(Physical Standby)日常维护01

    环境:RHEL 6.4 + Oracle 11.2.0.4 一.主备手工切换 1.1 主库,切换成备库并启动到mount 1.2 备库,切换成主库并启动到open 1.3 新的备库启动日志应用 二.重 ...

  8. ORACLE 11gR2 DG(Physical Standby)日常维护02

    环境:RHEL 6.5 + Oracle 11.2.0.4 三.监控DG的状态 3.1监控DG备库的状态 3.2监控主库传输日志链路的状态 四.备库切换为snapshot standby 4.1备库切 ...

  9. 程序员必备:Oracle日常维护命令

        上一篇讲了Linux的日常维护命令,这篇讲讲Oracle的日常维护命令.工作中需要使用Oracle数据库的童鞋们,相信或多或少都需要对Oracle做一些基本的维护操作,例如导入导出总该有吧?( ...

随机推荐

  1. oracle的学习笔记(转)

    Oracle的介绍 1. Oracle的创始人----拉里•埃里森 2. oracle的安装 [连接Oracle步骤](](https://img2018.cnblogs.com/blog/12245 ...

  2. SVN问题之——org.apache.subversion.javahl.ClientException: Attempted to lock an already-locked dir(网摘文)

    一.问题描述 今天在 Eclipse 中用 SVN 插件提交代码时遇到 org.apache.subversion.javahl.ClientException: Attempted to lock ...

  3. 杭电acm习题分类

    专注于C语言编程 C Programming Practice Problems (Programming Challenges) 杭电ACM题目分类 基础题:1000.1001.1004.1005. ...

  4. Codeforces787D(SummerTrainingDay06-D 线段树+最短路)

    D. Legacy time limit per test:2 seconds memory limit per test:256 megabytes input:standard input out ...

  5. win7游戏窗口设置

    在开始搜索框输入regedit打开注册表,定位到HKEY_LOCAL_MACHINE------SYSTEM------ControlSet001-------Control-------Graphi ...

  6. H5添加禁止缩放功能

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scal ...

  7. 排序算法(5)--Selection Sorting--选择排序[2]--Heap Sort--堆排序

    1.基本思想 具有n个元素的序列 (h1,h2,...,hn),当且仅当满足(hi>=h2i,hi>=2i+1)或(hi<=h2i,hi<=2i+1) (i=1,2,...,n ...

  8. 洛谷P4054 [JSOI2009]计数问题(二维树状数组)

    题意 题目链接 Sol 很傻x的题.. c才100, n, m才300,直接开100个二维树状数组就做完了.. #include<bits/stdc++.h> using namespac ...

  9. 08:Vigenère密码

    08:Vigenère密码 查看 提交 统计 提问 总时间限制:  1000ms 内存限制:  65536kB 描述 16世纪法国外交家Blaise de Vigenère设计了一种多表密码加密算法— ...

  10. 【代码笔记】iOS-自定义alertView

    一,效果图. 二,代码. ViewController.h #import <UIKit/UIKit.h> @interface ViewController : UIViewContro ...