We successfully dropped a temporary tablespace with its all files, but we saw some errors like ORA-01258 in the alert log.
SQL> drop tablespace temp including contents and datafiles;
In alert log, we saw many errors like this:
[oracle@standby01 ~]$ cd $ORACLE_BASE/diag/rdbms/orclcdb/ORCLCDB1/trace
[oracle@standby01 ~]$ alert_$ORACLE_SID.log
ORA-01122: database file 1403 failed verification check
ORA-01110: data file 1403: '+DATA/ORCLCDB/ORCLPDB/temp01.dbf'
ORA-01203: wrong incarnation of this file - wrong creation SCN
ORA-01258: unable to delete temporary file +DATA/ORCLCDB/ORCLPDB/temp01.dbf
ORA-01258 means that Oracle cannot delete the temporary file from the storage at this moment. In this case, it's because the file belongs to a different incarnation which is not the current one.
Although Oracle is unable to remove the file, we can delete it manually. For single-instance databases, just use rm command to remove tempfiles.
For RAC databases, you may use asmcmd rm to remove them.
[grid@standby01 ~]$ asmcmd rm +DATA/ORCLCDB/ORCLPDB/temp01.dbf
[grid@standby01 ~]$ asmcmd rm +DATA/ORCLCDB/ORCLPDB/temp02.dbf
[grid@standby01 ~]$ asmcmd rm +DATA/ORCLCDB/ORCLPDB/temp03.dbf
[grid@standby01 ~]$ asmcmd rm +DATA/ORCLCDB/ORCLPDB/temp04.dbf
We have solved ORA-01258 by physically removing tempfiles.