Home /ORA-01187: cannot read from file 201 because it failed verification tests
ORA-01187: cannot read from file 201 because it failed verification tests
How to correct errors with a lost temp file.
SQL> select file#,status,name,bytes from v$tempfile;
FILE# STATUS NAME BYTES
---------- ------- ------------------------------ ------------
1 ONLINE /db/DBNAME/tmp/temp01.dbf 2097160192
Everything seems to look normal, but dba_temp_files will tell the "real" story:
SQL> select file_name,status from dba_temp_files;
select file_name,status from dba_temp_files
*
ERROR at line 1:
ORA-01187: cannot read from file 201 because it failed verification tests
ORA-01110: data file 201: /db/DBNAME/tmp/temp01.dbf
to resolve this issue you can simply drop the missing tempfile without causing
any trouble:
SQL> alter database tempfile '/db/DBNAME/users/tmp/temp01.dbf' drop;
Database altered.
SQL> select file_name,status from dba_temp_files;
FILE_NAME STATUS
--------------------------------- ---------
/db/DBNAME/tmp/temp01.dbf AVAILABLE
you then simply add the file back and it gets recreated:
ALTER TABLESPACE TEMP ADD TEMPFILE
'/db/DBNAME/tmp/temp01.dbf' SIZE 2097160192 REUSE AUTOEXTEND ON;