真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

oracle11gdgbroker開啟fast-startfailover自動故障切換

一.首先保證主從數(shù)據(jù)庫的閃回數(shù)據(jù)庫功能以及強(qiáng)制歸檔都打開,如下保證都為yes
SQL> select flashback_on,force_logging from v$database;
FLASHBACK_ON       FOR
------------------ ---
NO                NO
1.1開啟閃回數(shù)據(jù)庫
SQL> ALTER SYSTEM SET db_recovery_file_dest_size=3g SCOPE=BOTH;
System altered.
SQL> alter system set  db_recovery_file_dest='/data/u01/app/oracle/fast_recovery_area';
System altered.
SQL> alter database flashback on;
Database altered.
1.2開啟強(qiáng)制歸檔
SQL>  alter database force logging;
Database altered.
SQL> select flashback_on,force_logging from v$database;
FLASHBACK_ON       FOR
------------------ ---
YES                YES

二:開啟fast-start failover
2.1:開啟 fast-start failover
[oracle@beijing-fuli-hadoop-02 ~]$ dgmgrl  sys/ oracle@db2
DGMGRL for Linux: Version 11.2.0.4.0 - 64bit Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
Connected.
DGMGRL>  enable fast_start failover;
Enabled.
2.2.查看配置狀態(tài),發(fā)現(xiàn)警告,因?yàn)闆]有啟動observer而告警!
DGMGRL> show configuration
Configuration - dbha_c
Protection Mode: MaxPerformance
Databases:
db2 - Primary database
Warning: ORA-16819: fast-start failover observer not started
db1 - (*) Physical standby database
Warning: ORA-16819: fast-start failover observer not started
Fast-Start Failover: ENABLED
Configuration Status:
WARNING
2.3開啟 啟動觀察器(observer):
DGMGRL> show configuration
Configuration - dbha_c
Protection Mode: MaxPerformance
Databases:
db2 - Primary database
db1 - (*) Physical standby database
Fast-Start Failover: ENABLED
Configuration Status:
SUCCESS
由于observer的啟動會一直占用session 窗口的,所以建議寫成腳本掛后臺
這里我們在備庫上創(chuàng)建腳本,具體如下
創(chuàng)建一個名叫observer.sql的腳本,把下面的命令放進(jìn)去,然后執(zhí)行該腳本即可。
nohup dgmgrl  sys/oracle@db2 "start observer">>observer.log 2>&1 &
三:驗(yàn)證自動切換:
db2主庫:
SQL> select  DATABASE_ROLE,OPEN_MODE from  v$database;

DATABASE_ROLE    OPEN_MODE
---------------- --------------------
PRIMARY          READ WRITE
db1為standby
SQL> select  DATABASE_ROLE,OPEN_MODE from  v$database;
DATABASE_ROLE    OPEN_MODE
---------------- --------------------
PHYSICAL STANDBY READ ONLY WITH APPLY
db2主庫模擬異常關(guān)閉
SQL> shu abort
ORACLE instance shut down.
再次查看db1的狀態(tài):
SQL> select  DATABASE_ROLE,OPEN_MODE from  v$database;
DATABASE_ROLE    OPEN_MODE
---------------- --------------------
PRIMARY          READ WRITE

本文題目:oracle11gdgbroker開啟fast-startfailover自動故障切換
鏈接地址:http://weahome.cn/article/ihjehd.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部