Site icon IT Tutorial

ORA-01187: cannot read from file because it failed verification tests

I got ” ORA-01187: cannot read from file because it failed verification tests ”  error in Oracle database.

 

ORA-01187: cannot read from file because it failed verification tests

 

Details of error are as follows.

ORA-01187: Cannot read from file string because it failed verification tests

Cause: The datafile 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


Upgrade to 12.2.0.1 fails with error:
$ ./dbupgrade



catupgrd0.log shows:

ORA-01187: cannot read from file  because it failed verification tests
ORA-01110: data file 14: '/u01/oracle/oradata/temp01.dbf'

alert log shows:

Rereading datafile 14 header failed with ORA-01210
ORA-01186: file 14 failed verification tests
ORA-01122: database file 14 failed verification check
ORA-01110: data file 14: '/u01/oracle/oradata/temp01.dbf'
ORA-01210: data file header is media corrupt

 



 

 

Cannot read from file string because it failed verification tests

This ORA-01187 error is related with the datafile did not pass the checks to insure it is part of the database.
Reads are not allowed until it is verified.

The tempfile “temp01.dbf” is corrupted. It did not pass the checks to insure it is part of the database.

When queried dba_temp_files it also fails with same error:

SQL> SELECT tablespace_name, file_name  FROM dba_temp_files WHERE tablespace_name = 'TEMP';
SELECT tablespace_name, file_name  FROM dba_temp_files WHERE tablespace_name = 'TEMP'
                                              *
ERROR at line 1:
ORA-01187: cannot read from file  because it failed verification tests
ORA-01110: data file 14: '/u01/oracle/oradata/temp01.dbf'
To solve this error, you should Recreate tempfile as below:

1)First query from v$tempfile;

SQL> select FILE#,NAME  from  v$tempfile;
FILE#    NAME
------  --------------------------------                                
14        /u01/oracle/oradata/temp01.dbf

2)Check for tablespace name:

SQL> SELECT PROPERTY_VALUE   FROM DATABASE_PROPERTIES  WHERE PROPERTY_NAME = 'DEFAULT_TEMP_TABLESPACE';
PROPERTY_VALUE
----------------
TEMP

3)Create new tempfile;

SQL> ALTER TABLESPACE temp ADD TEMPFILE '/u01/oracle/oradata/temp02.dbf' SIZE 512M  ;
Tablespace altered.

4)Drop the tempfile ‘temp01.dbf’

SQL> ALTER DATABASE TEMPFILE '/u01/oracle/oradata/temp01.dbf' DROP INCLUDING DATAFILES;
Database altered.

5) Now  query from “dba_temp_files” will not fail:

SQL> SELECT tablespace_name, file_name, bytes FROM dba_temp_files WHERE tablespace_name = 'TEMP';
TABLESPACE_NAME        FILE_NAME
----------------    -------------------------------
TEMP                '/u01/oracle/oradata/temp02.dbf

5)Re-run the database upgrade.

 

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )

 

Exit mobile version