使用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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- DG的切換操作
- oracle 11g dg broker 開啟fast-start failover自動故障切換OracleASTAI
- dg切換操作文件
- oracle dg切換操作示例Oracle
- Oracle RAC DG手動切換Oracle
- Oracle DG管理Broker配置Oracle
- ORACLE 11.2.0.4 DG(Broker) for linux 部署OracleLinux
- RAC+單例項DG的切換單例
- 【DG】Data Guard主備庫Failove切換AI
- 【DG】Data Guard主備庫Switchover切換
- Flutter UI使用Provide實現主題切換FlutterUIIDE
- Oracle 11g dg switchover切換操作流程Oracle
- 5分鐘,徹底精通Oracle DG切換Oracle
- Oracle DG Broker配置的管理週期Oracle
- 用CSS實現tab切換CSS
- 使用ViewPager和TabLayout來實現滑動切換效果ViewpagerTabLayout
- Oracle 11g dg broker自動failoverOracleAI
- Oracle 18c&19c physical dg切換總結Oracle
- 用純css實現Tab切換CSS
- 雙buffer實現無鎖切換
- oracle 11g dg broker開啟和配置Oracle
- Oracle DG 管理Broker配置成員的狀態Oracle
- 純CSS實現Tab欄的切換CSS
- jquery中點選切換的實現jQuery
- 用CSS實現Tab頁切換效果CSS
- 實現Vue專案主題切換Vue
- Label和input實現純CSS切換CSS
- WPF手動實現切換頁面
- 實現一個切換配方的功能
- Sass應用之實現主題切換
- Android——Activity切換炫酷動畫實現Android動畫
- Android 實現APP可切換多語言AndroidAPP
- 利用ViewPager和Fragment實現頁卡切換ViewpagerFragment
- javascript實現tab切換的四種方法JavaScript
- oracle 跨小版本dg切換應用補丁報錯處理Oracle
- 《前端實戰總結》之使用純css實現網站換膚和焦點圖切換動畫前端CSS網站動畫
- vue2.0實現底部導航切換效果Vue
- 簡單實現一個全面屏切換效果