关于ORA-01187: cannot read from file because it failed verification tests 的处理方法
環(huán)境:OEL+Oracle 11.2.0.3+physical standby
問題描述:查詢dba_temp_files試圖時顯示Ora-01187錯誤號;
ORA-01187: cannot read from file ?because it failed verification tests
ORA-01110: data file 201: '/oradata/seven/temp01.dbf'
重現(xiàn)下錯誤:
SQL> select file_id,file_name,tablespace_name from dba_temp_files;
select file_id,file_name,tablespace_name from dba_temp_files
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? *
ERROR at line 1:
ORA-01187: cannot read from file ?because it failed verification tests
ORA-01110: data file 201: '/oradata/seven/temp01.dbf'
oerr ora解決方法是:
[oracle@Seven trace]$ oerr ora 01187
01187, 00000, "cannot read from file %s because it failed verification tests"
// *Cause: ?The data file did not pass the checks to insure it is part of the
// ? ? ? ? database. Reads are not allowed until it is verified.
// *Action: Make the correct file available to the database. Then, either open
// ? ? ? ? the database, or execute ALTER SYSTEM CHECK DATAFILES. ?
初步推斷是上次DG進行switchover時導(dǎo)致臨時數(shù)據(jù)庫文件出錯,解決方法是重建臨時數(shù)據(jù)文件;
帶著這個疑問google了下,發(fā)現(xiàn)好多朋友遇到這個問題,表示重建下臨時文件,或者重新reuse下臨時表空間都可以處理這個問題,但是對于問題的根本起因,倒是沒有找到原因;很遺憾!
還是來說明我自己的處理方法吧:
由于這個DG環(huán)境下的primary主庫上報的錯,對比了一下主備庫的temp表空間,都是30M的大小,而且也都是online狀態(tài)。
SQL> select name,bytes/1024/1024,status from v$tempfile;
NAME ? ? ? ? ? ? ? ? ? ? ? ? ? BYTES/1024/1024 STATUS
------------------------------ --------------- -------
/oradata/seven/temp01.dbf ? ? ? ? ? ? ? ? ? 30 ONLINE
刪除臨時文件:
SQL> alter database ?tempfile '/oradata/seven/temp01.dbf' drop;
Database altered.
SQL> select name,bytes/1024/1024,status from v$tempfile;
no rows selected
重新添加臨時數(shù)據(jù)文件:
?
SQL> alter tablespace temp add tempfile '/oradata/seven/temp01.dbf' size 30M reuse;
Tablespace altered.
SQL> select name,bytes/1024/1024,status from v$tempfile;
NAME ? ? ? ? ? ? ? ? ? ? ? ? ? BYTES/1024/1024 STATUS
------------------------------ --------------- -------
/oradata/seven/temp01.dbf ? ? ? ? ? ? ? ? ? 30 ONLINE
由于場景是DG環(huán)境,所以temp的name和bytes的值最好保持主備庫一致,方便以后做Switchover;
至于導(dǎo)致ORA-01187錯誤的主要誘因,還是不明,也沒有找到相關(guān)的文檔;
?
總結(jié)
以上是生活随笔為你收集整理的关于ORA-01187: cannot read from file because it failed verification tests 的处理方法的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Linux服务之httpd基本配置详解
- 下一篇: 马老师 生产环境mysql主从复制、架构