暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

How do I recover from ... loss of a datafile that belongs to an indexes-only tablespace

2011-01-01
783

The Oracle (tm) Users' Co-Operative FAQ

Recovering from a loss datafile in index tablespace


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:

If you think the index tablespace can be easily created

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

 

To recreate the index tablespace is way too tedious and time consuming

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



最后修改时间:2020-04-16 15:13:21
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论