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主庫未設定force logging導致備庫壞塊
- DG備庫手動管理 新增資料檔案
- 【DG】Data Guard主備庫Failove切換AI
- 【DG】Data Guard主備庫Switchover切換
- Oracle DG備庫手動管理新增資料檔案Oracle
- oracle dg庫資料檔案建立失敗ORA-01111Oracle
- ORACLE DG之備庫角色Oracle
- 解決MySQL的主從資料庫沒有同步的兩種方法MySql資料庫
- oracle dg庫資料檔案空間不足Oracle
- Oracle-DG最大保護模式下,dg備庫出現問題對主庫有什麼影響?Oracle模式
- ASM REBLANCE引起的DG備庫停止同步問題ORA-16055ASM
- DG備庫未啟動SCN 新特性引起ORA-600 2252
- [20180718]拷貝資料檔案從dg庫.txt
- 在DG備庫備份資料庫並恢復到一個主機上,報錯RMAN-06820資料庫
- 遠端備份資料庫和檔案的方法資料庫
- 【DG】備庫RMAN還原方式搭建DG(不使用duplicate命令)
- ORACLE DG從庫 Rman備份恢復Oracle
- DG主備日誌缺失,資料無法同步修復
- 建立資料庫時“Insufficient privileges”的解決方法DK資料庫
- [20190410]dg建立臨時表檔案資料檔案.txt
- oracle adg備庫歸檔滿了無法同步Oracle
- MySQL主從資料庫同步延遲問題怎麼解決MySql資料庫
- [20190225]測試如何使用dg快速主庫.txt
- 挽救DG中主庫的nologging操作的塊
- 11g dg 備庫搭建多種方式
- Dedecms備份的資料檔案位置及備份資料庫的方法資料庫
- oracle uncatalog資料庫備份檔案Oracle資料庫
- MySQL 5.7 主庫崩潰切備庫MySql
- Oracle DG異構主備支援Oracle
- 10G DG最大可用模式下備庫發生故障時主庫保護級別的變化模式
- [資料庫]MYSQL主從同步資料庫MySql主從同步
- Oracle dg歸檔同步失敗Oracle
- 資料庫讀寫分離,主從同步實現方法資料庫主從同步
- 【DG】Oracle之級聯DG--(cascade dg) --(一主一備一級聯)Oracle
- 資料庫回檔解決方案資料庫
- iGuard和NFS檔案同步的解決方案NFS
- 使用zlib庫解壓zip檔案
- 搭建 mariadb 資料庫主從同步資料庫主從同步