>데이터 베이스 >MySQL 튜토리얼 >关于ORA-01187: cannot read from file because it failed verific

关于ORA-01187: cannot read from file because it failed verific

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB원래의
2016-06-07 17:29:541274검색

关于ORA-01187: cannot read from file because it failed verification tests 的处理方法

环境: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'
 

重现下错误:
 
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时导致临时数据库文件出错,解决方法是重建临时数据文件;
 
带着这个疑问google了下,发现好多朋友遇到这个问题,表示重建下临时文件,或者重新reuse下临时表空间都可以处理这个问题,但是对于问题的根本起因,倒是没有找到原因;很遗憾!
 
还是来说明我自己的处理方法吧:
 
由于这个DG环境下的primary主库上报的错,对比了一下主备库的temp表空间,,都是30M的大小,而且也都是online状态。
 

 

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
 

 

重新添加临时数据文件:
 
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环境,所以temp的name和bytes的值最好保持主备库一致,方便以后做Switchover;
 
至于导致ORA-01187错误的主要诱因,还是不明,也没有找到相关的文档;

linux

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.