resetlogs,由于不完全恢复导致日志不连续而不能使用恢复点之后的日志进行重做,所以使用resetlogs进行打开数据库。
noresetlogs,由于控制文件的版本是从备份中而来或是手工重建的,并且所有日志是连续的,可以用于重做,所以使用noresetlogs打开数据库,意为使用log进行重做。
The primary function of resetlogs is to discard the redo that was not applied during incomplete recovery, ensuring that the skipped redo can never be accidentally applied by a subsequent recovery. To accomplish this, resetlogs effectively invalidates all existing redo in all online and archived redo logfiles. This has the side effect of making any existing datafile backups unusable for future recovery operations.Resetlogs also reinitializes the controlfile information about online logs and redo threads, clears the contents of any existing online redo log files, creates the online redo log files if they do not currently exist, and resets the log sequence number in all threads to one.
resetlogs的主要功能是在不完全恢复过程中忽略不可用的重做日志,确保略过的日志不影响接下来的恢复。resetlogs把所有存在于在线或归档的日志文件中的重做信息都置为不可用。这带来一个副作用,使得已存在的数据文件备份对将来的数据恢复不再是安全可用的了。resetlogs同时还会:重新初始化 控制文件中的在线日志信息及重做日志线程、清除已存在的重做日志文件、若重做日志不存在则创建日志文件、重置所有线程中的日志序号为1。
一、运用场合 以下条件需要使用resetlog
1)在不完全恢复(介质恢复)
2)使用备份控制文件(backup的控制文