目录
2、在RMAN中OPEN RESETLOGS与SQLPLUS中OPEN RESETLOGS的区别
3、重建控制文件中open resetlogs和open noresetlogs的SCN来源
4、使用open resetlogs和open noresetlogs的场景总结
5、重建控制文件和恢复中open resetlogs和noretlogs的关系
1、mos 说明
在mos文档
Physical Backup and Recovery: An Insider's Perspective (Doc ID 16530.1)
给到的解释:
After recover database operation, open the database with: ALTER DATABASE OPEN [NO]RESETLOGS #恢复数据库操作后,使用以下命令打开数据库:ALTER database open[NO]RESETLOGS
1.NORESETLOGS
The NORESETLOGS option does not clear the redo log files during startup and the online redologs to be used for recovery.
Only used in scenario where MANUAL recoverY is started, CANCEL is used, and then recover DATABASE is started.
#NORESETLOGS选项不会在启动期间清除重做日志文件。
2.RESETLOGS
CAUTION: Never use RESETLOGS unlessnecessary. # 注意:除非必要,否则切勿使用RESETLOGS。
Once RESETLOGS is used then the redo logfiles cannot be used and any completed transactions in those redo logs are lost!! #一旦使用RESETLOGS,则无法使用重做日志文件,并且这些重做日志中任何已完成的事务都将丢失!
Before using the RESETLOGS option take an offline backup of the database.
The RESETLOGS option clears all the online redo logs and modifies all the online data files to indicate no recovery is needed. #在使用RESETLOGS选项之前,请对数据库进行脱机备份。
RESETLOGS选项清除所有联机重做日志并修改所有联机数据文件,以表明不需要恢复。After resetting the redo logs none of the existing log files or data file backups can be used.
In the control file, the log sequence number is modified,which is very important for recovery purposes. The recovery will be applied only to the log files whose sequence number is greater than log sequence number in the control file. One has to be very cautious when using RESETLOGS option. It is important to remember that all datafiles must be online other wise they will become useless once the database is up。 #
#重置重做日志后,不能使用任何现有的日志文件或数据文件备份。在控制文件中,会修改日志序列号,这对于恢复非常重要。恢复将仅应用于序列号大于控制文件中日志序列号的日志文件。使用RESETLOGS选项时必须非常谨慎。重要的是要记住,所有数据文件都必须在线,否则一旦数据库启动,将导致文件不可用。
在mos文档
How to RESTORE and RECOVER Offline RMAN Backup without OPEN RESETLOGS (Doc ID 1077022.1) 给到的解释:
RESETLOGS | NORESETLOGS
========================
This clause determines whether Oracle Database resets the current log sequence
number to 1, archives any unarchived logs