Switching over to standby
database when you are using dataguard broker is a very straightforward
operation. You just need to initiatie dgmgrl command prompt, check status of standby
database and simply issue switchover command. Always remember to log in to
DGMGRL using password, not ‘dgmgrl /’. Otherwise you will receive ORA-01017.
Also make sure that password file of primary was successfully copied to standby
database after your last SYS password reset, otherwise you may face ORA-16467
during switchover.
Following is the way to switchover to standby in
dataguard broker environment using DGMGRL command
[oracle:MYDBSERVER]$
dgmgrl sys/oracle12c DGMGRL
for Linux: Version 12.1.0.2.0 - 64bit Production Copyright
(c) 2000, 2013, Oracle. All rights reserved. Welcome
to DGMGRL, type "help" for information. Connected
as SYSDG. DGMGRL>
show database verbose 'STANDBY_DB' Database
- STANDBY_DB Role: PHYSICAL STANDBY Intended State: APPLY-ON Transport
Lag: 0 seconds (computed 0 seconds
ago) Apply Lag: 0 seconds
(computed 0 seconds ago) Average Apply Rate: 10.00 KByte/s Active Apply Rate: 4.05 MByte/s Maximum Apply Rate: 8.50 MByte/s Real Time Query: ON Instance(s): MYDBSERVER (apply instance) STANDBY_DB2 Properties: DGConnectIdentifier = 'STANDBY_DB' ObserverConnectIdentifier = '' LogXptMode = 'ASYNC' RedoRoutes = '' DelayMins = '0' Binding = 'optional' MaxFailure = '0' MaxConnections = '1' ReopenSecs = '300' NetTimeout = '30' RedoCompression = 'DISABLE' LogShipping = 'ON' PreferredApplyInstance = '' ApplyInstanceTimeout = '0' ApplyLagThreshold = '0' TransportLagThreshold = '0' TransportDisconnectedThreshold = '30' ApplyParallel = 'AUTO' StandbyFileManagement = 'AUTO' ArchiveLagTarget = '900' LogArchiveMaxProcesses = '4' LogArchiveMinSucceedDest = '1' DbFileNameConvert = '' LogFileNameConvert = '/u03/PRIMARY_DB/onlinelog,
/u03/STANDBY_DB/onlinelog' FastStartFailoverTarget = '' InconsistentProperties = '(monitor)' InconsistentLogXptProps = '(monitor)' SendQEntries = '(monitor)' LogXptStatus = '(monitor)' RecvQEntries = '(monitor)' StaticConnectIdentifier(*) StandbyArchiveLocation(*) AlternateLocation(*) LogArchiveTrace(*) LogArchiveFormat(*) TopWaitEvents(*) (*) - Please check specific instance for
the property value Database
Status: SUCCESS DGMGRL> switchover to
'STANDBY_DB' Performing
switchover NOW, please wait... Operation
requires a connection to instance "MYDBSERVER" on database
"STANDBY_DB" Connecting
to instance "MYDBSERVER"... Connected
as SYSDBA. New
primary database "STANDBY_DB" is opening... Oracle
Clusterware is restarting database "PRIMARY_DB" ... Switchover succeeded, new primary
is "STANDBY_DB"
DGMGRL>
show configuration Configuration
- My Dataguard Protection Mode: MaxPerformance Members: STANDBY_DB - Primary database PRIMARY_DB - Physical standby database Fast-Start
Failover: DISABLED Configuration
Status: SUCCESS (status updated 24 seconds ago)
|
No comments:
Post a Comment