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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 又一例SPFILE設定錯誤導致資料庫無法啟動資料庫
- oracle SGA設定過大導致資料庫無法啟動Oracle資料庫
- 【shmmax】由於shmmax設定過小導致dbca建庫無法完成HMM
- ORACLE_HOME設定錯誤導致本地sqlplus無法登陸OracleSQL
- [oracle]undo表空間出錯,導致資料庫例項無法開啟Oracle資料庫
- eclipse: workspace出錯導致無法啟用的解決Eclipse
- listener的ORACLE_HOME配置出錯導致無法遠端登陸資料庫Oracle資料庫
- 資料庫表匯出不全導致tomcat無法釋出程式資料庫Tomcat
- DDL觸發器設定導致DDL無法執行(二)觸發器
- DDL觸發器設定導致DDL無法執行(一)觸發器
- memory_target設定不當導致資料庫無法啟動的問題資料庫
- SPFILE 錯誤導致資料庫無法啟動(ORA-01565)資料庫
- 案例:DG主庫未設定force logging導致備庫壞塊
- 【SSL】MAC電腦域名無法解析-啟用IPV6設定導致Mac
- 子div設定float後會導致父div無法自動撐開
- SQL Server 因設定最大記憶體過小導致無法啟動SQLServer記憶體
- ORA-06502報錯導致資料庫所有檢視無法修改。資料庫
- 【DataGuard】由於備庫引數設定不當導致資料檔案無法新增的故障分析
- ant design 中,使用dva/fetch 設定導致無法從後臺匯出excel的問題Excel
- 9i java_pool_size 設定不當 導致無法使用者exp 邏輯匯出Java
- HA異常導致oracle資料庫無法啟動Oracle資料庫
- 由hugepage設定導致的資料庫事故資料庫
- vim 編輯報錯導致無法正常退出和編輯
- 【DataGuard】由於備庫引數設定不當導致資料檔案無法新增的故障分析(轉)
- LD_LIBRARY_PATH設定不當導致無法登陸和啟動oracleOracle
- 統計資訊過舊導致SQL無法執行出來SQL
- 磁碟IO故障導致的SQLServer資料庫無法寫入SQLServer資料庫
- 誤修改ORACLE_HOME導致無法登陸資料庫Oracle資料庫
- UNDO表空間損壞導致資料庫無法OPEN資料庫
- 歸檔問題導致的資料庫無法啟動資料庫
- 修改SQLNET.ORA導致資料庫無法啟動SQL資料庫
- STANDBY_FILE_MANAGEMENT引數未設定auto導致的ADG備庫異常
- 錯誤初始化引數導致無法啟動的解決辦法
- 如何解決WAS的JAVA虛擬機器引數設定錯誤,導致控制檯無法啟動的問題Java虛擬機
- Recovery恢復出廠設定方法
- mysql設定複雜密碼中含$特殊符號導致無法命令列登入MySql密碼符號命令列
- PostgreSQL DBA(29) - Backup&Recovery#2(日期格式導致的錯誤)SQL
- 【故障恢復】因spfile修改錯誤導致資料庫無法啟動的恢復方法資料庫