网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

DGbroker的配置和使用

配置方法
1、主备都在静态监听里新增DG broker的配置
主库为
(SID_DESC=
      (GLOBAL_DBNAME=PROD_DGMGRL)
      (ORACLE_HOME=/db/oracle/product/11.2.0/db_1/)
      (SID_NAME=PROD)
    )

备库为
(SID_DESC=
      (GLOBAL_DBNAME=PROD_STD_DGMGRL)
      (ORACLE_HOME=/mnt/sdb1/u01/app/oracle/product/11.2.0.4/db)
      (SID_NAME=PROD_STD)
    )

2、主备都设置参数
SQL> alter system set dg_broker_start=true;


使用方法
主备都可以执行
dgmgrl
DGMGRL> connect sys/123456
DGMGRL> connect sys/123456@tnsname
DGMGRL> help

DGMGRL> help show
Displays information about a configuration, database, or instance
Syntax:
  SHOW CONFIGURATION [VERBOSE];
  SHOW DATABASE [VERBOSE] [];
  SHOW INSTANCE [VERBOSE] []
    [ON DATABASE ];
  SHOW FAST_START FAILOVER;

DGMGRL> help create
Creates a broker configuration
Syntax:
  CREATE CONFIGURATION AS
    PRIMARY DATABASE IS
    CONNECT IDENTIFIER IS ;

DGMGRL> help add
Adds a standby database to the broker configuration
Syntax:
  ADD DATABASE
    [AS CONNECT IDENTIFIER IS ]
    [MAINTAINED AS {PHYSICAL|LOGICAL}];

DGMGRL> help switchover
Switches roles between a primary and standby database
Syntax:
  SWITCHOVER TO ;

以上database name其实为db_unique_name,connect identifier表示tnsname


DGMGRL> SHOW CONFIGURATION;
ORA-16532: Data Guard broker configuration does not exist
Configuration details cannot be determined by DGMGRL

DGMGRL> CREATE CONFIGURATION DG1 AS  PRIMARY DATABASE IS PROD2 CONNECT IDENTIFIER IS PROD2;
Configuration "dg1" created with primary database "prod2"

DGMGRL> ADD DATABASE PROD2_STD AS CONNECT IDENTIFIER IS PROD2_STD MAINTAINED AS PHYSICAL;
Database "prod2_std" added

DGMGRL> SHOW CONFIGURATION;
Configuration - dg1
  Protection Mode: MaxPerformance
  Databases:
    prod2     - Primary database
    prod2_std - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
DISABLED

DGMGRL> enable CONFIGURATION;
Enabled.
一旦enable configuration,那么主库的log_archive_dest_2就有值了




DGMGRL> show CONFIGURATION VERBOSE;
Configuration - dg1
  Protection Mode: MaxPerformance
  Databases:
    prod2     - Primary database
    prod2_std - Physical standby database
  Properties:
    FastStartFailoverThreshold      = '30'
    OperationTimeout                = '30'
    FastStartFailoverLagLimit       = '30'
    CommunicationTimeout            = '180'
    ObserverReconnect               = '0'
    FastStartFailoverAutoReinstate  = 'TRUE'
    FastStartFailoverPmyShutdown    = 'TRUE'
    BystandersFollowRoleChange      = 'ALL'
    ObserverOverride                = 'FALSE'
    ExternalDestination1            = ''
    ExternalDestination2            = ''
    PrimaryLostWriteAction          = 'CONTINUE'
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS

本文题目:DGbroker的配置和使用
文章起源:http://bjjierui.cn/article/igocso.html

其他资讯