11gR2 RAC DB switchover using DG broker (文件 ID 880017.1)
In this Document
Goal |
Solution |
References |
APPLIES TO:
Oracle Database - Enterprise Edition - Version 11.2.0.1 to 11.2.0.4 [Release 11.2]Information in this document applies to any platform.
***Checked for relevance on 17-Feb-2014***
***Checked for relevance on 16-Jul-2015***
GOAL
Before performing a switchover from an Oracle RAC primary database to a physical standby database, shut down all but one primary database instance. Any primary database instances shut down at this time can be started after the switchover completes
If dataguard broker is configured, the broker is able to handle this by shutting down ALL but one instance from the primary DB.
How to configure the broker with RAC DB for 11gR2, can refer to note:1349977.1
SOLUTION
Both Primary and standby databases are RAC with two instances.
Primary - DG112I_PRM(DG112i1 and DG112i2)
Standby - DG112I_STB (DG112i1 and DG112i2)
DB configuration:
=====
$ srvctl config database -d dg112i_prm -a
Database unique name: dg112i_prm
Database name: dg112i
Oracle home: /u01/app/oracle/product/11.2.0/dbhome_2
Oracle user: oracle
Spfile: +DATA/dg112i/spfiledg112i.ora
Domain: au.oracle.com
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: dg112i_prm
Database instances: dg112i1,dg112i2
Disk Groups: DATA,FRA
Mount point paths:
Services:
Type: RAC
Database is enabled
Database is administrator managed
Standby
=====
$ srvctl config database -d dg112i_stb -a
Database unique name: dg112i_stb
Database name: dg112i
Oracle home: /u01/app/oracle/product/11.2.0/dbhome_2
Oracle user: oracle
Spfile: +DATA/dg112i_stb/spfiledg112i.ora
Domain: au.oracle.com
Start options: read
Stop options: immediate
Database role: PHYSICAL_STANDBY
Management policy: AUTOMATIC
Server pools: dg112i_stb
Database instances: dg112i1,dg112i2
Disk Groups: DATA,FRA
Mount point paths:
Services:
Type: RAC
Database is enabled
Database is administrator managed
Listener status from primary:
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 08-SEP-2011 18:53:28
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_DG)))
STATUS of the LISTENER
------------------------
Alias LISTENER_DG
Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date 08-SEP-2011 18:00:33
Uptime 0 days 0 hr. 52 min. 55 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0.2/grid/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/grid1vm1/listener_dg/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_DG)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.11.225)(PORT=1555)))
Services Summary...
Service "DG112I_PRM.au.oracle.com" has 2 instance(s).
Instance "dg112i1", status READY, has 2 handler(s) for this service...
Instance "dg112i2", status READY, has 1 handler(s) for this service...
Service "DG112I_PRM_DGB.au.oracle.com" has 2 instance(s).
Instance "dg112i1", status READY, has 2 handler(s) for this service...
Instance "dg112i2", status READY, has 1 handler(s) for this service...
Service "dg112i_prm_dgmgrl.au.oracle.com" has 1 instance(s).
Instance "dg112i1", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
Listener status from standby:
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 08-SEP-2011 18:27:57
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_DG)))
STATUS of the LISTENER
------------------------
Alias LISTENER_DG
Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date 08-SEP-2011 16:15:37
Uptime 0 days 2 hr. 12 min. 19 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0.2/grid/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/grid2vm2/listener_dg/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER_DG)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.11.229)(PORT=1555)))
Services Summary...
Service "dg112i_stb.au.oracle.com" has 2 instance(s).
Instance "dg112i1", status READY, has 1 handler(s) for this service...
Instance "dg112i2", status READY, has 2 handler(s) for this service...
Service "dg112i_stb_DGB.au.oracle.com" has 2 instance(s).
Instance "dg112i1", status READY, has 1 handler(s) for this service...
Instance "dg112i2", status READY, has 2 handler(s) for this service...
Service "dg112i_stb_dgmgrl.au.oracle.com" has 1 instance(s).
Instance "dg112i2", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
DG Broker configuration:
Connected.
DGMGRL> show configuration verbose;
Configuration - dg112
Protection Mode: MaxPerformance
Databases:
dg112i_prm - Primary database
dg112i_stb - Physical standby database
Properties:
FastStartFailoverThreshold = '30'
OperationTimeout = '30'
FastStartFailoverLagLimit = '30'
CommunicationTimeout = '180'
FastStartFailoverAutoReinstate = 'TRUE'
FastStartFailoverPmyShutdown = 'TRUE'
BystandersFollowRoleChange = 'ALL'
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS
Primary database setting:
Database - dg112i_prm
Role: PRIMARY
Intended State: TRANSPORT-ON
Instance(s):
dg112i1
dg112i2
Properties:
DGConnectIdentifier = 'dg112i_prm'
ObserverConnectIdentifier = ''
LogXptMode = 'ASYNC'
DelayMins = '0'
Binding = 'optional'
MaxFailure = '0'
MaxConnections = '1'
ReopenSecs = '300'
NetTimeout = '30'
RedoCompression = 'DISABLE'
LogShipping = 'ON'
PreferredApplyInstance = ''
ApplyInstanceTimeout = '0'
ApplyParallel = 'AUTO'
StandbyFileManagement = 'MANUAL'
ArchiveLagTarget = '0'
LogArchiveMaxProcesses = '4'
LogArchiveMinSucceedDest = '1'
DbFileNameConvert = ''
LogFileNameConvert = ''
FastStartFailoverTarget = ''
InconsistentProperties = '(monitor)'
InconsistentLogXptProps = '(monitor)'
SendQEntries = '(monitor)'
LogXptStatus = '(monitor)'
RecvQEntries = '(monitor)'
SidName(*)
StaticConnectIdentifier(*)
StandbyArchiveLocation(*)
AlternateLocation(*)
LogArchiveTrace(*)
LogArchiveFormat(*)
TopWaitEvents(*)
(*) - Please check specific instance for the property value
Database Status:
SUCCESS
DGMGRL> show instance verbose dg112i1 on database dg112i_prm;
Instance 'dg112i1' of database 'dg112i_prm'
Host Name: grid1vm1.au.oracle.com
PFILE:
Properties:
SidName = 'dg112i1'
StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.11.225)(PORT=1555))(CONNECT_DATA=(SERVICE_NAME=DG112I_PRM_DGMGRL.au.oracle.com)(INSTANCE_NAME=dg112i1)(SERVER=DEDICATED)))'
StandbyArchiveLocation = 'USE_DB_RECOVERY_FILE_DEST'
AlternateLocation = ''
LogArchiveTrace = '0'
LogArchiveFormat = '%t_%s_%r.dbf'
TopWaitEvents = '(monitor)'
Instance Status:
SUCCESS
DGMGRL> show instance verbose dg112i2 on database dg112i_prm;
Instance 'dg112i2' of database 'dg112i_prm'
Host Name: grid1vm2.au.oracle.com
PFILE:
Properties:
SidName = 'dg112i2'
StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.11.226)(PORT=1555))(CONNECT_DATA=(SERVICE_NAME=DG112I_PRM_DGMGRL.au.oracle.com)(INSTANCE_NAME=dg112i2)(SERVER=DEDICATED)))'
StandbyArchiveLocation = 'USE_DB_RECOVERY_FILE_DEST'
AlternateLocation = ''
LogArchiveTrace = '0'
LogArchiveFormat = '%t_%s_%r.dbf'
TopWaitEvents = '(monitor)'
Instance Status:
SUCCESS
Standby database setting:
Database - dg112i_stb
Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: 0 seconds
Apply Lag: 0 seconds
Real Time Query: ON
Instance(s):
dg112i1
dg112i2 (apply instance)
Properties:
DGConnectIdentifier = 'dg112i_stb'
ObserverConnectIdentifier = ''
LogXptMode = 'ASYNC'
DelayMins = '0'
Binding = 'optional'
MaxFailure = '0'
MaxConnections = '1'
ReopenSecs = '300'
NetTimeout = '30'
RedoCompression = 'DISABLE'
LogShipping = 'ON'
PreferredApplyInstance = ''
ApplyInstanceTimeout = '0'
ApplyParallel = 'AUTO'
StandbyFileManagement = 'MANUAL'
ArchiveLagTarget = '0'
LogArchiveMaxProcesses = '4'
LogArchiveMinSucceedDest = '1'
DbFileNameConvert = ''
LogFileNameConvert = ''
FastStartFailoverTarget = ''
InconsistentProperties = '(monitor)'
InconsistentLogXptProps = '(monitor)'
SendQEntries = '(monitor)'
LogXptStatus = '(monitor)'
RecvQEntries = '(monitor)'
SidName(*)
StaticConnectIdentifier(*)
StandbyArchiveLocation(*)
AlternateLocation(*)
LogArchiveTrace(*)
LogArchiveFormat(*)
TopWaitEvents(*)
(*) - Please check specific instance for the property value
Database Status:
SUCCESS
DGMGRL> show instance verbose dg112i1 on database dg112i_stb;
Instance 'dg112i1' of database 'dg112i_stb'
Host Name: grid2vm1.au.oracle.com
PFILE:
Properties:
SidName = 'dg112i1'
StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.11.228)(PORT=1555))(CONNECT_DATA=(SERVICE_NAME=dg112i_stb_DGMGRL.au.oracle.com)(INSTANCE_NAME=dg112i1)(SERVER=DEDICATED)))'
StandbyArchiveLocation = 'USE_DB_RECOVERY_FILE_DEST'
AlternateLocation = ''
LogArchiveTrace = '0'
LogArchiveFormat = '%t_%s_%r.dbf'
TopWaitEvents = '(monitor)'
Instance Status:
SUCCESS
DGMGRL> show instance verbose dg112i2 on database dg112i_stb;
Instance 'dg112i2' of database 'dg112i_stb'
Host Name: grid2vm2.au.oracle.com
PFILE:
Properties:
SidName = 'dg112i2'
StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.11.229)(PORT=1555))(CONNECT_DATA=(SERVICE_NAME=dg112i_stb_DGMGRL.au.oracle.com)(INSTANCE_NAME=dg112i2)(SERVER=DEDICATED)))'
StandbyArchiveLocation = 'USE_DB_RECOVERY_FILE_DEST'
AlternateLocation = ''
LogArchiveTrace = '0'
LogArchiveFormat = '%t_%s_%r.dbf'
TopWaitEvents = '(monitor)'
Instance Status:
SUCCESS
It is ready for the switchover. Note that we do not need to shutdown any instances
Performing switchover NOW, please wait...
New primary database "dg112i_stb" is opening...
Operation requires shutdown of instance "dg112i1" on database "dg112i_prm"
Shutting down instance "dg112i1"...
ORACLE instance shut down.
Operation requires startup of instance "dg112i1" on database "dg112i_prm"
Starting instance "dg112i1"...
ORACLE instance started.
Database mounted.
Database opened.
Switchover succeeded, new primary is "dg112i_stb"
DGMGRL>
The status of the DB changed to:
Database unique name: dg112i_prm
Database name: dg112i
Oracle home: /u01/app/oracle/product/11.2.0/dbhome_2
Oracle user: oracle
Spfile: +DATA/dg112i/spfiledg112i.ora
Domain: au.oracle.com
Start options: open
Stop options: immediate
Database role: PHYSICAL_STANDBY <<<<<<<< Standby
Management policy: AUTOMATIC
Server pools: dg112i_prm
Database instances: dg112i1,dg112i2
Disk Groups: DATA,FRA
Mount point paths:
Services:
Type: RAC
Database is enabled
Database is administrator managed
$ srvctl config database -d dg112i_stb -a
Database unique name: dg112i_stb
Database name: dg112i
Oracle home: /u01/app/oracle/product/11.2.0/dbhome_2
Oracle user: oracle
Spfile: +DATA/dg112i_stb/spfiledg112i.ora
Domain: au.oracle.com
Start options: open
Stop options: immediate
Database role: PRIMARY <<<<<<<< Primary
Management policy: AUTOMATIC
Server pools: dg112i_stb
Database instances: dg112i1,dg112i2
Disk Groups: DATA,FRA
Mount point paths:
Services:
Type: RAC
Database is enabled
Database is administrator managed
During the switchover, second instance of primary (DG112i2) was shutdown abort.
Both of the original standby instances (DG112i1 / DG112i2) are opened as new primary DB.
Both instances of the original primary instances started as standby role.
ORA-12514 during the switchover:
With the above configuration, the StaticConnectIdentifier is set correctly.
If the port is changed to 1521, then the DG broker will return ORA-12514 when try to restart the instance during the switchover.
Performing switchover NOW, please wait...
New primary database "dg112i_stb" is opening...
Operation requires shutdown of instance "dg112i1" on database "dg112i_prm"
Shutting down instance "dg112i1"...
ORACLE instance shut down.
Operation requires startup of instance "dg112i1" on database "dg112i_prm"
Starting instance "dg112i1"...
Unable to connect to database
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
Failed.
Warning: You are no longer connected to ORACLE.
Please complete the following steps to finish switchover:
start up instance "dg112i1" of database "dg112i_prm"
DGMGRL>
The switchover is success, just need to perform the startup of the failed instance(s).
The fix is to modify instance property "StaticConnectIdentifier" to the correct setting, in this case, port 1555, or unset it and it will use the database property "DGConnectIdentifier" instead, which should be this connection string ''dg112i_prm_dgmgrl'.
Property "staticconnectidentifier" updated
DGMGRL> edit instance dg112i2 on database dg112i_prm set PROPERTY StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.11.226)(PORT=1555))(CONNECT_DATA=(SERVICE_NAME=DG112I_PRM_DGMGRL.au.oracle.com)(INSTANCE_NAME=dg112i2)(SERVER=DEDICATED)))';
Property "staticconnectidentifier" updated
DGMGRL> edit instance dg112i1 on database dg112i_stb set PROPERTY StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.11.228)(PORT=1555))(CONNECT_DATA=(SERVICE_NAME=dg112i_stb_DGMGRL.au.oracle.com)(INSTANCE_NAME=dg112i1)(SERVER=DEDICATED)))';
Property "staticconnectidentifier" updated
DGMGRL> edit instance dg112i2 on database dg112i_stb set PROPERTY StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.11.229)(PORT=1555))(CONNECT_DATA=(SERVICE_NAME=dg112i_stb_DGMGRL.au.oracle.com)(INSTANCE_NAME=dg112i2)(SERVER=DEDICATED)))';
Property "staticconnectidentifier" updated
or
Property "staticconnectidentifier" updated
DGMGRL> edit instance dg112i2 on database dg112i_prm set PROPERTY StaticConnectIdentifier='';
Property "staticconnectidentifier" updated
DGMGRL> edit instance dg112i1 on database dg112i_stb set PROPERTY StaticConnectIdentifier='';
Property "staticconnectidentifier" updated
DGMGRL> edit instance dg112i2 on database dg112i_stb set PROPERTY StaticConnectIdentifier='';
Property "staticconnectidentifier" updated
For switchover on 12c refer,
12c Dataguard Switchover Best Practices using SQLPLUS (Doc ID 1578787.1)
12c Dataguard Switchover Best Practices using DGMGRL(Dataguard Broker Command Prompt) (Doc ID 1582837.1)
REFERENCES
NOTE:1349977.1 - Data Guard Physical Standby 11.2 RAC Primary to RAC Standby using a second networkNOTE:1305019.1 - 11.2 Data Guard Physical Standby Switchover Best Practices using the Broker
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/20747382/viewspace-2130687/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle:DG 的 switchoverOracle
- Oracle DG管理Broker配置Oracle
- 一步一步搭建11gR2 rac+dg之配置單例項的DG(八)單例
- ORACLE 11.2.0.4 DG(Broker) for linux 部署OracleLinux
- 【DG】Data Guard主備庫Switchover切換
- 使用Broker實現DG切換
- 【DG】MAA-RAC to RAC ADG配置
- Oracle 11g dg switchover切換操作流程Oracle
- 11gR2 RAC convert ONENODE
- 11gR2 OneNode Convert RAC
- Oracle DG Broker配置的管理週期Oracle
- DG:11.2.0.4 RAC線上duplicate恢復DG
- 一步一步搭建oracle 11gR2 rac+dg之環境準備(二)Oracle
- Oracle RAC+DG搭建Oracle
- Oracle 11g dg broker自動failoverOracleAI
- 【DG】Oracle 19c使用dbca來搭建物理DG--主rac備racOracle
- Oracle DG 管理Broker配置成員的狀態Oracle
- oracle 11g dg broker開啟和配置Oracle
- Physical Standby Switchover_status Showing Not Allowed. (Doc ID 1392763.1)
- RAC+DG(asm單例項)ASM單例
- ORACLE19C RAC+DGOracle
- Oracle RAC DG手動切換Oracle
- 11G RAC+DG搭建
- Oracle RAC 11gR2開啟歸檔Oracle
- 11gR2 RAC新增節點步驟
- ORACLE RAC+DG調整redo大小Oracle
- ORACLE RAC TO RAC DG搭建過程中可能遇到的問題Oracle
- dg切換操作文件
- ORACLE 11GR2 RAC的網路規劃解析Oracle
- linux7 靜默安裝 11GR2 RACLinux
- RAC 修改引數DB_FILES
- Oracle RAC+DG 表空間擴容Oracle
- RAC+單例項DG的切換單例
- DG同步異常恢復文件
- Oracle RAC+DG 調整redo/standby log fileOracle
- 19c 探索高可用系列(二) - RAC+DataGuard Broker
- 第141期 DG PDB - Oracle DB 23c(20240129)Oracle
- oracle rac dg庫報錯ORA-01031: insufficient privilegesOracle
- How To Replicate Data from Oracle to Postgres Using GoldenGate (Doc ID 1544137.1OracleGo