您好,登錄后才能下訂單哦!
這篇文章主要介紹“怎么解決Oracle中dg主庫創建文件備庫未同步問題”,在日常操作中,相信很多人在怎么解決Oracle中dg主庫創建文件備庫未同步問題問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”怎么解決Oracle中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/arch2_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/arch2_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/arch2_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/arch2_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';
到此,關于“怎么解決Oracle中dg主庫創建文件備庫未同步問題”的學習就結束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學習,快去試試吧!若想繼續學習更多相關知識,請繼續關注億速云網站,小編會繼續努力為大家帶來更多實用的文章!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。