但是并不是所有情况都符合Oracle默认的预期,有时候数据库频繁掉电就可能出现无法成功进行实例恢复的情况,此时只能采取一些特殊手段对数据文件头和SCN做一些改动。
一般除非特别紧急的状况,否则不要用BBED、强制推进SCN等”偏方“去打开数据库,对于一个成功的DBA来说,做好备份和灾备永远是最重要的工作。
Instance Recovery Phases
The first phase of instance recovery is called cache recovery or rolling forward, and involves reapplying all of the changes recorded in the online redo log to the data files. Because rollback data is recorded in the online redo log, rolling forward also regenerates the corresponding undo segments.
Rolling forward proceeds through as many online redo log files as necessary to bring the database forward in time. After rolling forward, the data blocks contain all committed changes recorded in the online redo log files. These files could also contain uncommitted changes that were either saved to the data files before the failure, or were recorded in the online redo log and introduced during cache recovery.
After the roll forward, any changes that were not committed must be undone. Oracle Database uses the checkpoint position, which guarantees that every committed change with an SCN lower than the checkpoint SCN is saved on disk. Oracle Database applies undo blocks to roll back uncommitted changes in data blocks that were written before the failure or introduced during cache recovery. This phase is called rolling back or transaction recovery.