ITPub博客

首页 > 数据库 > Oracle > DG Broker管理dataguard注意事项

DG Broker管理dataguard注意事项

原创 Oracle 作者:liupzmin 时间:2016-05-27 18:22:59 0 删除 编辑

    Once you start using the Broker you must always use the Broker to make any changes to your Data Guard configuration. This means that you must use Grid Control or the Broker CLI DGMGRL to change any Data Guard settings. If you use SQL*Plus to make configuration changes, the Broker will put things back the way it sees the world or this will lead to inconsistencies between the Broker configuration parameters and the database.

    一旦开始使用Broker,就必须一直使用它修改DG的配置,这意味着必须使用grid control或者dgmgrl修改DG的配置,如果使用sqlplus修改配置,broker会将配置改回原样,或者导致broker配置参数与数据库之间不一致


    此例记录修改保护模式,由最高可用降级为最大性能

    

  1. DGMGRL> show configuration;
  2. Configuration - minconf
  3. Protection Mode: MaxAvailability
  4. Databases:
  5. minstd - Primary database
  6. min - Physical standby database
  7. Fast-Start Failover: DISABLED
  8. Configuration Status:
  9. SUCCESS
  10. DGMGRL> EDIT DATABASE 'minstd' SET PROPERTY 'LogXptMode'='ASYNC';
  11. Property "LogXptMode" updated
  12. DGMGRL> EDIT DATABASE 'min' SET PROPERTY 'LogXptMode'='ASYNC';
  13. Error: ORA-16805: change of LogXptMode property violates overall protection mode
  14. Failed.
  15. DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MaxPerformance;
  16. Succeeded.
  17. DGMGRL> show configuration;
  18. Configuration - minconf
  19. Protection Mode: MaxPerformance
  20. Databases:
  21. minstd - Primary database
  22. min - Physical standby database
  23. Fast-Start Failover: DISABLED
  24. Configuration Status:
  25. SUCCESS

使用broker修改会使LOG_ARCHIVE_DEST_2参数变得较为复杂,例如

service="minstd", LGWR SYNC AFFIRM delay=0 optional compression=disable max_failure=0 max_connections=1 reopen=300 db_unique_name="minstd" net_timeout=30, valid_for=(all_logfiles,primary_role)

而且修改后在sqlplus中show parameter LOG_ARCHIVE_DEST_2仅有主库显示更改之后的状态,而备库还保留原样,但是在show database verbose中是修改好的,仅当在发生切换时,备库变为主库时才会更正参数,可见最好使用broker来管理配置

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

请登录后发表评论 登录
全部评论

注册时间:2014-05-17

  • 博文量
    29
  • 访问量
    106637