| Author's name: Allan W. Tham
Author's Email: allanwtham@hotmail.com |
Date written: Feb 7 2002 Oracle version(s): 8.1.7.0.0 |
| I know that the datafile that is corrupted contains only index, how can go about to recover my database? | |
There is no easy way as to drop a datafile of a tablespace. The only way to remove a datafile from a database is to drop the defining tablespace. There are a few steps to follow:
1. mount the database - startup mount 2. drop the datafile - alter database datafile xxx offline drop 3. open the database - alter database open 4. drop the index tablespace - drop tablespace xxx including contents; 5. Recreate the index tablespace 6. Recreate the index in the index tablespace
1. Restore a good copy of datafile 2. Mount the database - startup mount 3. Recover the datafile - recover datafile 'fullpath/filename' 4. You will be prompted for archived log. Confirm until you receive "Media Recovery Complete"
(PS. note that if you are running in noarchivelog mode, you can only recover to the point within the range of your online logs. Normally, to have all your online logs intact without being overwritten is quite unlikely and therefore not illustrated here!)
Further reading: Metalink Note:1013115.6 Recovering from a Lost Datafile in an Index Tablespace