DATAGUARD在做SWITCHOVER切換時遇到問題總結
1.主庫在進行物理主備庫角色轉換的時候遇到ORA-01093錯誤
SQL> select switchover_status from v$database;SWITCHOVER_STATUS
--------------------
SESSIONS ACTIVE ----------有活動會話。
SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY;
ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY
*
ERROR at line 1:
ORA-01093: ALTER DATABASE CLOSE only permitted with no sessions connected
此錯誤的因為主庫中有活動的會話造成的,解決的辦法為:
1.殺掉活動會話,重新執行該命令
2.在該命令後面加上with session shutdown即
ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN;
2.備庫在轉換為主庫時狀態為:NOT ALLOWED--可能需要恢復或者退出恢復模式。
SQL> select switchover_status from v$database;SWITCHOVER_STATUS
--------------------
NOT ALLOWED
SQL> alter database commit to switchover to primary;
alter database commit to switchover to primary
*
ERROR at line 1:
ORA-16139: media recovery required
或者如下:--RECOVERY NEEDED
SQL> select switchover_status from v$database;
SWITCHOVER_STATUS
--------------------
RECOVERY NEEDED
###############
SQL> alter database recover managed standby database disconnect from session;
Database altered.
SQL> select switchover_status from v$database;
SWITCHOVER_STATUS
--------------------
TO PRIMARY
SQL> alter database commit to switchover to primary;
Database altered.
3.主庫切換為備庫後,備庫不做:alter database recover managed standby database cancel;也可以,此時已經自動斷開了,日誌中有提示:
Sun Apr 20 20:15:35 2014
Media Recovery Log /u01/app/oracle/prod/arch/1_62_844894247.dbf
Media Recovery Waiting for thread 1 sequence 63
Sun Apr 20 20:15:46 2014
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[6]: Assigned to RFS process 19968
RFS[6]: Identified database type as 'physical standby'
RFS[6]: Archived Log: '/u01/app/oracle/prod/arch/1_63_844894247.dbf'
Sun Apr 20 20:15:50 2014
Media Recovery Log /u01/app/oracle/prod/arch/1_63_844894247.dbf
Identified End-Of-Redo for thread 1 sequence 63
Sun Apr 20 20:15:50 2014
Media Recovery End-Of-Redo indicator encountered
Sun Apr 20 20:15:50 2014
Media Recovery Applied until change 373573 ---最後應用到的SCN
Sun Apr 20 20:15:50 2014
MRP0: Media Recovery Complete: End-Of-REDO (PROD)
Resetting standby activation ID 257246883 (0xf5546a3)
Sun Apr 20 20:15:51 2014
MRP0: Background Media Recovery process shutdown (PROD)----MEDIA RECOVERY PROCESS已經關閉
Sun Apr 20 20:16:21 2014
alter database recover managed standby database cancel
Sun Apr 20 20:16:21 2014
ORA-16136 signalled during: alter database recover managed standby database cancel...
轉載於:
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29119536/viewspace-1415939/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- DataGuard---->物理StandBy的角色切換之switchover
- Oracle DataGuard 主備切換 (switchover) oracle11gOracle
- DATAGUARD失敗切換
- DATAGUARD強行切換
- Oracle 11.2.0.4 physical dataguard和snapshot dataguard切換Oracle
- openGauss主備切換之switchover與failoverAI
- 【DG】Data Guard主備庫Switchover切換
- oracle11g dataguard切換Oracle
- Oracle 11g dg switchover切換操作流程Oracle
- Windows安裝Filebeat遇到問題總結Windows
- 【DATAGUARD】Oracle Dataguard物理備庫切換最佳實踐(sqlplus)OracleSQL
- MySQL高可用之MHA切換測試(switchover & failover)MySqlAI
- 國標gb28181在做內網穿透時遇到的一些問題內網穿透
- vue專案中遇到的問題總結Vue
- Android中使用WebView遇到的問題總結:AndroidWebView
- React開發中遇到的問題總結React
- android單元測試遇到問題總結Android
- 2017年秋季遇到的相容問題總結
- 總結一下最近遇到的問題
- MySQL 主從切換延時高問題分析MySql
- 基於單機的DataGuard切換文件
- 初試微信小程式遇到問題總結微信小程式
- 提交Spark作業遇到的NoSuchMethodError問題總結SparkError
- 升級 node18 遇到的問題總結
- 總結一下本週遇到的問題
- 基於多種場景DataGuard切換方案
- 專案中遇到的RediS快取問題及面試問題總結Redis快取面試
- oracle 19c使用dgmgrl來執行switchover和failover切換OracleAI
- laravel 在配置nginx代理時遇到的連結問題LaravelNginx
- Mac 下切換 PHP 版本問題MacPHP
- 初次使用EasyUI框架外掛遇到的問題及總結UI框架
- SwitchResX自定義解析度時遇到的問題彙總
- 客戶端(windows)訪問FTP伺服器遇到的問題(總結)客戶端WindowsFTP伺服器
- 遇到的編碼問題、時區問題整理
- Homestead環境遇到問題彙總
- H5與APP混合開發遇到的問題總結H5APP
- 問題總結
- app 測試環境切換問題APP
- 倒數計時快取時間問題總結快取