使用Broker實現DG切換
使用Broker切換DG非常簡單,單需要提前確認切換可行性。
使用如下方式驗證資料庫,包括主庫和備庫:
以下是主庫:
DGMGRL> validate database o19dg; Database Role: Primary database Ready for Switchover: Yes Managed by Clusterware: o19dg: NO Validating static connect identifier for the primary database o19dg... The static connect identifier allows for a connection to database "o19dg".
以下是備庫:
DGMGRL> validate database o19; Database Role: Physical standby database Primary Database: o19dg Ready for Switchover: Yes Ready for Failover: Yes (Primary Running) Managed by Clusterware: o19dg: NO o19 : NO Validating static connect identifier for the primary database o19dg... The static connect identifier allows for a connection to database "o19dg". Current Log File Groups Configuration: Thread # Online Redo Log Groups Standby Redo Log Groups Status (o19dg) (o19) 1 3 3 Insufficient SRLs Future Log File Groups Configuration: Thread # Online Redo Log Groups Standby Redo Log Groups Status (o19) (o19dg) 1 3 3 Insufficient SRLs
有可能會因為以下幾個原因導致驗證失敗:
-
檢查備庫的log_archive_dest_N配置
-
檢查主備庫的db_file_name_convert和log_file_name_convert配置
-
檢查主備庫的靜態監聽配置,listener.ora可參考以下
SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = o19dg) (ORACLE_HOME = /u01/app/oracle/product/19.3.0/db_1) (GLOBAL_DBNAME = o19dg) ) (SID_DESC = (SID_NAME = o19dg) (ORACLE_HOME = /u01/app/oracle/product/19.3.0/db_1) (GLOBAL_DBNAME = o19dg_DGMGRL) (SERVICE_NAME = o19dg_DGMGRL) ) )
接下來,可執行切換,注意要顯式地使用密碼登入Broker,否則切換會不成功。
$ dgmgrl DGMGRL for Linux: Release 19.0.0.0.0 - Production on Fri Jan 13 13:59:31 2023 Version 19.3.0.0.0 Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved. Welcome to DGMGRL, type "help" for information. DGMGRL> connect sys/oracle@o19dg Connected to "o19dg" Connected as SYSDBA. DGMGRL> SWITCHOVER TO o19; Performing switchover NOW, please wait... Operation requires a connection to database "o19" Connecting ... Connected to "o19" Connected as SYSDBA. New primary database "o19" is opening... Operation requires start up of instance "o19dg" on database "o19dg" Starting instance "o19dg"... Connected to an idle instance. ORACLE instance started. Connected to "o19dg" Database mounted. Database opened. Connected to "o19dg" Switchover succeeded, new primary is "o19"
此時,切換已經完成。在新主庫上確認:
DGMGRL> show configuration verbose; Configuration - o19 Protection Mode: MaxAvailability Members: o19 - Primary database o19dg - Physical standby database Properties: FastStartFailoverThreshold = '30' OperationTimeout = '30' TraceLevel = 'USER' FastStartFailoverLagLimit = '0' CommunicationTimeout = '180' ObserverReconnect = '0' FastStartFailoverAutoReinstate = 'TRUE' FastStartFailoverPmyShutdown = 'TRUE' BystandersFollowRoleChange = 'ALL' ObserverOverride = 'FALSE' ExternalDestination1 = '' ExternalDestination2 = '' PrimaryLostWriteAction = 'CONTINUE' ConfigurationWideServiceName = 'o19_CFG' Fast-Start Failover: Disabled Configuration Status: SUCCESS
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22621861/viewspace-2932105/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle物理DG自動切換——Dataguard Broker配置Oracle
- 使用DG_broker工具管理DG之switchover
- DG的切換操作
- oracle 11g dg broker 開啟fast-start failover自動故障切換OracleASTAI
- 【DATAGUARD】物理dg配置客戶端無縫切換 (八.1)--Data Guard Broker 的配置客戶端
- dg切換操作文件
- oracle dg切換操作示例Oracle
- 【DG】三大模式切換模式
- Oracle RAC DG手動切換Oracle
- DG_三大模式切換模式
- Oracle DG管理Broker配置Oracle
- 使用bringToFont實現標籤切換
- 【DATAGUARD】物理dg的switchover切換(五)
- 【DG】Data Guard主備庫Switchover切換
- RAC+單例項DG的切換單例
- oracle DG VCS切換異常問題Oracle
- 【DATAGUARD】物理dg的failover切換(六)AI
- Flutter UI使用Provide實現主題切換FlutterUIIDE
- ORACLE資料庫Dataguard dg brokerOracle資料庫
- 彩色 TabBar 切換動畫實現tabBar動畫
- 【DG】Data Guard主備庫Failove切換AI
- 5分鐘,徹底精通Oracle DG切換Oracle
- 單節點DG的switchover切換介紹
- Oracle 11g dg switchover切換操作流程Oracle
- 使用ViewPager和TabLayout來實現滑動切換效果ViewpagerTabLayout
- Oracle DG Broker配置的管理週期Oracle
- ORACLE 11.2.0.4 DG(Broker) for linux 部署OracleLinux
- dg broker配置的問題及分析
- 雙buffer實現無鎖切換
- 用純css實現Tab切換CSS
- 如何實現選項卡切換
- 單例項DG切換中的虛擬IP單例
- oracle DG資料庫切換步驟筆記Oracle資料庫筆記
- ORA-16139 Oracle DG無法正常切換Oracle
- 單節點DG的failover切換介紹AI
- oracle 10g dg切換步驟記錄Oracle 10g
- oracle_DG+broker+Keepalived的部署文件Oracle
- 實現Vue專案主題切換Vue