When all current redo logs are lost

[复制链接]
查看11 | 回复2 | 2005-10-30 17:05:33 | 显示全部楼层 |阅读模式
Yesterday our companies datawarehouse guy made a mistake and removed the current redo log file of his 1.2 terabyte database while tens of sessions were running. He didn't multiplex the redo logs, and didn't have backups either, though the database was running in archivelog mode. After Oracle support told him they couldn't help, he went to us for help.
As everything else has been tried, as last option, I decided to use the
unsupported _allow_resetlogs_corruption= true parameter to open the database. After an evening and a morning's try, I can't recall exactly what happened, but somehow we managed to open the database, first with that parameter, then without it. As database is opened without that parameter, I assume that it is now somehow consistent, though there is no way to check, and there is no alternative anyway. The only alternative is to reimport all the data and it could take weeks. Having his job saved is one thing, I was more interested in reconstructing the whole event.
So I created a small 8.1.7 database , let it run in archive log mode, then
run some transactions, then remove the current redo logs, try to recover it the same way as I did earlier. After some tries, I found that the steps are not so complicated at all, and repeated several times successfully. I would like to have some other people test these steps, and would like to hear some comments.
Here are the steps:
Database running, current redo log group is 3, and all memebers are removed.
1. shutdown immediate(if instance not crashed yet)
2. Set _allow_resetlogs_corruption=true (_allow_read_only_corruption) in init.ora
3. startup mount
4. recover database until cancel;
5. alter database open resetlogs;
6. remove _allow_resetlogs_corruption=true from init.ora
7. shutdown
8. startup mount;
10.recover database;
11. alter database open ;
I am suprised that this looks so simple, yet I thought before that this was not possible. Have no idea about the potential logical data corruption though. With our own production database, I would never use this procedure as we have backups.
Your comments are welcomed.
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
实际上对于每一种 fatal 的情况
Oracle都有相应的内部方法来尽可能多的找回数据。
损失在线redo logs 还是比较容易的情况。
如果更为严重的情况
_allow_resetlogs_corruption可能会和
_corrupted_rollback_segments
_offline_rollback_segment
等参数一起使用,禁止前滚或者回滚,这时候损失的数据一致性可能主要存在于约束方面。
最为严重的情况是损失了system表空间,而又没有备份。
那么Oracle可以使用DUL找回数据。
回复

使用道具 举报

千问 | 2005-10-30 17:05:33 | 显示全部楼层
我没多少话可说
没有备份,迟早有一天会玩完。好的DBA不是用来拯救数据库,而是防止数据库崩溃
这种处境,我只希望永远不要发生,永远不需要讨论
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行