Prerequisites:
1.
Set the initialization
parameter DG_BROKER_START value TRUE on both DB’s, So that DMON process would
start automatically.
2.
Create the network
configuration files on both primary and stand by sides to incorporate the
modification to DB_UNIQUE_NAME.
3.
Add static database
registration entry on both database tnsnames.ora configuration file, So that
each database could communicate with the Data Guard Broker Management Utility
DGMGRL.
Configuration
Steps:
Primary]
$ dgmgrl
DGMGRL
> connect
sys
Password:
Connected.
Create
configuration command to initialize the DG broker configuration on primary
database side.
DGMGRL> Create configuration ‘PR_ORCL’ as primary database is primary_db
>connect identifier is orcl;
To check the configuration
DGMGRL> show configuration
Adding
the standby database to the DG broker configuration
DGMGRL>
Add database ‘ST_ORCL’ As
>Connect identifier is standby;
Verify
the configuration:
DGMGRL> show configuration verbose;
Configuration
Name: PR_ORCL
Enabled: NO
Protection Mode:
MaxPerformance
Databases:
primary_db - Primary database
stdby_db - Physical standby
database
Fast-Start Failover: DISABLED
Current status for "PR_ORCL":
DISABLED
DGMGRL> show database ST_ORCL
Database
Name: ST_ORCL
Role: PHYSICAL STANDBY
Enabled: NO
Intended State: OFFLINE
Instance(s):
orcl
Current status for "ST_ORCL":
DISABLED
Enable
the DG Broker configuration:
DGMGRL> enable configuration;
Enabled.
DGMGRL> show
database PR_ORCL;
Database
Name: PR_ORCL
Role: PRIMARY
Enabled: YES
Intended State: TRANSPORT-ON
Instance(s):
orcl
Current status for "PR_ORCL":
SUCCESS
DGMGRL> show
database ST_ORCL;
Database
Name: ST_ORCL
Role: PHYSICAL STANDBY
Enabled: YES
Intended State: APPLY-ON
Instance(s):
orcl
Current status for "ST_ORCL":
SUCCESS
Performing
switchover:
Using Data Guard Broker to Perform a Switchover
DGMGRL> SWITCHOVER TO ST_ORCL;
Performing switchover NOW, please wait...
New primary database "ST_ORCL" is
opening...
Operation requires shutdown of instance
"orcl" on database "PR_ORCL"
Shutting down instance "orcl"...
ORA-1109: database not open
Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance
"orcl" on database "ST_ORCL"
Starting instance "orcl"...
ORACLE instance started.
Database mounted.
Switchover succeeded, new primary is
"ST_ORCL"
Using Data Guard Broker to
Perform a Switchback
DGMGRL> SWITCHOVER TO PR_ORCL;
Performing switchover NOW, please wait...
New primary database "ST_ORCL" is
opening...
Operation requires shutdown of instance
"orcl" on database "ST_ORCL"
Shutting down instance "orcl"...
ORA-1109: database not open
Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance
"orcl" on database "PR_ORCL"
Starting instance "orcl"...
ORACLE instance started.
Database mounted.
Switchover succeeded, new primary is
"PR_ORCL"
0 $type={blogger}:
Post a Comment