According to Oracle, new Data Guard Broker can simply configure the Data Guard environment and monitor and errors the entire environment.
?
So according to the document, the overall feeling is not bad. It is only that the documentation is an automatic action, such as the data protection mode of the Data Guard environment, Broker automatically modifies the database's data protection mode and restarts the database, but actually does not do so, still need to manually modify the database.
?
Basic configuration steps are as follows:
Start Broker on all sites.
SQL> ALTER SYSTEM SET DG_BROKER_START = TRUE Scope = Both;
?
SYSTEM altered.
?
SQL> Show parameter DG_Broker_Start
?
Name ???????? Type ????? Value
------------------------------------?
DG_Broker_Start ??? boolean ?? true
?
Connect Data Guard Manager, you must connect users with SYSDBA privileges.
> DGMGRL
DGMGRL> Connect Sys / DBA
?
Create a configuration solution
DGMGRL> CREATE Configuration 'Sales' AS
> Primary Site Is'
Boston
'
> Resource IS 'SALES_DB'
> Hostname is 'Rac1PRV'
> Instance Name is 'Orcl'
> Service name is 'orcl.primary'
> Site is maintained as logical;
?
Create a spare site solution
DGMGRL> CREATE SITE '
Beijing
'
> Resource is 'report_db'
> Hostname is 'RAC2PRV'
> Instance Name is 'Orcl'
> Service name is 'orcl.standby'
> Site is maintained as logical;
?
Activate configuration solution
DGMGRL> Enable Configuration;
?
Activate resources
DGMGRL> enable resource 'sales_db';
?
The log transmission mode of the resource must match the data protection pattern of the Primary library, such as the data protection mode is Maximize Availability, then the LogxPTMode property of the resource is required to be SYNC mode.
DGMGRL> ALTER Resource 'Sales_DB' on Site '
Boston
'Set printy logXPTMODE = SYNC;
?
DGMGRL> ALTER Resource 'Report_DB' On Site '
Beijing
'Set printy logXPTMODE = SYNC;
?
DGMGRL> ALTER Configuration Set Protection Mode as maxavailability;
?
View resource conditions
DGMGRL> Show resource verbose 'sales_db';
?
View a property in the resource on a node
DGMGRL> Show resource verbose 'sales_db' 'logxptmode' on site 'Boston
"
?
DGMGRL> Show Resource 'Sales_DB' Logxptstatus;
?
View Broker's log
DGMGRL> Show log Latest On Site '
Boston
"
?
View Database Trends
DGMGRL> Show log alert Latest On Site '
Boston
"
?
View various properties of resources
DGMGRL> Show resource 'sales_db' sendqentries;
?
DGMGRL> Show resource 'report_db' sbylogqueue;
?
DGMGRL> Show resource verbose 'sales_db' inconsistentlogxptprops;
?
Stop a node in the Data Guard environment
DGMGRL> ALTER Resource 'Report_DB' On Site '
Beijing
'
Set
State
= 'offline';
?
Start a node in the Data Guard environment
DGMGRL> ALTER Resource 'Report_DB' On Site '
Beijing
'
Set
State
= 'Logical-apply-on';
?