[20140422]使用dgmgrl管理dataguard(11)

[20140422]使用dgmgrl管理dataguard(11).txt

参考链接:
http://blog.itpub.net/267265/viewspace-1142649/
http://blog.itpub.net/267265/viewspace-1143027/
http://blog.itpub.net/267265/viewspace-1143058/
http://blog.itpub.net/267265/viewspace-1143126/
http://blog.itpub.net/267265/viewspace-1143480/
http://blog.itpub.net/267265/viewspace-1144742/
http://blog.itpub.net/267265/viewspace-1145573/
http://blog.itpub.net/267265/viewspace-1145697/
http://blog.itpub.net/267265/viewspace-1145727/
http://blog.itpub.net/267265/viewspace-1146558/

-- 我的测试环境:primary的tnsnames别名test,standby主机的tnsnames别名testdg。数据库版本:
-- 前面的测试要设置在MaxAvailability模式,LogXptMode='SYNC',按照文档的介绍在MaxPerformance也可以,再做一个测试看看.

DGMGRL> show configuration
Configuration - study
  Protection Mode: MaxAvailability
  Databases:
    test   - Primary database
    testdg - (*) Physical standby database
Fast-Start Failover: ENABLED
Configuration Status:
SUCCESS

DGMGRL> disable  FAST_START FAILOVER
Disabled.

DGMGRL> edit configuration  SET PROTECTION MODE AS MaxPerformance;
Succeeded.
--修改为MaxPerformance mode.

DGMGRL> enable fast_start failover
Error: ORA-16651: requirements not met for enabling fast-start failover

Failed.

$ oerr ora 16651
16651, 0000, "requirements not met for enabling fast-start failover"
// *Cause:  The attempt to enable fast-start failover could not be completed
//          because one or more requirements were not met:
//          - The Data Guard configuration must be in either MaxAvailability
//            or MaxPerformance protection mode.
//          - The LogXptMode property for both the primary database and
//            the fast-start failover target standby database must be
//            set to SYNC if the configuration protection mode is set to
//            MaxAvailability mode.
//          - The LogXptMode property for both the primary database and
//            the fast-start failover target standby database must be
//            set to ASYNC if the configuration protection mode is set to
//            MaxPerformance mode.
//          - The primary database and the fast-start failover target standby
//            database must both have flashback enabled.
//          - No valid target standby database was specified in the primary
//            database FastStartFailoverTarget property prior to the attempt
//            to enable fast-start failover, and more than one standby
//            database exists in the Data Guard configuration.
// *Action: Retry the command after correcting the issue:
//          - Set the Data Guard configuration to either MaxAvailability
//            or MaxPerformance protection mode.
//          - Ensure that the LogXptMode property for both the primary
//            database and the fast-start failover target standby database
//            are set to SYNC if the configuration protection mode is set to
//            MaxAvailability.
//          - Ensure that the LogXptMode property for both the primary
//            database and the fast-start failover target standby database
//            are set to ASYNC if the configuration protection mode is set to
//            MaxPerformance.
//          - Ensure that both the primary database and the fast-start failover
//            target standby database have flashback enabled.
//          - Set the primary database FastStartFailoverTarget property to
//            the DB_UNIQUE_NAME value of the desired target standby database
//            and the desired target standby database FastStartFailoverTarget
//            property to the DB_UNIQUE_NAME value of the primary database.

--MaxPerformance mode下,设置LogXptMode必须是ASYNC,why? 搞不懂为什么要这样?

DGMGRL> show database test LogXptMode
  LogXptMode = 'SYNC'
DGMGRL> show database testdg LogXptMode
  LogXptMode = 'SYNC'

DGMGRL> edit database test set PROPERTY LogXptMode='ASYNC';
Property "logxptmode" updated
DGMGRL> edit database testdg set PROPERTY LogXptMode='ASYNC';
Property "logxptmode" updated

DGMGRL> show database verbose test FastStartFailoverTarget ;
  FastStartFailoverTarget = 'testdg'
DGMGRL> show database verbose testdg FastStartFailoverTarget ;
  FastStartFailoverTarget = 'test'

DGMGRL> enable fast_start failover
Enabled.

DGMGRL> show configuration
Configuration - study
  Protection Mode: MaxPerformance
  Databases:
    test   - Primary database
    testdg - (*) Physical standby database
Fast-Start Failover: ENABLED
Configuration Status:
SUCCESS

--OK,FSFO配置成功.

查看Observer的信息.

09:10:37.19  Tuesday, April 22, 2014
Initiating Fast-Start Failover to database "testdg"...
Performing failover NOW, please wait...
Failover succeeded, new primary is "testdg"
09:10:47.89  Tuesday, April 22, 2014

SYS@testdg> select database_role,open_mode,protection_mode,force_logging,FLASHBACK_ON from v$database;

DATABASE_ROLE    OPEN_MODE            PROTECTION_MODE      FOR FLASHBACK_ON
---------------- -------------------- -------------------- --- ------------------
PRIMARY          READ WRITE           MAXIMUM PERFORMANCE  YES YES

SYS@testdg> select * from scott.dept1 where deptno=60;
    DEPTNO DNAME          LOC
---------- -------------- -------------
        60 MMMM           DDDDDD

DGMGRL> show configuration

Configuration - study

  Protection Mode: MaxPerformance
  Databases:
    testdg - Primary database
      Warning: ORA-16829: fast-start failover configuration is lagging

    test   - (*) Physical standby database (disabled)
      ORA-16661: the standby database needs to be reinstated


--重新启动reinstated后,一切正常.

Fast-Start Failover: ENABLED

Configuration Status:
WARNING

DGMGRL> show configuration

Configuration - study

  Protection Mode: MaxPerformance
  Databases:
    testdg - Primary database
    test   - (*) Physical standby database

Fast-Start Failover: ENABLED

Configuration Status:
SUCCESS

DGMGRL> switchover to test;
Performing switchover NOW, please wait...
New primary database "test" is opening...
Operation requires shutdown of instance "testdg" on database "testdg"
Shutting down instance "testdg"...
ORACLE instance shut down.
Operation requires startup of instance "testdg" on database "testdg"
Starting instance "testdg"...
ORACLE instance started.
Database mounted.
Database opened.
Switchover succeeded, new primary is "test"
DGMGRL> show configuration

Configuration - study

  Protection Mode: MaxPerformance
  Databases:
    test   - Primary database
    testdg - (*) Physical standby database

Fast-Start Failover: ENABLED

Configuration Status:
SUCCESS

总结:
不知道为什么MaxPerformance mode下,设置LogXptMode必须是ASYNC,才能使用FSFO.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/267265/viewspace-1146575/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/267265/viewspace-1146575/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值