dg主庫建立檔案備庫未同步解決方法
環境
備庫standby_file_management引數為MANUAL
主庫建立資料檔案時備庫應用失敗
主庫
SQL> create tablespace test datafile '+DATA/dgpri/datafile/test01.dbf' size 50m;
備庫開啟實時應用
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;
檢視日誌
Archived Log entry 19 added for thread 1 sequence 30 rlc 1015097842 ID 0x3b7defac dest 2: RFS[6]: No standby redo logfiles available for thread 1 RFS[6]: Opened log for thread 1 sequence 31 dbid 998109615 branch 1015097842 Thu Aug 01 01:20:03 2019 Media Recovery Log /u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch1_30_1015097842.dbf File #6 added to control file as 'UNNAMED00006' becausethe parameter STANDBY_FILE_MANAGEMENT is set to MANUALThe file should be manually created to continue.Errors with log /u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch1_30_1015097842.dbf MRP0: Background Media Recovery terminated with error 1274Errors in file /u01/app/oracle/diag/rdbms/dgphy/dgphy/trace/dgphy_pr00_74382.trc: ORA-01274: cannot add datafile '+DATA/dgpri/datafile/test01.dbf' - file could not be created ....Managed Standby Recovery starting Real Time ApplyThu Aug 01 01:22:10 2019Errors in file /u01/app/oracle/diag/rdbms/dgphy/dgphy/trace/dgphy_dbw0_74012.trc: ORA-01186: file 6 failed verification tests ORA-01157: cannot identify/lock data file 6 - see DBWR trace fileORA-01111: name for data file 6 is unknown - rename to correct fileORA-01110: data file 6: '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/UNNAMED00006'File 6 not verified due to error ORA-01157MRP0: Background Media Recovery terminated with error 1111Errors in file /u01/app/oracle/diag/rdbms/dgphy/dgphy/trace/dgphy_pr00_82248.trc: ORA-01111: name for data file 6 is unknown - rename to correct fileORA-01110: data file 6: '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/UNNAMED00006'ORA-01157: cannot identify/lock data file 6 - see DBWR trace fileORA-01111: name for data file 6 is unknown - rename to correct fileORA-01110: data file 6: '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/UNNAMED00006'Managed Standby Recovery not using Real Time Apply
此時備庫執行
SQL> alter database create datafile '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/UNNAMED00006' as '+DATA/dgphy/datafile/test01.dbf'; Database altered.
再開啟實時應用
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION; Database altered.
檢視日誌
ALTER SYSTEM SET standby_file_management='MANUAL' SCOPE=BOTH;alter database create datafile '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/UNNAMED00006' as '+DATA/dgphy/datafile/test01.dbf'Completed: alter database create datafile '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/UNNAMED00006' as '+DATA/dgphy/datafile/test01.dbf'Thu Aug 01 01:23:04 2019ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSIONAttempt to start background Managed Standby Recovery process (dgphy) Thu Aug 01 01:23:04 2019MRP0 started with pid=24, OS id=82426 MRP0: Background Managed Standby Recovery process started (dgphy) started logmerger process Thu Aug 01 01:23:10 2019Managed Standby Recovery starting Real Time ApplyParallel Media Recovery started with 2 slaves Waiting for all non-current ORLs to be archived...All non-current ORLs have been archived. Thu Aug 01 01:23:10 2019Archiver process freed from errors. No longer stopped Media Recovery Log /u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch1_30_1015097842.dbf Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSIONMedia Recovery Log /u01/app/oracle/product/11.2.0/dbhome_1/dbs/arch1_31_1015097842.dbf Media Recovery Waiting for thread 1 sequence 32 (in transit)
此時實時應用已經成功完成
檢視程式
SQL> ! ps -ef|grep mrp oracle 74365 1 0 00:43 ? 00:00:00 ora_mrp0_dgphy oracle 81797 80300 0 01:19 pts/14 00:00:00 /bin/bash -c ps -ef|grep mrp oracle 81799 81797 0 01:19 pts/14 00:00:00 grep mrp
檢視資料檔案
SQL> select name from v$datafile; NAME -------------------------------------------------------------------------------- +DATA/dgphy/datafile/system.277.1015099429 +DATA/dgphy/datafile/sysaux.278.1015099475 +DATA/dgphy/datafile/undotbs1.280.1015099527 +DATA/dgphy/datafile/users.281.1015099533 +DATA/dgphy/datafile/example.279.1015099511 +DATA/dgphy/datafile/test01.dbf 6 rows selected.
發現問題已經解決了,最後
alter system set standby_file_management='AUTO';
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69908733/viewspace-2652562/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- dg 主庫丟失歸檔 解決方案
- oracle10g data guard(dg)__主庫重新命名資料檔案_在備庫上同步重新命名資料檔案Oracle
- dg中備庫歸檔目錄滿了,導致不能接收主庫歸檔檔案
- DG中主庫與備庫角色的交換
- oracle dg 延遲120分鐘主庫同步資料到備份庫Oracle
- DG 主庫丟失歸檔
- 案例:DG主庫未設定force logging導致備庫壞塊
- 【DG】備庫斷檔問題
- DG備庫手動管理 新增資料檔案
- 【DG】Data Guard主備庫Switchover切換
- 從大資料量主庫建立備庫大資料
- Oracle DG備庫手動管理新增資料檔案Oracle
- 用物理備庫的檔案來恢復主庫
- 【DG】Data Guard主備庫Failove切換AI
- Mysql 資料庫主庫,備庫實時同步配置MySql資料庫
- 【DG】DG備庫報ORA-28000: the account is locked的解決辦法
- 執行主備庫切換以解決主庫儲存不足
- 主備庫切換以解決主庫儲存空間不足
- 邏輯DG主備庫轉換的failoverAI
- 【DATAGUARD】 基於同一個主機建立物理備庫和邏輯備庫 (四)--新增一個物理dg節點
- DG_rman配置修改後不會同步到備庫
- dg歸檔沒有傳輸到備庫
- 解決MySQL的主從資料庫沒有同步的兩種方法MySql資料庫
- 主庫不停做物理dg
- DG主庫發生表誤刪除後利用備庫進行恢復的方法實踐
- ora11_node_dg(4)主庫當機後,從庫升為主庫,重新搭建DG
- Oracle 10g DG 主庫丟失歸檔Oracle 10g
- ORACLE DG之備庫角色Oracle
- Oracle-DG最大保護模式下,dg備庫出現問題對主庫有什麼影響?Oracle模式
- 建立資料庫檔案-日誌檔案-次要資料庫檔案資料庫
- oracle dg庫資料檔案空間不足Oracle
- DG-在主庫/備庫刪除已經應用過的日誌.txt
- SQLServer資料庫MMC不能開啟檔案的解決方法SQLServer資料庫
- 邏輯dg刪除主庫過期歸檔日誌
- DG備庫未啟動SCN 新特性引起ORA-600 2252
- 【DATAGUARD】物理dg在主庫丟失歸檔檔案的情況下的恢復(七)
- ASM REBLANCE引起的DG備庫停止同步問題ORA-16055ASM
- [Dataguard]主庫歸檔丟失,備庫不需重建實驗