sitemap

RSS地图

收藏本站

设为首页

Oracle研究中心

当前位置:Oracle研究中心 > 产品DBA > Oracle DG >

学习笔记:Oracle DG系统 Logical Standby Database Data Guard s

时间:2016-05-15 23:32   来源:Oracle研究中心   作者:惜分飞   点击:

天萃荷净

总结常用的Oracle Data Guard switchover切换命令(Logical Standby Database)

1)Verify it is possible to perform a switchover on the primary database.
SELECT SWITCHOVER_STATUS FROM V$DATABASE;–TO STANDBY/SESSIONS ACTIVE

2)Prepare the current primary database for the switchover
ALTER DATABASE PREPARE TO SWITCHOVER TO LOGICAL STANDBY;–PREPARING SWITCHOVER
ALTER DATABASE PREPARE TO SWITCHOVER CANCEL;–cancel(终止操作)

3)Prepare the target logical standby database for the switchover
ALTER DATABASE PREPARE TO SWITCHOVER TO PRIMARY;
–PREPARING DICTIONARY–>PREPARING SWITCHOVER
ALTER DATABASE PREPARE TO SWITCHOVER CANCEL;–cancel(终止操作)

4)Ensure the current primary database is ready for the future primary
database’s redo stream

SELECT SWITCHOVER_STATUS FROM V$DATABASE;–TO LOGICAL STANDBY

5)Switch the primary database to the logical standby database role
ALTER DATABASE COMMIT TO SWITCHOVER TO LOGICAL STANDBY;

6)Ensure all available redo has been applied to the target logical standby
database that is about to become the new primary database

SELECT SWITCHOVER_STATUS FROM V$DATABASE;–TO PRIMARY

7)Switch the target logical standby database to the primary database role
ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;

8)Start SQL Apply on the new logical standby database
ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;
 

-----------------温馨提示--------------------
操作有风险,动手需谨慎
Oracle研究中心
http://www.oracleplus.net
本文由大师惜分飞原创分享,转载请尽量保留本站网址

--------------------------------------ORACLE-DBA----------------------------------------

最权威、专业的Oracle案例资源汇总之学习笔记:Oracle DG系统 Logical Standby Database Data Guard s

本文由大师惜分飞原创分享,网址:http://www.oracleplus.net/arch/188.html

Oracle研究中心

关键词:

Oracle DG系统

Logical Standby Database主备切换过程

Data Guard switchover切换步骤

Oracle dg主备库如何切换