配置方法1、主備都在靜態(tài)監(jiān)聽里新增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、主備都設(shè)置參數(shù)
SQL> alter system set dg_broker_start=true;
使用方法主備都可以執(zhí)行
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] <database name> [<property name>];
SHOW INSTANCE [VERBOSE] <instance name> [<property name>]
[ON DATABASE <database name>];
SHOW FAST_START FAILOVER;
DGMGRL> help create
Creates a broker configuration
Syntax:
CREATE CONFIGURATION <configuration name> AS
PRIMARY DATABASE IS <database name>
CONNECT IDENTIFIER IS <connect identifier>;
DGMGRL> help add
Adds a standby database to the broker configuration
Syntax:
ADD DATABASE <database name>
[AS CONNECT IDENTIFIER IS <connect identifier>]
[MAINTAINED AS {PHYSICAL|LOGICAL}];
DGMGRL> help switchover
Switches roles between a primary and standby database
Syntax:
SWITCHOVER TO <standby database name>;
以上database name其實(shí)為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的配置和使用
當(dāng)前路徑:http://jinyejixie.com/article30/igocso.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站營銷、外貿(mào)建站、企業(yè)建站、ChatGPT、動態(tài)網(wǎng)站、域名注冊
廣告
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源:
創(chuàng)新互聯(lián)