db_file_name_convert設定出錯導致備庫無法recovery
一套10.2.0.5的physical standby,主庫掛載了一系列的sas磁碟,新增的磁碟路徑在備庫上不存在,因此需要設定備庫引數db_file_name_convert,
但是敲入命令出錯,原本的'/storage/disk00','/data/oracle/oradata/test'敲成了'/storage/disk0*','/data/oracle/oradata/test'
在主庫新增表空間的時候備庫出現錯誤,備庫alertlog如下
WARNING: File being created with same name as in Primary
Existing file may be overwritten
Errors in file /data/oracle/diag/rdbms/test/trace/test_pr00_6397.trc:
ORA-01119: error in creating database file '/storage/disk00/JUSTIN_01.dbf'
ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
Linux-x86_64 Error: 13: Permission denied
File #166 added to control file as 'UNNAMED00166'.
Originally created as:
'/storage/disk00/JUSTIN_01.dbf'
Recovery was unable to create the file as:
'/storage/disk00/JUSTIN_01.dbf'
MRP0: Background Media Recovery terminated with error 1274
Errors in file /data/oracle/diag/rdbms/test/trace/test_pr00_6397.trc:
ORA-01274: cannot add datafile '/storage/disk00/JUSTIN_01.dbf' - file could not be created
Managed Standby Recovery not using Real Time Apply
Recovery interrupted!
Recovered data files to a consistent state at change 23332162008
Tue Oct 11 14:44:44 2011
MRP0: Background Media Recovery process shutdown (test)
由於備庫不存在/storage/disk00,無法建立datafile導致recovery被中止
此時嘗試啟動備庫的recovery程式,觀察alertlog可以看到,recovery的slave程式由於ora-1111錯誤而退出
Tue Oct 11 14:46:43 2011
ALTER DATABASE RECOVER managed standby database using current logfile disconnect from session
Attempt to start background Managed Standby Recovery process (test)
Tue Oct 11 14:46:43 2011
MRP0 started with pid=26, OS id=6441
MRP0: Background Managed Standby Recovery process started (test)
started logmerger process
Tue Oct 11 14:46:48 2011
Managed Standby Recovery starting Real Time Apply
Tue Oct 11 14:46:48 2011
Errors in file /data/oracle/diag/rdbms/test/trace/test_dbw0_6353.trc:
ORA-01186: file 166 failed verification tests
ORA-01157: cannot identify/lock data file 166 - see DBWR trace file
ORA-01111: name for data file 166 is unknown - rename to correct file
ORA-01110: data file 166: '/data/oracle/product/11.2.0/db1/dbs/UNNAMED00166'
File 166 not verified due to error ORA-01157
MRP0: Background Media Recovery terminated with error 1111
Errors in file /data/oracle/diag/rdbms/test/trace/test_pr00_6475.trc:
ORA-01111: name for data file 166 is unknown - rename to correct file
ORA-01110: data file 166: '/data/oracle/product/11.2.0/db1/dbs/UNNAMED00166'
ORA-01157: cannot identify/lock data file 166 - see DBWR trace file
ORA-01111: name for data file 166 is unknown - rename to correct file
ORA-01110: data file 166: '/data/oracle/product/11.2.0/db1/dbs/UNNAMED00166'
Managed Standby Recovery not using Real Time Apply
Slave exiting with ORA-1111 exception
Errors in file /data/oracle/diag/rdbms/test/trace/test_pr00_6475.trc:
ORA-01111: name for data file 166 is unknown - rename to correct file
ORA-01110: data file 166: '/data/oracle/product/11.2.0/db1/dbs/UNNAMED00166'
ORA-01157: cannot identify/lock data file 166 - see DBWR trace file
ORA-01111: name for data file 166 is unknown - rename to correct file
ORA-01110: data file 166: '/data/oracle/product/11.2.0/db1/dbs/UNNAMED00166'
Recovery Slave PR00 previously exited with exception 1111
MRP0: Background Media Recovery process shutdown (test)
Completed: ALTER DATABASE RECOVER managed standby database using current logfile disconnect from session
Tue Oct 11 14:47:06 2011
Archived Log entry 4801 added for thread 1 sequence 10651 ID 0xe339e88c dest 1:
Tue Oct 11 14:47:06 2011
RFS[1]: Selected log 6 for thread 1 sequence 10652 dbid -482780276 branch 754336076
Tue Oct 11 14:47:25 2011
Archived Log entry 4802 added for thread 1 sequence 10652 ID 0xe339e88c dest 1:
Tue Oct 11 14:47:25 2011
RFS[1]: Selected log 6 for thread 1 sequence 10653 dbid -482780276 branch 754336076
此時備庫已經無法正常恢復了,也無法open
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-10458: standby database requires recovery
ORA-01157: cannot identify/lock data file 166 - see DBWR trace file
ORA-01111: name for data file 166 is unknown - rename to correct file
ORA-01110: data file 166: '/data/oracle/product/11.2.0/db1/dbs/UNNAMED00166'
解決辦法,修改備庫的db_file_name_convert引數使之正確,在主庫將新增的tablespace drop,接著在備庫執行offline drop
SQL> alter database datafile '/data/oracle/product/11.2.0/db1/dbs/UNNAMED00166'
2 offline drop;
Database altered.
此時v$datafile中還可以看到該檔案記錄
SQL> select ts#,name from v$datafile;
TS# NAME
---------- ----------------------------------------------------------------------------------------------------
0 /data/oracle/oradata/test/system.dbf
1 /data/oracle/oradata/test/undotbs01.dbf
2 /data/oracle/oradata/test/sysaux.dbf
10 /data/oracle/product/11.2.0/db1/dbs/UNNAMED00166
開啟備庫恢復程式,此時備庫恢復正常,透過alertlog可以看出備庫的執行步驟
由於db_file_name_convert設定正確,先增加datafile,然後再delete並drop tablespace
Completed: ALTER DATABASE RECOVER managed standby database using current logfile disconnect from session
Recovery created file /data/oracle/oradata/test/JUSTIN_01.dbf
Successfully added datafile 166 to media recovery
Datafile #166: '/data/oracle/oradata/test/JUSTIN_01.dbf'
Recovery deleting file #166:'/data/oracle/oradata/test/JUSTIN_01.dbf' from controlfile.
Deleted file /data/oracle/oradata/test/JUSTIN_01.dbf
Recovery dropped tablespace 'JUSTIN'
Media Recovery Log /data/oracle/oradata/test/arch/1_10652_754336076.dbf
Media Recovery Log /data/oracle/oradata/test/arch/1_10653_754336076.dbf
Media Recovery Log /data/oracle/oradata/test/arch/1_10654_754336076.dbf
Media Recovery Waiting for thread 1 sequence 10655 (in transit)
Recovery of Online Redo Log: Thread 1 Group 6 Seq 10655 Reading mem 0
Mem# 0: /data/oracle/oradata/test/standbyredo6.log
Tue Oct 11 14:54:08 2011
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15480802/viewspace-708959/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- eclipse: workspace出錯導致無法啟用的解決Eclipse
- 案例:DG主庫未設定force logging導致備庫壞塊
- ant design 中,使用dva/fetch 設定導致無法從後臺匯出excel的問題Excel
- SQL Server 因設定最大記憶體過小導致無法啟動SQLServer記憶體
- 【SSL】MAC電腦域名無法解析-啟用IPV6設定導致Mac
- 子div設定float後會導致父div無法自動撐開
- PostgreSQL DBA(29) - Backup&Recovery#2(日期格式導致的錯誤)SQL
- STANDBY_FILE_MANAGEMENT引數未設定auto導致的ADG備庫異常
- vim 編輯報錯導致無法正常退出和編輯
- 磁碟IO故障導致的SQLServer資料庫無法寫入SQLServer資料庫
- 在settings加入AUTHENTICATION_BACKENDS設定導致root使用者無法登入問題
- wpf popup導致MouseLeftButtonUp無法觸發
- 重置資料庫密碼後導致網站無法訪問資料庫密碼網站
- 【linux】【docker】Docker預設網段配置導致無法訪問LinuxDocker
- [重慶思莊每日技術分享]-由於備庫閃回區過小導致的備庫無法實時應用日誌應用日誌
- 【案例】Oracle報錯ORA-01194 ORA-01110 由於資料庫SCN不一致導致無法啟動Oracle資料庫
- MySQL時區導致無法產生表MySql
- Oracle 12c DG備庫啟動報錯standby database requires recoveryOracleDatabaseUI
- 應用使用JNDI,資料庫無法連線,導致的程序無法啟動問題處理資料庫
- JS · \r\n被轉義導致出錯JS
- file-max設定過小導致oracle資料庫hang住Oracle資料庫
- 由於無法分配ip而導致的FailedCreatePodSandBoxAI
- ORACLE DSG資料同步軟體程式導致資料庫無法正常關閉Oracle資料庫
- 【epoll問題】EPOLLRDHUP使用導致無法接受資料
- ThinkPHP裡無法輸出圖片 設定響應頭PHP
- 【Oracle】sys下缺失和無效物件導致exp、expdp和RMAN等備份功能全部報錯Oracle物件
- 記一次ORA-01102導致資料庫例項無法啟動案例資料庫
- RAC下主機修改時區導致db無法open
- Python3.7.0 SSL低版本導致Pip無法使用Python
- smt加工這些失誤會導致smt加工出錯
- Standby_file_management引數導致日誌無法應用
- css:touch-action導致安卓無法滾動頁面CSS安卓
- centos6.3誤刪python2.6導致yum無法使用CentOSPython
- nfs導致的作業系統目錄無法訪問NFS作業系統
- Mac升級至macOS High Sierra後導致git無法使用MacGit
- oracle adg備庫歸檔滿了無法同步Oracle
- 程式無任何報錯但是無法寫入資料庫資料庫
- Notepad++無法設定中文簡體
- cocos 無法設定Node layer屬性