关于resetlogs
2015-07-05 11:21
561 查看
RESETLOGS | NORESETLOGS This clause determines whether Oracle Database resets the current log sequence number to 1, archives any unarchived logs (including the current log),
and discards any redo information that was not applied during recovery, ensuring that it will never be applied. Oracle Database uses
except in the following specific situations, which require a setting for this clause:
You must specify
After performing incomplete media recovery or media recovery using a backup control file
After a previous
that did not complete
After a
If a created control file is mounted, then you must specify
the online logs are lost, or you must specify
lost.
When you open the database with the
performs the following actions:
Archives the current online redo logs (if they are accessible) and then erases the contents of the online redo logs and resets the log sequence number to 1.
For example, if the current online redo logs are sequence 1000 and 1001 when you open
then the database archives logs 1000 and 1001 and then resets the online redo logs to sequence 1 and 2.
Creates the online redo log files if they do not currently exist.
Initializes redo thread records and online redo log records in the control file to the beginning of the new database incarnation.
More specifically, the database sets the redo thread status to closed, sets the current thread sequence in the redo thread records to 1, sets the thread checkpoint of each redo thread to the beginning of log sequence 1, chooses one redo log from each thread
and initialize its sequence to 1, and so on.
Updates all current datafiles and online redo logs and all subsequent archived redo logs with a new
time stamp.
Because the database does not apply an archived redo log to a data file unless the
time stamps match, the
corrupting data files with archived logs that are not from direct parent incarnations of the current incarnation. The relationship among incarnations is explained more fully in the following section.
In previous releases, it was recommended that you back up the database immediately after the
like any other backup, making a new database backup is optional. To perform recovery through
must have all archived logs generated after the most recent backup and at least one control file (current, backup, or created).
参考:
http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_1004.htm#SQLRF00802 http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmrvcon.htm#BRADV1171
and discards any redo information that was not applied during recovery, ensuring that it will never be applied. Oracle Database uses
NORESETLOGSautomatically
except in the following specific situations, which require a setting for this clause:
You must specify
RESETLOGS:
After performing incomplete media recovery or media recovery using a backup control file
After a previous
OPEN
RESETLOGSoperation
that did not complete
After a
FLASHBACK
DATABASEoperation
If a created control file is mounted, then you must specify
RESETLOGSif
the online logs are lost, or you must specify
NORESETLOGSif they are not
lost.
When you open the database with the
RESETLOGSoption, the database
performs the following actions:
Archives the current online redo logs (if they are accessible) and then erases the contents of the online redo logs and resets the log sequence number to 1.
For example, if the current online redo logs are sequence 1000 and 1001 when you open
RESETLOGS,
then the database archives logs 1000 and 1001 and then resets the online redo logs to sequence 1 and 2.
Creates the online redo log files if they do not currently exist.
Initializes redo thread records and online redo log records in the control file to the beginning of the new database incarnation.
More specifically, the database sets the redo thread status to closed, sets the current thread sequence in the redo thread records to 1, sets the thread checkpoint of each redo thread to the beginning of log sequence 1, chooses one redo log from each thread
and initialize its sequence to 1, and so on.
Updates all current datafiles and online redo logs and all subsequent archived redo logs with a new
RESETLOGS
SCNand
time stamp.
Because the database does not apply an archived redo log to a data file unless the
RESETLOGS
SCNand
time stamps match, the
RESETLOGSrequirement prevents you from
corrupting data files with archived logs that are not from direct parent incarnations of the current incarnation. The relationship among incarnations is explained more fully in the following section.
In previous releases, it was recommended that you back up the database immediately after the
OPEN RESETLOGS. Because you can now easily recover a pre-
RESETLOGSbackup
like any other backup, making a new database backup is optional. To perform recovery through
RESETLOGSyou
must have all archived logs generated after the most recent backup and at least one control file (current, backup, or created).
参考:
http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_1004.htm#SQLRF00802 http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmrvcon.htm#BRADV1171
相关文章推荐
- 基于 Red Hat 的发行版 Oracle Linux 正式发布Oracle Linux 7.1
- Oracle Containers for J2EE远程安全漏洞(CVE-2014-0413)
- Oracle 10g R2不能使用EM的问题
- 表空间操作
- PreparedStatement中in子句的处理
- VMware下RedHat4.8_64位安装Oracle 10g RAC--简略脚本
- oracle sql日期比较
- 基于 Red Hat 的发行版 Oracle Linux 正式发布Oracle Linux 7.1
- OS block size和Oracle block size,查找OS Blocksize的方法
- oracle中创建数据库和表空间的几点总结
- 数据库自动备份脚本
- oracle的nvl函数的使用介绍
- 解决oracle用户连接失败的解决方法
- oracle的一些tips技巧
- Oracle 下的开发日积月累
- Oracle存储过程之数据库中获取数据实例
- Windows下ORACLE 10g完全卸载的方法分析
- Oracle 函数大全[字符串函数,数学函数,日期函数]第1/4页
- ORACLE LATERAL-SQL-INJECTION 个人见解