oracle11g的adg需要付费嘛,oracle11g ADG主备切换

oracle11g ADG主备切换

1、主库

SQL> select name,open_mode,switchover_status from v$database;

NAME OPEN_MODE SWITCHOVER_STATUS

--------- -------------------- --------------------

PROD1 READ WRITE TO STANDBY

SQL> alter system switch logfile;

System altered.

SQL> alter system archive log current;

System altered.

SQL> alter database commit to switchover to physical standby with session shutdown;

Database altered.

SQL> shutdown abort

ORACLE instance shut down.

SQL> startup mount

ORACLE instance started.

Total System Global Area 849530880 bytes

Fixed Size 1348244 bytes

Variable Size 511708524 bytes

Database Buffers 331350016 bytes

Redo Buffers 5124096 bytes

Database mounted.

SQL> select switchover_status from v$database;

SWITCHOVER_STATUS

--------------------

RECOVERY NEEDED

SQL> alter database open;

Database altered.

SQL> select switchover_status from v$database;

SWITCHOVER_STATUS

--------------------

TO PRIMARY

2、备库

SQL> alter database commit to switchover to primary with session shutdown;

Database altered.

SQL> alter database open;

Database altered.

SQL> select name,switchover_status from v$database;

NAME OPEN_MODE SWITCHOVER_STATUS

--------- -------------------- --------------------

PROD1 READ WRITE TO STANDBY

3、新备库(原主库)启用实时日志应用

SQL> alter database recover managed standby database using current logfile disconnect from session;

Database altered.

SQL> select name,switchover_status from v$database;

NAME OPEN_MODE SWITCHOVER_STATUS

--------- -------------------- --------------------

PROD1 READ ONLY WITH APPLY NOT ALLOWED

参考链接:

https://blog.csdn.net/kadwf123/article/details/83092607

http://blog.chinaunix.net/uid-26313110-id-5748048.html

  • 0
    点赞
  • 0
    评论
  • 1
    收藏
  • 一键三连
    一键三连
  • 扫一扫,分享海报

表情包
插入表情
评论将由博主筛选后显示,对所有人可见 | 还能输入1000个字符
©️2021 CSDN 皮肤主题: 深蓝海洋 设计师:CSDN官方博客 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值