Oracle 11gR2 – How to peform a DataGuard SwitchOver

How to perform a Oracle DataGuard Switchover in 11gR2

  1. Ensure SYS password is correct.
  2. Ensure no errors in alert log currently.
  3. Ensure both hosts are able to tnsping each other
  4. Ensure standby database have standby redo log files configured
  5. Ensure you are tracking the alert log for both primary and standby Database (tail -f alert_log)

Connect to DataGuard Broker

# dgmgrl
DGMGRL for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - 64bit Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys
Password:
Connected.

Verify the entire DataGuard  health

DGMGRL> show configuration
Configuration - primaryDB
Protection Mode: MaxAvailability
 Databases:
primaryDB - Primary database
 standbyDB - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS

Verify primaryDB Configuration

DGMGRL> show database verbose 'primaryDB ';
Database - primaryDB
Role: PRIMARY
 Intended State: TRANSPORT-ON
 Instance(s):
 orcl
Properties:
 DGConnectIdentifier = 'primaryDB'
 ObserverConnectIdentifier = ''
 LogXptMode = 'SYNC'
 DelayMins = '0'
 Binding = 'optional'
 MaxFailure = '0'
 MaxConnections = '1'
 ReopenSecs = '300'
 NetTimeout = '30'
 RedoCompression = 'DISABLE'
 LogShipping = 'ON'
 PreferredApplyInstance = ''
 ApplyInstanceTimeout = '0'
 ApplyParallel = 'AUTO'
 StandbyFileManagement = 'AUTO'
 ArchiveLagTarget = '0'
 LogArchiveMaxProcesses = '10'
 LogArchiveMinSucceedDest = '1'
 DbFileNameConvert = ''
 LogFileNameConvert = 'junk, junk'
 FastStartFailoverTarget = ''
 InconsistentProperties = '(monitor)'
 InconsistentLogXptProps = '(monitor)'
 SendQEntries = '(monitor)'
 LogXptStatus = '(monitor)'
 RecvQEntries = '(monitor)'
 SidName = 'orcl'
 StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=primaryDB)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=primaryDB.example.com)(INSTANCE_NAME=orcl)(SERVER=DEDICATED)))'
 StandbyArchiveLocation = '/archive/archivelog/orcl'
 AlternateLocation = ''
 LogArchiveTrace = '0'
 LogArchiveFormat = 'T%tS%sR%r.arc'
 TopWaitEvents = '(monitor)'
Database Status:
SUCCESS

Verify standbyDB Configuration

DGMGRL> show database verbose 'standbyDB';
Database - standbyDB
Role: PHYSICAL STANDBY
 Intended State: APPLY-ON
 Transport Lag: 0 seconds
 Apply Lag: 0 seconds
 Real Time Query: OFF
 Instance(s):
 orcl
Properties:
 DGConnectIdentifier = 'standbyDB'
 ObserverConnectIdentifier = ''
 LogXptMode = 'SYNC'
 DelayMins = '0'
 Binding = 'OPTIONAL'
 MaxFailure = '0'
 MaxConnections = '1'
 ReopenSecs = '300'
 NetTimeout = '30'
 RedoCompression = 'DISABLE'
 LogShipping = 'ON'
 PreferredApplyInstance = ''
 ApplyInstanceTimeout = '0'
 ApplyParallel = 'AUTO'
 StandbyFileManagement = 'AUTO'
 ArchiveLagTarget = '0'
 LogArchiveMaxProcesses = '10'
 LogArchiveMinSucceedDest = '1'
 DbFileNameConvert = ''
 LogFileNameConvert = 'junk, junk'
 FastStartFailoverTarget = ''
 InconsistentProperties = '(monitor)'
 InconsistentLogXptProps = '(monitor)'
 SendQEntries = '(monitor)'
 LogXptStatus = '(monitor)'
 RecvQEntries = '(monitor)'
 SidName = 'css'
 StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=standbyDB)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=standbyDB.example.com)(INSTANCE_NAME=orcl)(SERVER=DEDICATED)))'
 StandbyArchiveLocation = '/archive/archivelog/css'
 AlternateLocation = ''
 LogArchiveTrace = '0'
 LogArchiveFormat = 'T%tS%sR%r.arc'
 TopWaitEvents = '(monitor)'
Database Status:
SUCCESS

Perform DataGuard SwitchOver

DGMGRL> switchover to 'standbyDB';
Performing switchover NOW, please wait...
New primary database "standbyDB" is opening...
Operation requires shutdown of instance "orcl" on database "primaryDB"
Shutting down instance "orcl"...
ORACLE instance shut down.
Operation requires startup of instance "orcl" on database "primaryDB"
Starting instance "orcl"...
ORACLE instance started.
Database mounted.
Switchover succeeded, new primary is "standbyDB"

Verify entire Dataguard Health

DGMGRL> show configuration
Configuration - indacbetcssDG
Protection Mode: MaxAvailability
 Databases:
standbyDB- Primary database
primaryDB - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS

Cheers!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s