and since this was a test database, I dropped the datafile and tablespace from the control file...so at this point the database has forgotten about the tablespace and datafile.
But, them my sys admin tells me he can get the file from a backup tape...we do have the arch files also.
I create a new tablespace, with the same datafile name that was lost...next I rename the orignal file (from backup) as the file of the tablespace that I just created. Then I did a checkpoint ! It complained about:
ORA-01122: database file 71 failed verification check
ORA-01203: wrong incarnation of this file - wrong creation SCN
Is this because the tablespace was created after the SCN of the datafile ?
The old datafile has a different creation scn than the datafile from the new tablespace. Since the tablespace was dropped, the database does not know or care about the previous datafile. When you created the new tablespace, that is the new point of reference for the database.
ORA-01203: wrong incarnation of this file - wrong creation SCN is because the database is expecting the creation scn from the newly created tablespace and your datafile contains an older creation scn.
[XYZ:/oracle/orahome/admin/TEMP]$oerr ora 1122
01122, 00000, "database file %s failed verification check"
// *Cause: The information in this file is inconsistent with information
// from the controlfile. See accompanying message for reason.
// *Action: Make certain that the db files and controlfiles are the correct
// files for this database.
[XYZ:/oracle/orahome/admin/TEMP]$oerr ora 1203
01203, 00000, "wrong incarnation of this file - wrong creation SCN"
// *Cause: The creation SCN in the file header is not the same as the
// creation SCN in the controlfile. This is probably a copy of a
// file that was dropped.
// *Action: Restore a current copy of the data file and do recovery as needed.
The creation SCN in the file header is not the same
You have to restore it from the backup to recover it...